Skip to content

feat(agent-designer): lock preview model picker; trim preview nav#611

Merged
philmerrell merged 1 commit into
developfrom
feature/agent-preview-model-lock-nav-trim
Jul 9, 2026
Merged

feat(agent-designer): lock preview model picker; trim preview nav#611
philmerrell merged 1 commit into
developfrom
feature/agent-preview-model-lock-nav-trim

Conversation

@philmerrell

Copy link
Copy Markdown
Contributor

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 singleton ModelService. 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's heroLockClosed "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.

  • AgentPreviewComponent now takes a modelId input and locks/clears ModelService via an effect, releasing the lock in ngOnDestroy. The session page's self-heal effect also clears it idempotently on the next plain chat.
  • agent-form.page.html passes the live selectedModelId(), 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 --noEmit clean.
  • ng test sidenav spec — 14/14 pass.
  • Manual: in the Designer, set model to Haiku → preview picker shows Haiku locked (no dropdown); switching the form model updates the locked picker; clearing the model returns it to free-select; navigating to a plain chat does not leave the main picker locked.

🤖 Generated with Claude Code

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>
@philmerrell philmerrell merged commit 897353f into develop Jul 9, 2026
4 checks passed
@philmerrell philmerrell deleted the feature/agent-preview-model-lock-nav-trim branch July 9, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant