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
Concise switch resets to off on composer remount #1650
Problem — The composer's Concise switch (#1633) resets to off whenever the composer remounts. Starting a chat with it on loses the setting once the first message creates the session (the new-chat composer is replaced by the session composer), and opening the Changes tab in a narrow layout unmounts and remounts the composer. Flipping it mid-chat appears to work only because nothing remounts afterwards. The switch is described as a per-session setting but is actually per-component-instance state. Approach — Hold the flag in a small in-memory store keyed per session (server scope + directory + session id), with a draft key for the new-chat composer that is promoted to the real session key at session creation — the same moment the draft's agent/model selection is promoted today. Scope — in: flag survives composer remounts, the new-chat → session handoff, and session switching; each session keeps its own value. · out: persistence across app reloads, a global default, any change to what the directive says or how it is sent. Assumptions — In-memory lifetime (reset on reload) is acceptable; the existing session-creation path is the single point where a draft becomes a session.
Acceptance Criteria
Switching Concise on in a new chat and sending the first message leaves it on in the resulting session.
Opening and closing the Changes tab (narrow/mobile layout) does not change the switch.
Two sessions hold independent values; switching between them restores each one's value.
If session creation fails, the draft's value is retained for the retry.
A session with no recorded value reads as off.
Key Decisions
Lifetime: per session, in memory. Persisting to disk was considered and deferred — it would also need a migration story for a turn-shaping flag.
Own store, not the model/agent selection state. That state is persisted and owns picker concerns; folding a turn-shaping flag into it couples unrelated settings and contradicts the in-memory decision.
Lifting the signal into the session layout was rejected — it fixes the Changes-tab remount but not the new-chat → session handoff.
Important
Problem — The composer's Concise switch (#1633) resets to off whenever the composer remounts. Starting a chat with it on loses the setting once the first message creates the session (the new-chat composer is replaced by the session composer), and opening the Changes tab in a narrow layout unmounts and remounts the composer. Flipping it mid-chat appears to work only because nothing remounts afterwards. The switch is described as a per-session setting but is actually per-component-instance state.
Approach — Hold the flag in a small in-memory store keyed per session (server scope + directory + session id), with a draft key for the new-chat composer that is promoted to the real session key at session creation — the same moment the draft's agent/model selection is promoted today.
Scope — in: flag survives composer remounts, the new-chat → session handoff, and session switching; each session keeps its own value. · out: persistence across app reloads, a global default, any change to what the directive says or how it is sent.
Assumptions — In-memory lifetime (reset on reload) is acceptable; the existing session-creation path is the single point where a draft becomes a session.
Acceptance Criteria
Key Decisions
Constraints & Invariants
Prior Art
Source
Follow-up to #1633 · Related: #1330 (parked response-presentation epic)