Skip to content

fix(chat-recovery): resume card retry keeps earlier results, sends once, mixed line fits - #50855

Merged
orca-remote-automation[bot] merged 6 commits into
mainfrom
fix/resume-card-retry-followup
Nov 27, 2026
Merged

orca-remote-automation[bot] merged 6 commits into
mainfrom
fix/resume-card-retry-followup

Conversation

@orca-remote-automation

@orca-remote-automation orca-remote-automation Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Follow-up to the one-line resume card (#50804). Retrying a failed agent no longer makes the agents that already resumed disappear from the card. A double click can't send the same resume twice. The "resumed + needs you" line fits at the narrowest width in every language.

What Changed

  • Retry keeps earlier results. A retry used to start a fresh run that replaced the settled one, so agents the first attempt resumed vanished from the report. They now stay listed as resumed while the retry runs, and are folded back into the run when it settles. Visibility, the status bar and the finished report all see an ordinary run.
  • One action at a time. Resume and dismiss each own the card until they settle. Anything activated meanwhile (a second Retry, another row's action, a dismissal) sends nothing; it's checked before any await, so it also holds within a single tick. If the host starts chats itself at launch, that launch action waits its turn instead of being dropped or overlapping another action, and it carries earlier results forward.
  • No stale reasons. A row that is resuming or has resumed no longer shows why the previous attempt failed.
  • Mixed line fits. "Resumed N agents · M need you" now reads "Resumed N · M need you" so both counts stay whole at the 328px web width. Short forms were added for the 10 translated locales, and a few long "need you" strings were tightened. Measured with no clipping in all 11 locales at 328 and 416px.
  • The web typecheck failure on main (the Details variant) was fixed separately on main in fix(ui): restore the ghost-muted-disclosure Button variant #50816, so this PR leaves that button alone.

Checked against how comparable products handle this.

Linked Issue

N/A (maintainer follow-up to #50804)

Visual Proof

Component fixtures, 328px toast, light and dark.

State Light Dark
3 agents, Details collapsed
3 agents, Details expanded
After Retry: two earlier successes kept while resuming
Retry settled
Resumed + needs you (en)
Resumed + needs you (de)
Resumed + needs you (tr)

Testing

  • I manually tested these changes locally: Playwright drove component fixtures with real clicks and keyboard (36/36). Retry with two prior successes keeps them; a same-tick double click or Enter twice sends once; the left-for-person agent is never sent; a resuming row shows no stale reason; de/tr mixed line whole at 328px; light and dark.
  • Automated tests added: native-chat-restart-occurrence.test.ts drives the real store with only host IO mocked. It covers a repeated or overlapping activation sending once, a dismissal and a resume never overlapping, the host's launch action waiting its turn (including when another action takes the turn at the handoff, and on dispose), and earlier successes surviving a retry. native-chat-resume-run.test.ts covers the run hand-off and settle fold.
  • Every added test fails without this change (checked by reverting each guard)

pnpm check:changed passes; pnpm tc:web passes.

Performance

None measurable. A few array filters over the toast's rows (tens at most) per action, and one promise per resume/dismiss action. Nothing runs on a timer or in a hot path.

… mixed line fits

A retry replaces the run, so chats earlier runs resumed are carried in
resumedBefore and stay in the report. A chat an in-flight action is already
resuming is filtered out before any await, so a double activation sends once.
The resumed-plus-needs-you line uses a bare count so both stay whole at 328px.
…rlier successes back

Any continue while an action is in flight sends nothing, so a second Retry or
an overlapping row action cannot orphan the first. Earlier successes ride on
the in-flight run and rejoin its entries when it settles, so visibility, the
status bar and release see an ordinary run. A row being resumed again hides
its previous failure reason.
…reasons dropped at the view

A dismissal and a resume never overlap: whichever starts second sends nothing.
Rows that are resuming or resumed no longer carry the last attempt's failure.
The host already started those chats, so the in-flight gate never drops it.
…f overlapping

Action ownership moves into a small turn module: continue and dismiss own the
occurrence one at a time, and a launch action the host already took waits for
the owner to settle, then carries its results forward.
@orca-remote-automation
orca-remote-automation Bot merged commit dd066f1 into main Nov 27, 2026
55 checks passed
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.

0 participants