fix(web): a later thread error with the same text shows its banner again #37419
main fromrefs/pull/37419/head·merged by shivamhwp(GitHub profile, opens in a new tab) View on GitHubProblem#
Dismissing a thread's error banner hid every later failure with the same text. The dismissal was keyed only by thread and error text, so a later turn that failed the same way showed no banner.
Change#
The thread runtime summary now says which record its lastError came from (lastErrorSource), and the banner's dismissal key includes it.
- A run failure, or a session error that repeats it, is keyed by the run's root failure item and its failure time.
latestRootProviderFailureItemreturns the item the existing failure scan already picks, so nothing extra is scanned. A retried run that fails again gets a new failure time, and a new run's failure gets a new item. - Session timestamps are not used. Providers rewrite them on unrelated updates, such as extension status or model changes, which would bring a dismissed banner back.
- Any other session error belongs to the latest run that failed or completed, ranked by ordinal like the presented run. It takes that run's failure item when the text matches and the run otherwise, so a newer run starting while the session still holds the old error keeps the dismissal.
- A local send error keeps its text-only key. A local copy of the runtime error shares the runtime's key, so one dismissal hides both.
Closes https://github.com/pingdotgg/t3code/issues/37388. Builds on #6123, which added the dismissal this change scopes per failure.
Verification#
- Web client,
vp run scenarios:proveagainst475ae52ac2(base) andbda298fb8c(head; the final head only reuses an already-found failure item), on the Replay (dev) provider. The project folder is moved away so each send fails with the same workspace-folder error. The banner is dismissed after the first failure, then another message is sent.- Base: after the second identical failure, no banner shows.
- Head: after the second identical failure, the banner shows again.
vp run check:changedpasses: format, lint, knip, typecheck, the tests beside the change, and the React Compiler check.- The existing root-failure case in
threadExecution.test.tsnow pins the source rules: a refailed item gets a new key, an item rewrite that keeps its failure time does not, a session repeating the failure keeps the item's key, and another session error keeps the ended run's key while a newer run starts.
Not shown: a retried workspace preparation that fails again, the session-error cases, and a local copy of the runtime error are covered by unit tests only. Desktop renders the same web bundle and has no code of its own in this change, so it was not run separately. Mobile reads the runtime summary but not this field.
Model: Claude Haiku 5.5, then Claude Opus 5.5, in the Claude Code harness.
🤖 Generated with Claude Code
Base 475ae52ac2: after the banner was dismissed, the second identical failure shows no banner.
Head bda298fb8c: after the banner was dismissed, the second identical failure shows its banner again.
Base run:
https://github.com/user-attachments/assets/2faf2142-78c4-425e-b137-4d13b1917bd8
Head run:
https://github.com/user-attachments/assets/dddc92f2-17ce-4b71-81b7-3a7ba9b4177c
- 1
- 2
- 3
Pushed393b0ab
Pushed785fa63
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.