Repository navigation
Conversation
…locks its runtime After the first reply, the composer's CLI picker was removed entirely, so a running conversation gave no visible indication of which runtime it was bound to. Keep the picker rendered, disable it, and show the bound runtime with a tooltip explaining that switching requires a new conversation. - App.jsx: render the CLI picker whenever more than one executor exists; when the conversation is pinned to an executor, disable it and set the tooltip, leaving the model, effort and approval pickers untouched. - PermissionPicker: add disabled/title support so a locked picker keeps its current value but never opens its menu. - styles.css: style the disabled selector as non-interactive. - app-render.test.jsx: assert the locked picker is present and disabled, and add a regression test that a locked picker cannot open its menu.
Review of Tencent#1126 found two P2 gaps in the disabled-state handling: - The menu's aria-hidden/inert still read the raw `open` prop, so a picker disabled while open left its closing menu (mounted during the close animation) accessible, and `choose` had no disabled guard, so a focused option could still fire onSelect via Enter. - The focus and outside-click effects keyed on `open` in their dependency arrays, so a disabled toggle did not clean up a queued focus RAF or the outside listeners. Unify on `effectiveOpen`: menu aria-hidden/inert, effect dependencies, and keyboard handling all check it; `choose` refuses while disabled; and a disabled picker that is still open notifies the parent to close it so re-enabling cannot reopen a menu the user did not ask for. Add a regression suite covering the open -> disabled transition. Also add the `internal` sparse-checkout directory so the chatbot suite's devserver-cookie/composer-operations/element-picker tests (which read internal/** sources) run; the full suite now passes 57 files / 409 tests.
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.
What changed
Issue #1118: after the first reply, the composer's CLI picker was removed entirely, so a running conversation gave no visible indication of which runtime it was bound to. This keeps the picker rendered but disabled, showing the bound runtime with a tooltip that switching requires a new conversation.
chatbot/src/App.jsx: render the CLI picker whenever more than one executor exists. When the conversation is pinned to an executor, disable it and set the tooltip; the model, effort and approval pickers are untouched, and the session stays locked to the same executor.chatbot/src/PermissionPicker.jsx: adddisabled/titlesupport so a locked picker keeps its current value visible but never opens its menu. The disabled state is applied uniformly via aneffectiveOpenvalue: the menu'saria-hidden/inert, the focus and outside-click effect dependencies, and keyboard handling all check it;chooserefuses while disabled; and a picker disabled while open notifies the parent to close it, so re-enabling cannot reopen a menu the user did not ask for.chatbot/src/styles.css: style the disabled selector as non-interactive (muted color, not-allowed cursor, no hover change).chatbot/tests/app-render.test.jsx: update the locked-state assertion from "button removed" to "button present and disabled", and add a regression test that a locked picker cannot open its menu.chatbot/tests/permission-disabled.test.jsx: regression suite for the open -> disabled transition (menu hidden/inert, parent closed, no choice from a focused closing menu, trigger cannot open).Scope / not changed
Verification
chatbotvitest suite: 57 files / 409 tests passed, 0 failed. Thedevserver-cookie,composer-operationsandelement-pickertests readinternal/**sources; after adding theinternalsparse-checkout directory to this worktree, all three pass (the earlier failures were sparse-checkout gaps, not repo baseline failures).chatbotvite build: passes.disabled, carries the tooltip, showsPi, the header badge showsPi, and no console errors. Script:loopforge-team/pi/loopforge-1118-qa.mjs; screenshots inloopforge-ui-evidence/cli-visibility-*.png.