fix(desktop): stabilize composer during session switches and resizing - #5513
Draft
colaforniaw wants to merge 2 commits into
Draft
colaforniaw wants to merge 2 commits into
colaforniaw wants to merge 2 commits into
Conversation
colaforniaw
force-pushed
the
fix/composer-session-switch-stability
branch
7 times, most recently
from
September 22, 2026 02:27
0b97612 to
fd18a8a
Compare
colaforniaw
force-pushed
the
fix/composer-session-switch-stability
branch
11 times, most recently
from
September 23, 2026 10:37
45e6d3a to
616208e
Compare
colaforniaw
force-pushed
the
fix/composer-session-switch-stability
branch
2 times, most recently
from
September 23, 2026 13:15
6665804 to
2dbebdd
Compare
colaforniaw
force-pushed
the
fix/composer-session-switch-stability
branch
from
September 23, 2026 14:33
2dbebdd to
c5897dd
Compare
me2seeks
reviewed
Sep 27, 2026
me2seeks
left a comment
Contributor
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent operated by me2seeks make. It is not an independent human review and does not replace one.
Summary
Stabilizes the Composer across Session switches (permission/usage/model controls no longer flash stale state or unmount) and reworks the footer layout with a 520px conversation floor so narrow widths clip instead of reflowing into Send. The issues are real and the direction (state keyed to session/model/provider, layout floor in a shared token) is right; most changes are well tested.
Findings
- [P2]
dismissCompanionCopy's idle-wait never observes the dominant idle shape. The break conditionsession.runningTurnIds?.length === 0(apps/desktop/src/renderer/features/workbar/tools/side-chat/quote-companion-core.ts:222) is false when the key is absent — and the catalog omitsrunningTurnIdsfor idle sessions (apps/desktop/src/main/runtime-host-session-catalog-ipc-main.ts:512-518 returns the summary unchanged when the live list is empty; asserted absent at apps/desktop/src/main/tests/runtime-host-session-catalog-running-turns.test.ts:55;session-local-service.ts:265sets itundefinedfor cached sessions). So whenstophas already retired the turn — the common case — the loop spins all 40 attempts (~2s, 40listSessionsIPCs) before attempting cleanup. The new test's fake explicitly includesrunningTurnIds: [](apps/desktop/src/main/tests/quote-companion-disposal.test.ts:102), so it passes while production eats a fixed ~2s dismissal stall. Fix:(session.runningTurnIds?.length ?? 0) === 0, and make the fake omit the key in its idle response. - [P3]
.maka-composer-send-slotis declared twice with identical properties (apps/desktop/src/renderer/styles/composer.css:331 and :342) — dead duplicate from the two stacked comment blocks; keep one. - [P3] The floating-WorkHub thinking-level sheet e2e block was deleted from apps/desktop/e2e/workhub-layout.spec.ts (old lines ~212-224) with no replacement for sheet interaction/viewport fit; the new
NarrowComposerFooterstory only asserts the field stays visible. Either restore equivalent coverage or note why it is no longer valid.
Verdict
needs-changes — finding 1 adds a guaranteed ~2s stall on a reachable user flow, and the PR is still a draft.
Open
12 of 38 tasks
This branch has not been deployed
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.
Summary
Switching Sessions could briefly show controls from the previous Session, while narrow Composer widths could compress the footer into the send button. An empty Composer could also show the branch icon through the translucent disabled Send button.
This change keeps the Composer footer on one row with a 520px minimum conversation width, preserves fixed space for Send, prevents stale session branch state from painting during a switch, and gives the Send/Stop slot an opaque backing while keeping the existing disabled appearance.
The Workbar remains under user control; narrow widths do not automatically move or collapse it.
Before / After
responsive-before.mp4
after-responsive.mp4
workhub-before.mp4
workhub-responsive-after.mp4
switch-before.mp4
switch-after.mp4
Review Focus
The Composer/session-switch fixes are the scope of this PR. The following narrow-screen behavior is a known limitation and is intentionally not solved here:
Follow-up
Open a separate PR for responsive sidebar behavior:
This keeps the current PR focused on Composer and session-switch correctness while giving narrow windows the product behavior users expect: sidebar visible when wide and automatically hidden when narrow.
Verification
git diff --checkpassed.npm --workspace @maka/desktop run check:architecture -- --base d0dd3edf202f120c5ea950825160dfd02b426145 --strict-basepassed, including 112 architecture checker tests.packageandtestchecks passed.design-system-functional-motion--retained-functional-motionstory still reports one CSS animation where zero is expected.AI use
Tool(s) and scope: Codex assisted with the Composer behavior, layout, usage state, and regression coverage. The commit carries
Generated-by: Codex.Checklist
Does this PR entail a change in behavior?