gut(ui): strip model-fallback UI dead wiring (#2549)#2554
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 24, 2026
Merged
Conversation
#2549) The backend fallback-state stub returns `{}`/`undefined`, so the guarded emit branches in `agent-runner.ts` never fire. The UI handler stack, toast indicator, state field, and CSS rules are dead wiring — remnants of the incomplete #2130 cleanup (#2529 F2). Removals (UI-side only; backend cleanup deferred per issue scope): - `app-tool-stream.ts`: `FallbackStatus` type, `FallbackAttempt` type, parse helpers, `handleLifecycleFallbackEvent`, `lifecycle`/`fallback` dispatcher branch, `FALLBACK_TOAST_DURATION_MS`, fallback fields on `CompactionHost`, and now-dead locals (`toTrimmedString`, `resolveModelLabel`, `resolveAcceptedSession`) - `app-tool-stream.node.test.ts`: deleted (100% fallback tests) - `app-view-state.ts`: removed `fallbackStatus` field + import - `views/chat.ts`: removed `FallbackIndicatorStatus`, `ChatProps.fallbackStatus`, `renderFallbackIndicator`, toast constant, call-site - `views/chat.test.ts`: removed 3 obsolete `renderFallbackIndicator` tests and default `fallbackStatus: null` prop - `app.smoke.test.ts`: updated `COMPACTION_HOST` doc comment to reflect remaining two optional fields - `styles/components.css`: removed `.compaction-indicator--fallback` and `--fallback-cleared` rules Net: 461 deletions, 3 insertions across 7 files. Verification: - `pnpm check` (format, tsgo, oxlint, css-class-drift): green - `pnpm test:ui:smoke`: 12/12 pass - AC grep (`fallbackStatus|FallbackStatus|FallbackIndicatorStatus|handleLifecycleFallbackEvent|renderFallbackIndicator|parseFallbackAttempt` across `ui/src`): 0 matches Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2549.
Summary
after the backend fallback-state module was stubbed to return
{}duringthe Pi-era cleanup. The guarded emit branches in
agent-runner.tsneverfire, so
handleLifecycleFallbackEvent, the toast indicator, and theAppViewState.fallbackStatusfield have no live producer.the fallback UI indicators but missed the handler, the state field, the
CSS rules, and the test scaffolding.
beyond the issue body:
views/chat.test.ts(3 obsolete tests + defaultprop) and
app.smoke.test.tscomment — both required for the AC grep toreturn empty.
What was removed
ui/src/ui/app-tool-stream.tsFallbackStatus/FallbackAttempttypes,parseFallbackAttempt{Summaries,s},handleLifecycleFallbackEvent,lifecycle/fallbackdispatcher branch,FALLBACK_TOAST_DURATION_MS, fallback fields onCompactionHost, now-dead private helpers (toTrimmedString,resolveModelLabel,resolveAcceptedSession)ui/src/ui/app-tool-stream.node.test.tsui/src/ui/app-view-state.tsFallbackStatusimport +fallbackStatusfieldui/src/ui/views/chat.tsFallbackIndicatorStatus,ChatProps.fallbackStatus,renderFallbackIndicator, toast constant, call-siteui/src/ui/views/chat.test.tsfallbackStatus: nullpropui/src/ui/app.smoke.test.tsui/src/styles/components.css.compaction-indicator--fallback+--fallback-clearedrulesWhat stays
src/auto-reply/fallback-state.ts) + guarded emit branches insrc/auto-reply/reply/agent-runner.ts— explicitly out of scope per theissue body ("separate follow-up"). The stub already returns empty, so
nothing emits regardless.
(
app-render.ts), default agent ID fallback (app-chat.ts), display-namefallbacks (
app-render.helpers.ts), channel-status fallbacks(
src/commands/onboard-channels.ts).Test plan
pnpm check— format,tsgo,oxlint(0/0),no-random-messaging,no-remoteclaw-ai,css-class-drift(0 orphans, 0 clusters)pnpm test:ui:smoke— 12/12 pass (8 inapp.smoke.test.ts, 4 inapp.computed-style.test.ts)chat.test.tsretained tests (7/7) pass after removing the 3 fallback casesfallbackStatus|FallbackStatus|FallbackIndicatorStatus|handleLifecycleFallbackEvent|renderFallbackIndicator|parseFallbackAttemptacrossui/srcreturns 0 matches (also clean acrossdocs/andextensions/)Related
🤖 Generated with Claude Code