feat(agent-designer): lock preview model picker; trim preview nav#611
Merged
Merged
Conversation
The Agent Designer preview reused the main chat-input, whose model dropdown reads the root ModelService — so it showed the user's global model (e.g. Sonnet 5) and let them switch it, even though the harness resolves the model from the agent's binding server-side. Wire the preview to lock that picker to the agent's model via the same lockToAgentModel mechanism the session page uses for a real agent conversation, released on destroy (and idempotently on the next plain chat via the session page's self-heal effect). Also hide the Memory Spaces and Scheduled Runs side-nav entries for now (routes/pages and their capability probes are unchanged, so re-enabling is just re-adding the template blocks). Agents stays system-admin only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Two changes packaged together for the Agent Designer preview surface.
1. Lock the preview chat's model picker to the agent's model
The Agent Designer's live preview reuses the main
<app-chat-input>, whose<app-model-dropdown />reads the root singletonModelService. In the designer that picker showed the user's global model (e.g. Sonnet 5) and let them switch it — misleading, since the harness resolves the model from the agent's binding server-side regardless of the picker.The locked-picker UX already existed (
ModelService.lockToAgentModel+ the dropdown'sheroLockClosed"This agent runs on a fixed model" state) and is applied by the session page for real agent conversations; the designer preview just never wired it up.AgentPreviewComponentnow takes amodelIdinput and locks/clearsModelServicevia an effect, releasing the lock inngOnDestroy. The session page's self-heal effect also clears it idempotently on the next plain chat.agent-form.page.htmlpasses the liveselectedModelId(), keeping the picker consistent with the capability strip above it.2. Trim preview side-nav entries
Hide Memory Spaces and Scheduled Runs from the side nav for now. Agents stays (already system-admin only). Routes/pages and the capability probes are unchanged, so re-enabling is just re-adding the two template blocks.
Testing
tsc --noEmitclean.ng testsidenav spec — 14/14 pass.🤖 Generated with Claude Code