Repository navigation
fix(ui): disable permission-mode picker while the composer awaits a permission decision - #822
Merged
Astro-Han merged 1 commit intoJul 12, 2026
Conversation
…ermission decision The composer's PermissionModeSelect disabled condition keyed off `permissionModePending` and `permissionModeDisabledReason` but not `props.disabled`. `props.disabled` is driven by `Boolean(activePermission)` in app-shell.tsx, while `permissionModeDisabledReason` is keyed off `activeSessionForView?.status === 'waiting_for_user'` — and the two are NOT fully coupled. A pending permission can set `props.disabled` before the session status flips to `waiting_for_user`, leaving a window where the composer is frozen (permission-hint pulsing, attach button + textarea disabled) but the mode picker stays clickable. Letting the user reconfigure the global permission mode mid-decision is incoherent (it doesn't resolve the pending tool call) and breaks the freeze-state symmetry. Add `props.disabled` to the Select's disabled condition so the picker respects the composer's own frozen state directly, not only the separately-computed disabledReason. CDP-verified on the live `permission-destructive` fixture: before the guard the Select trigger read `disabled=false`, `pointer-events:auto`; after, `disabled=true`, `pointer-events:none`, `opacity:0.45`. The `model-processing` (streaming) case is unchanged — still disabled via the disabledReason streaming branch, no regression. Updated `session-status-presentation` contract to pin the new disabled expression with a comment documenting the gap. Found by the #546 Composer combined-state audit. Refs #546
7 tasks
Astro-Han
deleted the
fix/composer-permission-select-disabled-during-wait
branch
July 14, 2026 05:05
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
props.disabledto thePermissionModeSelectdisabled condition in the composer, so the mode picker is non-clickable while the composer is frozen awaiting a permission decision.session-status-presentationcontract to pin the new disabled expression.Why
The composer's
PermissionModeSelectdisabled condition keyed offpermissionModePendingandpermissionModeDisabledReasonbut notprops.disabled.props.disabledis driven byBoolean(activePermission)in app-shell.tsx, whilepermissionModeDisabledReasonis keyed offactiveSessionForView?.status === 'waiting_for_user'— and the two are NOT fully coupled. A pending permission can setprops.disabledbefore the session status flips towaiting_for_user, leaving a window where the composer is frozen (permission-hint pulsing, attach button + textarea disabled) but the mode picker stays clickable. Letting the user reconfigure the global permission mode mid-decision is incoherent (it doesn't resolve the pending tool call) and breaks the freeze-state symmetry. Found by the #546 Composer combined-state audit. Refs #546.Scope
disabledonPermissionModeSelectinpackages/ui/src/composer.tsx. No other composer behavior or surface.disabledReasontooltip path is unchanged — it still explains mode-pending / streaming / running / waiting;props.disabledadds a direct freeze guard without changing tooltip copy.Verification
session-status-presentationcontract was updated to assert the new disabled expression first; it failed against the current source, then passed after the one-prop fix.npm run -w @maka/desktop test— 2346/2346 pass.npm run -w @maka/desktop typecheck+test:checks(console/a11y/copy) — clean.permission-destructivefixture (light-990-motion): before the fix the Select trigger readdisabled=false,pointer-events:auto(clickable); after,disabled=true,pointer-events:none,opacity:0.45(disabled). Themodel-processing(streaming) fixture is unchanged — still disabled via the disabledReason streaming branch, no regression. Substitute evidence for a state-dependent behavior change per the repo's "interaction behavior: disabled checks" guidance.Impact
User-visible: the permission-mode picker is no longer clickable while a tool permission is pending — consistent with the attach button and textarea, already disabled in that state. No API, storage, or migration change.
Reviewer notes
props.disabledandpermissionModeDisabledReasonare computed from different slices (permission state vs session status) and can diverge for a moment when a permission request lands. The fix makes the picker respect the composer's owndisabledstate directly rather than relying on the separately-computed reason to happen to cover the same case.Ready for review
Verificationexplains why it is not applicable (state-dependent disabled swap; substitute evidence above)