Skip to content

fix(session-ui): name a pending steer's model only when it changes - #59310

Merged
opencode-agent[bot] merged 3 commits into
devfrom
victor/simpler-pending-meta
Oct 29, 2026
Merged

opencode-agent[bot] merged 3 commits into
devfrom
victor/simpler-pending-meta

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

A pending steer's meta line showed an icon and repeated the agent and model even when the steer kept the running turn's selection, so it read ◐ Pending · Claude Opus 5.5 High on almost every steer. It now names only what the steer changes. (#60208 has since removed the icon on dev; this PR keeps a test asserting Pending is plain text.)

  • The Pending label stays, with no icon.
  • The agent and model show only when they differ from the previous prompt's selection. A steer reconfigures the running turn as it's sent, so comparing against later replies would hide the change; the previous prompt's metadata (or, when it has none, its first reply) is the baseline.
  • Delivered messages are unchanged: they still show agent, model and time on hover.

Before: ◐ Pending · Claude Opus 5.5 High
After (same model): Pending
After (model changed): Pending · Claude Sonnet 4 Balanced

Tests

  • bun test src/timeline/projection.test.ts (new previousSelectionByID case)
  • bun run test:components for session-message-projection, session-timeline-mobile and session-timeline (21 passed)
  • bun run typecheck in packages/session-ui and packages/app
  • bun run lint:changed only reports three existing findings in budgetLimit in projection.ts, which this PR doesn't touch
  • The updated session-queue e2e assertion is in a test quarantined on beta, so I didn't run it locally

Requested by: @vimtor (victor via Slack)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't check this in a running app, but I found no problems in the code. The browser component tests can't start in this environment because a system library is missing (libnspr4.so), so I didn't see the meta line rendered. bun test src/timeline/projection.test.ts passes (22) and tsc --noEmit is clean in packages/session-ui.

In the code, the previous prompt's choice (its metadata, or its first reply) is the right baseline: a steer's own model switch doesn't hide the change, and several steers waiting in a row compare against the running turn. Delivered messages keep their full labels, and the test changes are small and clear.

Public API: unchanged (only internal session-ui component props and the projection's return value).

No blocking concerns. Since I couldn't render it here, before/after screenshots of the pending meta line, with the same model and with a changed one, would help reviewers.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit, which removes the icon from the Pending label, looks fine to me. The label is now plain text in the same slot, the unused icon styling is gone, and the component test was cut down to match. Every other test that looks up user-message-pending only checks whether it's visible or hidden, which still works.

I couldn't run the component tests here (the browser is missing a system library), so I haven't seen it rendered. bun test src/timeline/projection.test.ts and tsc --noEmit pass in packages/session-ui. A before/after screenshot of the pending meta line without the icon would help reviewers.

Public API: unchanged.

No new concerns.

@opencode-agent
opencode-agent Bot changed the base branch from beta to dev October 27, 2026 08:42
@opencode-agent
opencode-agent Bot force-pushed the victor/simpler-pending-meta branch from 5919cbe to 32a4714 Compare October 27, 2026 08:42
@vimtor
vimtor enabled auto-merge (squash) October 27, 2026 08:44

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push is a rebase onto dev. The pull request's own changes are the same as in my last review, apart from the conflict fix in the session-queue e2e test. There, dev's older assertion is replaced by the new ^Pending$ check, which is correct. On the rebased head, bun test src/timeline/projection.test.ts passes (22) and tsc --noEmit is clean in packages/session-ui. The component and e2e tests still can't run here because the test browser won't start.

Public API: unchanged.

No new concerns.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit only tidies budgetLimit to clear a lint warning. It returns the same values as before: nothing for other errors, the kind, and resetAt only when the reset time parses. On the new head, bun test src/timeline/projection.test.ts passes (22) and tsc --noEmit is clean in packages/session-ui.

Public API: unchanged.

No new concerns.

@vimtor
vimtor disabled auto-merge October 27, 2026 10:25

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push merges dev (the v2.2.0 release) into the branch. The pull request's own changes are the same as in my last review; in packages/session-ui the merge only changed the version in package.json. On the merged head, bun test src/timeline/projection.test.ts passes (22) and tsc --noEmit is clean in packages/session-ui.

Public API: unchanged.

No new concerns.

@opencode-agent
opencode-agent Bot force-pushed the victor/simpler-pending-meta branch from e6e952c to 894fa3b Compare October 29, 2026 13:03
@opencode-agent
opencode-agent Bot force-pushed the victor/simpler-pending-meta branch from 894fa3b to 323c8af Compare October 29, 2026 17:15
@opencode-agent
opencode-agent Bot merged commit 1eea2d4 into dev Oct 29, 2026
20 checks passed
@opencode-agent
opencode-agent Bot deleted the victor/simpler-pending-meta branch October 29, 2026 17:26
harishpixous-commits pushed a commit to harishpixous-commits/Harishcode that referenced this pull request Oct 30, 2026
…anges

Port of anomalyco/opencode#59310. The timeline projection now indexes the
previous prompt's selection; a pending steer whose agent and model match the
turn it joins shows Pending alone instead of repeating the current selection.

Not ported: upstream's budgetLimit cosmetic refactor (unrelated), and the
Pending-icon assertions in the shared component test - Harish Code's pending
indicator intentionally keeps its steer icon.

Baseline: new projection test fails without the fix (21 pass/1 fail);
passes with it (22/22; full timeline suite 93/93). Typecheck clean
(session-ui 278 files). Playwright component/e2e specs updated but not run
here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant