Repository navigation
Let a workflow run card unfold all its earlier stages - #693
Merged
Merged
Conversation
The "+N earlier" line under a run's stages was static text, so clicking it did nothing on any run, live or ended. It is now a button (aria-expanded, named "Show N earlier stages", then "Show fewer") that unfolds every reported stage in a list that scrolls inside the card, takes focus for keyboard scrolling, and folds back. Stages still go through displayStages over the whole run, so parent links and the stopped-descendant rule hold on both sides of the fold. Run reports were the real limit: the Atomic harness listed only a run's latest 12 stages and counted the rest. It now keeps the latest 64, the same bound the agent connection already allows a reported card, so stored and broadcast cards stay within existing report limits. Stages a report never listed are counted in earlierStages, and the expanded card says how many were not reported. The e2e seed can now store workflow run cards, and a new harness-project test opens a finished 18-stage run at 1280x800 and on a 390x844 touch phone, unfolds it, checks the lane scrolls inside the card, folds it, and repeats after a reload. Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline (fast subagents) Assistant-verification: bun test red/green: run-card.test.tsx and full.test.ts failed before the change and pass after Assistant-verification: e2e red/green: run-card.e2e.ts failed on the old card (no expand button) and passes at both sizes, including after a reload Assistant-verification: bun test passed: apps/web, apps/server and packages with GIT_CONFIG_GLOBAL=/dev/null Assistant-verification: bun run types and bun run ci passed Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Chat's workflow run card, "+N earlier" was static text, so clicking it did nothing on any run, live or ended. That includes the reported case of a finished run. It is now a real button that unfolds the run's whole stage list in a bounded list that scrolls inside the card.
What changes
apps/web/src/chat/run-card.tsx,run-card.css)<button>witharia-expandedandaria-controls. Its accessible name is "Show N earlier stages" (the visible text stays "+N earlier"), and it becomes "Show fewer" once expanded.min(15rem, 40dvh), scrolls internally withoverscroll-behavior: contain, and is focusable so the keyboard can scroll it (the shared theme focus ring applies).displayStagesover the whole run before folding, soparentIdslinks and the stopped-descendant rule hold on both sides of the fold.apps/server/src/harness/atomic/full.ts)earlierStages. Its in-memory fold has every stage only while the session lives, so there is nothing durable to fetch on expand.MAX_STAGESinpackages/agent-link), so stored and broadcast cards stay within existing report limits.earlierStages, and the expanded card says "N earlier stages were not reported".apps/connectoris unchanged.docs/hosted-agent.mdanddocs/agent-connection.mddescribe the expand behavior andearlierStages.SeedStateand the e2eseedChannelcan storeworkflowRuns.Tests (written red first)
apps/web/src/chat/run-card.test.tsx:apps/server/src/harness/atomic/full.test.ts: a 70-stage run lists its latest 64 and counts 6 earlier.e2e/run-card.e2e.ts(harness project,AGENT=on), at 1280×800 and on a 390×844 touch phone:Verification
GIT_CONFIG_GLOBAL=/dev/null bun test apps/web apps/server packages: 6016 pass, 8 skip, 0 failbun run types: passedbun run ci: passed, with no design-contract hash renewalsbun run e2e --project=harness: 36 passed.run-card.e2e.tswith--repeat-each=6 --retries=0: 12 passed.