Skip to content

Show event names and timer durations in compact workflow history - #1281

Open
QuangNg14 wants to merge 2 commits into
temporalio:mainfrom
QuangNg14:local/workflow-history-details
Open

QuangNg14 wants to merge 2 commits into
temporalio:mainfrom
QuangNg14:local/workflow-history-details

Conversation

@QuangNg14

Copy link
Copy Markdown

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 0c38b32b61f420c832f2be1f221521048d720127

Dimension Assessment Rationale
Change confidence 9/10 ↑ The compact signal-row assertion failed on the base and passed with the patch.
↑ A local dev-server suite exercised follow, no-follow, reverse, JSON and reverse JSON; a unit test covers timer and update details.
↓ Not every event type has its own integration assertion, and the full suite was not run locally.

Related issues

Related to #612. This implements details carried by a single event. Workflow-task queue wait (scheduled to started), workflow-task processing time (started to completed), and child-workflow elapsed time (start to completion) remain out of scope.

What changed?

The compact text table for workflow show and workflow execute gains a Details column. It shows the workflow or child workflow type, workflow task queue, activity type, signal or update name, or timer duration when the event supplies it. Other rows stay blank. The JSON history used by replayers and the --detailed text path are unchanged.

Keeping three columns was simpler, but required switching to verbose output just to identify a signal. Using only the current event avoids retaining history, decoding payloads or issuing extra RPCs.

Checklist

Stability

  • Breaking changes are marked with 💥 in the PR title and release notes (not applicable: additive text column)
  • Changes to JSON output (-o json / -o jsonl) are treated as breaking changes (no JSON output change)

Design

  • This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)
  • New commands follow temporal <noun> <verb> structure (no new commands)
  • New flags are named after the API concept, not the implementation mechanism (no new flags)
  • New flags don't duplicate an existing flag that serves the same purpose (no new flags)
  • New flags do not have short aliases without strong justification (no new flags)
  • Experimental features are marked with (Experimental) in commands.yaml (not applicable)

Help text (see style guide at the top of commands.yaml)

  • All flags shown in help text and examples are implemented and functional (no help text changes)
  • Summaries use sentence case and have no trailing period (no help text changes)
  • Descriptions end with a period and include at least one example invocation (no help text changes)
  • Examples use long flags (--namespace, not -n), one flag per line (no help text changes)
  • Placeholder values use YourXxx form (YourWorkflowId, YourNamespace) (no help text changes)

Behavior

  • Results go to stdout; errors and warnings go to stderr (unchanged)
  • Error messages are lowercase with no trailing punctuation (no new error messages)

Tests

  • Added functional test coverage (SharedServerSuite): the compact signal row must contain its signal name.
  • Added unit tests (TestCompactHistoryDetails) for timer formatting, absent timeouts, and accepted updates with and without a named request.

Local verification: the signal-row assertion failed on base a68d1b6 and passed with this change. TestCompactHistoryDetails and the TestWorkflow_Show_Follow, NoFollow, JSON, Reverse, and Reverse_JSON dev-server cases passed on Windows with Go 1.27.4. The full suite was not run locally.

Manual tests

Setup: With an OSS dev server and a test worker running a workflow that waits for the ready signal:

temporal workflow signal --workflow-id YourWorkflowId --name ready

Happy path

temporal workflow show --workflow-id YourWorkflowId
temporal workflow show --workflow-id YourWorkflowId --detailed

The compact signal row should show ready in Details. Detailed text should still show the labeled signalName field.

Error case: No new error path. An accepted update without an embedded request should display a blank Details cell.

Composition

temporal workflow show --workflow-id YourWorkflowId -o json | jq '.events | length'

JSON consumers should still receive the original protobuf history rather than a compact table.

GitHub Copilot assisted with implementation and testing.

Populate the text table from the current history event, without fetching or retaining other events. The detailed and protobuf JSON paths are unchanged.

Assisted-by: GitHub Copilot
@QuangNg14
QuangNg14 requested a review from a team as a code owner November 28, 2026 05:29
@CLAassistant

CLAassistant commented Nov 28, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T05:32:38.808241Z 0c38b32 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants