You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Context-compaction running toast is not settled on error / abort / replacement reconnect #4854
The running "Compacting context…" toast (apps/desktop/src/renderer/app-shell-context-compaction.ts, opened with duration: 0) is only dismissed when a complete event carries a contextCompactionOutcome. The other supported terminal / recovery paths do not carry that field, so the toast is left permanently visible after the compaction row has ended:
user stops the compaction → abort
a thrown backend failure → error
a reconnect after a later root replaced this run → seedStoredTerminal
The fix has to settle the toast from the legacy AppShell: the presentation lives in app-shell-context-compaction.ts, and its error / abort wiring would go in the session-event dispatch (app-shell-session-events.ts + app-shell.tsx). The check-renderer-architecture --base monotonic-debt ratchet forbids any nonTriviaTokens increase on those legacyAppShell.files entries, and the dispatch has no non-legacy seam — so the wiring cannot land in #3651 without growing that debt.
Proposed approach
Extract the compaction presentation and its event handling out of the legacy AppShell into a feature module, then settle the specific running compaction on error and abort, and preserve the canonical outcome on replacement recovery (seedStoredTerminal). Regression cases to add: started → error, started → abort, and an old compaction replaced before reconnect.
Activity
liuxiaocs7 commentedon Sep 5, 2026
take
feat(desktop): show context compaction in transcript (#3651)