Skip to content

feat(plan): show the current step in the plan chip - #1828

Merged
devswha merged 7 commits into
mainfrom
feat/plan-chip-current-step
Oct 24, 2026
Merged

devswha merged 7 commits into
mainfrom
feat/plan-chip-current-step

Conversation

@devswha

@devswha devswha commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

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 example Plan 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.

  • The step is one line, cut with an ellipsis past 16em with a mouse and 8em on a narrow card. The whole step is in the button's accessible name and title.
  • The figures and the task count are never cut for it. On a card narrower than the row's controls, the step gives its room back before the add button and the round Send/Stop button do.
  • With no step in progress (between steps, or once every step is done), the chip shows the figures alone.
  • On a phone with a long step and running tasks, the model pill steps out of the status row. It does this already for the chip's other words, and DESIGN.md records it. The phone status line stays on one row.
  • There is no new state, RPC, setting, bar or second row, and herdr's focus is never moved. The composer stays minimal.

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 in scripts/ci-browser.sh) on the demo fixtures, never a live session:
    • chip states at 390px (touch, 3x) and 1440px in dark and light: rest, focused, pressed, open, scrolled, no step, a later step, complete, with tasks, long step, observed, offline, split;
    • Korean at 390 and 1440px;
    • the narrowest phones at 320px and 360px: one row with a long step, the figures and a task count, and the round button kept.
    • I checked the captures at 360px and 1440px by eye.
  • scripts/ci-browser.test.ts passes with the new script counted.
  • I rebased the branch onto current origin/main. The only conflict was the lane's script count in ci-browser.test.ts.

Review

  • Codex (gpt-6-astra), static review: no bugs or regressions found.
  • omo-native-code-reviewer:
    • HIGH: the two plan scripts seeded the pre-Ovis storage keys, which scripts/conventions.test.ts rejects. Fixed, and the conventions test now passes.
    • MEDIUM: on a phone, the model pill steps out before the step. This is kept on purpose, since the step is what a phone would otherwise have to open the plan to see. DESIGN.md now states this order. If you'd rather the step give way first, that is a small CSS follow-up.

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 at b414a1c8006b70fbce93154072b87f57289184b7. Desktop is 1440 × 900; the phone is 390 × 844 with touch at 3x.

Before (main 055e8202) After (this PR, b414a1c8)
Desktop 1440px before, 1440px after, 1440px
Phone 390px before, 390px after, 390px

Before, the chip shows only Plan 1/3, or 1/3 on the phone, and the step appears only in its tooltip. After, it shows Plan 1/3 · Adding the replay metric on desktop, and 1/3 · Adding the rep… on the phone, where the model pill drops its effort label. The figures are never cut.

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.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 1a83fc4 and b414a1c.

Files selected for processing: 11
  • DESIGN.md
  • changelog.d/plan-chip-current-step.md
  • docs/development.md
  • scripts/ci-browser.sh
  • scripts/ci-browser.test.ts
  • scripts/composer-fit-demo-regression.ts
  • scripts/omo-plan-browser-regression.ts
  • scripts/plan-chip-demo-regression.ts
  • src/components/BackgroundTasks.css
  • src/components/BackgroundTasks.tsx
  • src/components/Composer.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

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 plan-chip-demo-regression.ts all show the new chip, and its empty and complete states aren't "before" shots. Please attach before-change demo captures at desktop and 390px, taken from main (name the revision), next to matching after captures. Putting them in the PR description is enough, and no code change is needed.

Checked and passing:

  • Behaviour: the current step follows done/total, is cut at 16em / 8em, and is spelled out in full in the accessible name and title. The figures, the task count and the round button are never cut. Between steps and once every step is done, the chip shows only the figures. On a constrained phone the model pill gives way, as DESIGN.md records.
  • Scope: no new state, RPC, setting or row, and herdr's focus never moves.
  • Tests: 22 unit and conventions tests pass, and the typecheck passes. plan-chip-demo-regression passes 13, omo-plan-browser-regression passes 6 on an isolated herdr, and composer-fit-demo-regression passes 26.
  • Code review (programming and remove-ai-slops) PASS: the chip uses the server's first in-progress step, the refit can't loop, and only tokens are used.
  • Gate probes:
    • a chip with only tasks didn't wrap at card widths from 276 to 706px;
    • with a long step and running tasks at 320px, the touch target measured 190 × 45px.

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.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

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 055e8202515f051abc4549aaa2ceacd680e1a9e5, which shows Plan 1/3, or 1/3 on the phone, with the step only in the tooltip. After is this branch at b414a1c8, which shows the step inline. I made no code change and pushed nothing. The images are hosted in https://gist.github.com/devswha/a771a1cff719ff6979b0cc3f78cd13d1.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Merge pass review-work report. Overall: PASSED.

Lane Verdict Confidence
Manual QA (5 rows, artifacts kept) PASS -
Code review (omo-native-code-reviewer, programming and remove-ai-slops) PASS (WATCH) -
Gate round 1 (b414a1c) REJECT: #1040's "Done when" asks for before/after demo screenshots HIGH
Gate round 2 (fresh reviewer, same head, new description) APPROVE HIGH

Manual QA:

  • 22 unit and conventions tests pass, and the typecheck passes.
  • The browser regressions pass, each on an isolated herdr session: plan-chip-demo-regression 13 PASS, omo-plan-browser-regression 6 PASS, and composer-fit-demo-regression 26 PASS.

Code review:

  • The chip shows the server's first in-progress step.
  • Between steps, once every step is done, on an observed pane and offline, the chip shows only the figures or isn't drawn.
  • The refit on a step change can't loop.
  • The full step is in the accessible name and the title.
  • Tokens only, and no fixed sleeps.

Gate:

  • Chip layout: a chip with only tasks didn't wrap at card widths from 276 to 706px. A long step with tasks at 320px gives a touch target of 190 × 45px.
  • Round 1's finding: the description now has the Chat: show the plan's current step in the plan chip, not only in its tooltip #1040 before/after table. It shows the same demo state, with "before" from main at 055e820 and "after" from b414a1c, at 1440px and at 390px. The gate checked the images against the local copies by SHA-256 and matched their content to the demo fixtures.

MINOR follow-ups:

  • The measurement helpers are duplicated between the two plan scripts.
  • The script's turn hold relies on the demo's 4500/2400 ms timers.

Merge order: this PR shares docs/development.md with #1824, which is held for a docs fix. They change different hunks, and git merge-tree is clean in both orders. Per the maintainer's rule, this PR merges first. #1831 conflicts with this PR in scripts/ci-browser.test.ts and needs a rebase afterwards; there's a note on #1831.

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.

@devswha
devswha merged commit 6e0f88f into main Oct 24, 2026
9 checks passed
@devswha
devswha deleted the feat/plan-chip-current-step branch October 24, 2026 11:31
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.

1 participant