Skip to content

fix(agent-designer): release picker locks on new chat + show only bound tools/skills#606

Merged
philmerrell merged 2 commits into
developfrom
fix/agent-lock-release-and-filter
Jul 9, 2026
Merged

fix(agent-designer): release picker locks on new chat + show only bound tools/skills#606
philmerrell merged 2 commits into
developfrom
fix/agent-lock-release-and-filter

Conversation

@philmerrell

Copy link
Copy Markdown
Contributor

Two follow-up fixes to the chat-input agent-binding locks (#603), from Phil's testing.

1. Locks not released on "New chat" (bug)

The picker locks live in root singleton services (ModelService/ToolService/SkillService) that outlive the session component. "New chat" navigates to /, recreating the session component with fresh assistant()/agent() signals (both null). The lock-release sat inside the if (loadedAssistant || … || agent()) guard — false on the fresh component — so the stale locks from the previous agent conversation were never released, leaving the model + tool pickers stuck.

Fix: move clearAgentBindingLocks() out of the guard so it always runs when there's no assistant in the URL (idempotent).

2. Filter the settings to only the bound tools/skills (enhancement)

When an agent locks the settings, the panel listed every accessible tool/skill (bound ones on, rest greyed off) — long and noisy. Now it shows only the bound tools/skills, via ToolService.visibleTools / SkillService.visibleSkills computeds (agent-locked → filter to the bound ids; otherwise the full list). The banner + disabled toggles remain.

Verification

  • Service specs updated (+2), ng test green (50 in the affected specs)
  • tsc clean; production build (AOT template validation) clean
  • No local preview (needs backend + AGENTS_API_ENABLED + auth) — manual test: chat an agent with bound tools → open settings (only bound tools show, locked) → click New chat → confirm model + tool pickers are free-select again.

🤖 Generated with Claude Code

philmerrell and others added 2 commits July 8, 2026 21:04
The agent-binding picker locks live in root singleton services (Model/Tool/Skill
Service) that outlive the session component. Clicking "New chat" navigates to `/`,
which recreates the session component with fresh assistant()/agent() signals (both
null). The lock-release lived inside the `if (loadedAssistant || … || agent())`
guard, which is false on that fresh component — so the stale locks from the previous
agent conversation were never released, leaving the model + tools pickers stuck.

Move `clearAgentBindingLocks()` out of the guard so it always runs when there is no
assistant in the URL. Idempotent — a no-op when nothing is locked.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…locks the settings

When an Agent dictates a fixed toolset/skillset, the settings panel listed every
accessible tool/skill with the bound ones toggled on and the rest greyed off — a long,
noisy list. Filter to show ONLY the bound (enabled) tools/skills so the panel reflects
exactly what the agent uses.

- ToolService.visibleTools / SkillService.visibleSkills: agent-locked → filter to the
  bound ids; otherwise the full accessible list.
- model-settings template iterates the visible* lists.

Tests: +1 tool-lock, +1 skill-lock spec (ng test green); tsc + AOT build clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@philmerrell philmerrell merged commit 360ea31 into develop Jul 9, 2026
4 checks passed
@philmerrell philmerrell deleted the fix/agent-lock-release-and-filter branch July 9, 2026 03:25
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