Conversation
) Restore conditional rendering of EngineSelect for unlocked/imported employees in TurnPanel conversation header while preserving the static EngineBadge for locked employees. Refs #322, R1.
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.
Tracking record
Closes #322
Summary
In PR #300 (#297, commit
8985c2f),TurnPanel.tsxrefactored the conversation header to display a fixed Agent identity badge (<EngineBadge>), droppingengineLockedandonSelectEnginefrom parameter destructuring under the assumption that Agent selection only occurs during employee creation viaHireDrawer.This broke the contract established in PR #289 (
feat(runtime): lock initial Agent selection (#289), commit2feefda) for externally imported digital employees. When an employee is imported from an external kit or showcase without pre-locked bindings (agentLocked: false), they never pass throughHireDrawer. Consequently, operators had no UI affordance in the conversation header to select an initial runtime.This PR restores the conditional rendering of
<EngineSelect>whenengineLockedisfalse, while preserving the noninteractive<EngineBadge>display for locked positions (engineLocked: true).Acceptance criteria
engineLocked: false), the conversation header renders an interactive<EngineSelect>component permitting initial runtime selection.TurnPanel.tsx:248-260, covered byTurnPanel.test.tsxandApp.test.tsx<EngineSelect>dispatchesonSelectEngine, which persists the choice, locks the position (engineLocked: true), and transitions the UI to the static<EngineBadge>display.TurnPanel.tsx:258,App.tsx:1027-1049(changeEmployeeAgentEngine)engineLocked: true), the header renders<EngineBadge>with no interactive dropdown.TurnPanel.tsx:250-252,TurnPanel.test.tsx:121-155TurnPanel.test.tsx(27/27),conversation-interaction.test.tsx(18/18),App.test.tsx(81/81),npm run typecheck:renderer(0 errors),npm run build:rendererValidation ledger
npm run typecheck:renderertsc --noEmit -p apps/desktoppassednode scripts/run-renderer-tests.mjs apps/desktop/renderer/test/TurnPanel.test.tsx#322 renders EngineSelect for an unlocked position and EngineBadge when lockednode scripts/run-renderer-tests.mjs apps/desktop/renderer/test/conversation-interaction.test.tsxshows an interactive EngineSelect when engineLocked=falsenode scripts/run-renderer-tests.mjs apps/desktop/renderer/test/App.test.tsx -t "Agent"#322 opens an unlocked employee direct conversation with an interactive Agent Host selectornpm run build:renderervite build --config apps/desktop/vite.config.tsbuilt in 12.40sTests and coverage
apps/desktop/renderer/test/TurnPanel.test.tsx: Added#322 renders EngineSelect for an unlocked position and EngineBadge when locked.apps/desktop/renderer/test/conversation-interaction.test.tsx: Separated locked (true/undefined) assertions from unlocked (false) interactive assertions.apps/desktop/renderer/test/App.test.tsx: Added#322 opens an unlocked employee direct conversation with an interactive Agent Host selectorand aligned persisted binding tests withagentLocked: true.Change classification
Risk and rollback
TurnPanel.tsx.git revertthis commit.Breaking or security notes
None
Author checklist
GOVERNANCE.md.Reviewer notes
Extra scrutiny should focus on:
engineLocked: true) continue to display the fixed<EngineBadge>without dropdown affordances.engineLocked: false) display<EngineSelect>, and once selected, transition permanently to the locked badge.