Repository navigation
feat(plan): show the current step in the plan chip - #1828
Conversation
The chat's plan chip now draws the step in progress (PlanSummary.current) after its done/total, in the agent's own words. The step is one line, cut with an ellipsis past 16em with a mouse and 8em on a narrow card, and complete in the button's accessible name and title. The figures and the task count never give way to it; on a card narrower than the row's controls the step yields its room first. With no step in progress the chip shows the figures alone and infers nothing. No new state, RPC, setting, bar or second row, and herdr's focus is never moved. DESIGN.md records the rationale (the Claude and Codex plan rows, kept in herdr's one shared chip rather than agent-of-empires' separate strip), with a changelog fragment. No new UI strings. Checked with bun run check fast; the herdr-backed scripts/omo-plan-browser-regression.ts (a live step transition, with a task, unbroken, split, between steps, done and cleared, focus unmoved); the new scripts/plan-chip-demo-regression.ts, enrolled in scripts/ci-browser.sh (one row at 320, 390 and 1440 in both themes and Korean, counts kept, long steps cut but whole in the accessible name, no chip for an offline PC's cached plan or an observer); and composer-fit and deep-link demo regressions. Refs #1040
plan-chip-demo-regression.ts now holds the pointer down on the chip (the mouse beside a mouse, a cancelled touch on a phone) and captures it pressed, and moves the plan to 2/3 with a later step in progress and captures it running, each under the same one-row assertions as the other states. Checked with bun scripts/plan-chip-demo-regression.ts.
plan-chip-demo-regression.ts now records the computed font sizes of the chip and its open list, and probes the chip's real hit rectangle with elementFromPoint from its centre outward, asserting at least 44x44 CSS px on a phone's coarse pointer, where the invisible expander adds the height the drawn 20px pill does not have. Checked with bun scripts/plan-chip-demo-regression.ts.
The composer fitted its status row when the plan's counts changed but not when only PlanSummary.current did, so a short step growing into a long one at the same done/total left the model label cut on a phone (clientWidth 43 of 49 at 390px) until the window resized. plan?.current now joins the fit's inputs. plan-chip-demo-regression.ts asserts that transition: the row fitted with a short step, then only the step's words change at the same counts, and the model label must be whole. It fails without the fix and passes with it. DESIGN.md now gives the design's actual basis: the maintainer-approved adaptation of agent-of-empires' plan strip, keeping herdr's existing shared chip instead of that separate strip. It no longer claims a Claude or Codex app precedent that was never supplied. Checked with bun run check fast, bun scripts/plan-chip-demo-regression.ts (with and without the fix), bun scripts/composer-fit-demo-regression.ts and bun scripts/deep-link-demo-regression.ts. Refs #1040
The plan chip demo regression overrode setTimeout in a hook placed after demo-transport.js, which had already scheduled its 4500 ms turn completion, so the turn could finish during assertions and captures. The hold is now a context init script that runs before any page script, and each capture asserts the completion was held, never ran, and the turn still shows Stop.
The narrow-phone case now runs at 360px as well as 320px: the chip with a long step, the figures and a task count stay on the composer's one status row.
omo-plan-browser-regression.ts and plan-chip-demo-regression.ts wrote the settings and view keys from before the rename, which scripts/conventions.test.ts rejects. DESIGN.md now says the model pill steps out before the step on a phone with a long step and a task count.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge pass review-work for b414a1c: REVIEW FAILED, on one acceptance-evidence point. The feature itself works. Blocker: #1040's "Done when" asks for before/after demo screenshots. Its exact words: "At desktop and 390px widths, a running plan shows its current step without hover. Before/after screenshots from the demo." This PR closes that item but supplies only after-change captures. The 86 screenshots from Checked and passing:
Merge order: DESIGN.md is also changed by #1826 and docs/development.md by #1824. Both are older maintainer PRs, so they merge first, and this PR gets re-checked after them. #1831 (newer) also shares DESIGN.md and the ci-browser files with this PR. |
|
Added the before/after demo captures that #1040 asks for to the description (section "Before and after (#1040)"). They are at desktop (1440px) and 390px, in the same demo state on both sides. Before is origin/main |
|
Merge pass review-work report. Overall: PASSED.
Manual QA:
Code review:
Gate:
MINOR follow-ups:
Merge order: this PR shares All required checks are green, and no review thread is open. CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it. |
What it does for the user
The chat's plan chip, beside the add button in the composer, now shows the step the agent is working on right after its
done/total(for examplePlan 1/3 · Adding the replay metric). Before this, the step was only in the chip's tooltip, so on a phone you had to open the plan to see what the agent was doing.16emwith a mouse and8emon a narrow card. The whole step is in the button's accessible name and title.Design reference (src/AGENTS.md): the Claude and Codex apps both show the running step of a plan inline. This follows them inside herdr's existing shared chip, rather than adding agent-of-empires' separate always-visible plan strip (#1040). The rationale is in DESIGN.md.
Refs #1040
How it was verified
bun run check fast: all steps ok (typecheck, build, 6380 unit tests pass).scripts/plan-chip-demo-regression.ts(new, enrolled inscripts/ci-browser.sh) on the demo fixtures, never a live session:scripts/ci-browser.test.tspasses with the new script counted.ci-browser.test.ts.Review
gpt-6-astra), static review: no bugs or regressions found.scripts/conventions.test.tsrejects. Fixed, and the conventions test now passes.No HTTP/WS contract, auth or workflow change.
Before and after (#1040)
The same demo state on both sides: a running plan at step 1 of 3 ("Adding the replay metric"), the turn held in progress, dark theme, English. Before is the demo built from origin/main at
055e8202515f051abc4549aaa2ceacd680e1a9e5; after is this branch atb414a1c8006b70fbce93154072b87f57289184b7. Desktop is 1440 × 900; the phone is 390 × 844 with touch at 3x.055e8202)b414a1c8)Before, the chip shows only
Plan 1/3, or1/3on the phone, and the step appears only in its tooltip. After, it showsPlan 1/3 · Adding the replay metricon desktop, and1/3 · Adding the rep…on the phone, where the model pill drops its effort label. The figures are never cut.