Repository navigation
site: show workflow args, step values, live logs and older runs - #372
Conversation
The run detail now shows the args the run was called with, the value each step reported (collapsed by ForkWorkflowLongText), and the log lines while the run still prints them. The run list loads older pages of 50 runs with a Load older runs control that uses the server's created_at/id keyset cursor, and the runs query is an infinite query that keeps its refetch policy. Stories cover a running run with args, live logs and step reports, a running run with no logs yet, a list with the Load older runs control, and the control loading. Vitest covers the step value rendering and loading an older page.
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b3724db3f
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review round 1 on PR #372: - The merged run_workflow tool card stays free of step values, and the running-run fixtures no longer hand values to steps that have not reported. - The run list poll reuses cached older pages, so steady state costs one request per tick, a running run on any loaded page refreshes at the fast interval, and a new run shifts the first page's cursor so the page behind it is fetched, not reused. - Load older waits out a background refetch and the panel specs assert the request params and the query cache instead of button counts. - The value region of a step reads as "<step> value". - The run list sends limit: 50 so the short-page stop does not depend on the server default.
Fix round 1 pushed as 2c3b7a5, one fast-forward commit on mike/issue-324-run-detail-ui. All six P2 threads are answered and resolved: the progress story seeds live logs and running steps carry no value, the presence-only step-value spec is gone, the panel specs assert the exact cursor and the query cache instead of button counts, the run-list poll reuses cached older pages so a tick costs one request (with new specs for one request per tick, the running-page refresh and the shifted cursor), the interval predicate checks every loaded page, and Load older waits out a background refetch. The stale merge comment is rewritten and the value region reads as the step's name plus value. The run list sends limit: 50. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c3b7a538f
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ate from polling - Reuse a cached older page only when every run on it is terminal, so a resume that flips an interrupted run to running is fetched again - Keep Load older runs disabled through a background refetch, while the spinner and label follow only the next-page fetch - Use the exported chatWorkflowRunsKey and satisfies in tests and query - Pin the polling contract with unique-timestamp runs, a focus test for the last page and a refetchInterval unit test
Round 2 pushed on 0448d9c (merge of origin/main d5e4fc1 included). Codex threads addressed:
Opus findings addressed: the polling specs were rewritten with unique per-run timestamps and mutation-checked (steady tick costs one request with reuse off fatal; running page refetched; resumed interrupted page refetched; shifted cursor refetches the page behind). Added a unit test on the refetchInterval option that fails when the fast interval keys off only the first page, cache assertions on pageParams and hasNextPage for the short page, and a test that focus moves to the list when the last page unmounts the control. The large JSON integers thread was resolved as tracked in #374. All 5 round-2 threads are replied and resolved. Pushing is frozen until the next review completes. |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3294485b21
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Round 3 of the Codex review on the workflow run detail PR: - Load older runs uses aria-disabled with a guarded click handler for both a background refetch and a next-page fetch, so a poll tick or a page load never drops keyboard focus or overlaps a fetch in flight. The panel test now holds both fetches open and asserts focus, the aria-disabled signal and a refused second load for each. - The run list gets a focus-visible ring, since it takes focus programmatically when the control unmounts. - Step value regions are named by the step's position and title, so a screen reader can tell two values apart when steps share a title; the API's ordinal feeds the label, with an index fallback. - The failed and stopped story fixtures clear the value of steps that never reported one, matching what the API returns. - The polling tests wait on exact call counts with vi.waitFor instead of a fixed sleep, so a slow later page can no longer flake them.
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90c351d2e9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review round 4 on the workflow run detail PR: - Parsed snapshot steps no longer carry an ordinal, so the parse tests pass unchanged. The value regions are named by the step's position in the list as shown, which a test now reads back through the region role; a constant position or a title-only label fails it. - The steady-tick query test awaits the refetch, which resolves after it has walked every page, so the request list it asserts is complete; with page reuse off the test fails again. - The Load older runs control keeps one accessible name while busy: the spinner is decorative (Spinner is aria-hidden without a label), the text stays Load older runs, and the loading state is what aria-disabled signals. The panel test checks the name and that the control is not disabled, in both a next-page fetch and a poll tick, and synchronizes on the requests and the query cache instead of markup attributes. New stories capture the busy control and the list holding the focus ring after the last page.
@codex review |
The decorative aria-hidden belongs to the fork-workflows call site, not to the shared Spinner: pass it where the spinner sits inside the Load older runs button and leave Spinner as upstream has it.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42e5edf9bc
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- restore list focus only when Load older runs owned focus - make the runs page cursor a required string - rename the Args label to Arguments - drop the unused step ordinal and unused test return - fix the refetch, pagination, call site and value comments - wait for isFetching to drain before checking control focus
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47bf1a96fd
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…wnership on blur - the off-focus test now holds the cursor page open, clicks the control, moves focus to the body while the request is pending, then releases the page - onBlur hands ownership away instead of comparing relatedTarget
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 277e3fb2ed
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- text that first renders in full stays in full when polling grows it past the threshold - the run list clock moves into a row component, so only rows with a running run tick every second - the step value test keeps the region query and drops the text-content assertion
The test resolved one held cursor-page promise and then asserted the control was gone within a polling window. Under CI load the window expired while the forward fetch was still pending, so the control stayed mounted with its spinner and the assertion failed. Hold every cursor fetch in one set, answer any that starts after the release at once, and gate the assertions on the cache holding both pages and a quiet cache instead of a fixed settle delay.
@codex review Head moved to 5174ca7. fork-ci is green on it (run 44507637227). The change since 6d94394 is test-only: the removed-control focus test now releases every held cursor fetch through a shared waiter set and gates its assertions on the cache holding both pages and a quiet cache, which removes the CI-load race that failed run 44492924643. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5174ca7b90
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c559f6d324
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e864e316d7
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lead takeover: the previous workstream stalled repeatedly, so it is archived. A new workstream (Opus) owns this PR on the same branch. Decisions on the Codex P2s on e864e31: the empty-string value display gets fixed; the live-region case for first logs that arrive with the terminal state is declined, because the status change already announces the end of the run. |
Render an empty string workflow value as "" so it does not read as missing. Start a log that mounts live and long in full, keep the scroll viewport of a long log that turns live on resume, and drop the unused UnsafeInteger export.
The short text and the grown live log now render the same pre in one slot, so crossing the threshold updates the node instead of replacing it. Move the empty string test next to formatForkWorkflowValue.
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da19826d6d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da19826d6d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da19826d6d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…r-pr-372-opus-fe3680da
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merged at head Gates on this exact head:
Tests I ran on
Review notes:
Not exercised: the panel in a real browser against a running server, and the stories in Chromatic. |
Closes #324. Closes #374.
The backend half of #324 landed in #341. This PR is the site half: the run detail and the run list show what the journal now keeps.
What changes
ForkWorkflowRunDetailshows an Args block when the run has args, formatted like the Result block.ForkWorkflowStepsshows a step's reported value under the step withForkWorkflowLongText, collapsed by default.role="log"region witharia-live="polite"andaria-relevant="additions", so appended lines announce.parseForkWorkflowJson), so Arguments, Result and step values show integers outside the safe range (such as 9007199254740993) exactly as the server sent them instead of rounded. Display formatting unwraps the marker with aJSON.stringifyreplacer. No new dependency.getChatWorkflowRunstakes the server'saftercursor (<RFC3339>/<run ID>,codersdk/fork_workflow_runs.go), the runs query is an infinite query with a 50-run page size matching the server default, and the list shows a "Load older runs" control with a spinner while the page loads. Each tick refetches every loaded page, so a run the server's retention purged drops out of the cache; the slow interval is 120 s (5 s while a loaded run is going).How tested
pnpm -C site run lint:typespasses.pnpm -C site run checkandformat:checkpass.pnpm -C site run lint:oxlintpasses.ForkWorkflowsPanel.test.tsxpins that args holding9007199254740993render exactly (fails before the reviver), that appended log lines announce while the run is live, and that the merged list across pages stays whole;forkWorkflows.test.ts(queries) covers the cursor walk, the top-up, and that a purged run leaves the cache when a tick reconciles its all-terminal page;ForkWorkflowSteps.test.tsxpins the step value rendering. Full touched suites pass (29 unit tests, plus 10 unit and 26 story tests on the touched components).RunningWithProgressandRunningWithoutLogson the run detail,WithOlderRunsandLoadingOlderRunson the run list.Not exercised here: a live run against a real deployment (covered by #341's runtime evidence for the API side).