Skip to content

feat(studio): Coding agent split selection - #435

Merged
dmariali merged 2 commits into
mainfrom
coding_agent_split_selection
Jun 24, 2026
Merged

feat(studio): Coding agent split selection#435
dmariali merged 2 commits into
mainfrom
coding_agent_split_selection

Conversation

@dmariali

@dmariali dmariali commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-24 at 12 54 48 PM

Summary by CodeRabbit

  • New Features
    • Added Studio UI navigation suggestions that link users to relevant destinations based on their prompt (including guardrails and evaluation workflows).
    • Introduced a pre-run choice that lets users either continue in chat or open the suggested Studio UI.
    • Updated the chat thread UI to present “Open Guardrails” vs “Continue in chat” when applicable.
  • Bug Fixes
    • Prevented navigation requests and run state from carrying over across prompts or session loads; cancels cleanly when a run is aborted.
  • Tests
    • Expanded coverage for suggestion matching and the before-run decision/cancel flow.

@dmariali
dmariali requested review from a team as code owners June 24, 2026 14:28
@dmariali dmariali changed the title Coding agent split selection feat(studio): Coding agent split selection Jun 24, 2026
@github-actions github-actions Bot added the feat label Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8568ef6a-79e1-45df-80b4-806cbcc5e46f

📥 Commits

Reviewing files that changed from the base of the PR and between 50d3b03 and dcc0dbf.

📒 Files selected for processing (8)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeChatThread.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeChatThread.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.ts
🚧 Files skipped from review as they are similar to previous changes (8)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeChatThread.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeChatThread.tsx

📝 Walkthrough

Walkthrough

Adds prompt-based Studio UI navigation suggestions and a pre-run decision flow for Claude Code chat. Matching prompts can now pause execution, surface Studio navigation choices in the thread, and either continue the run or navigate away.

Changes

Studio UI Navigation Decision Flow

Layer / File(s) Summary
Suggestion catalog and matching
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.test.ts
Defines the navigation suggestion type, destination catalog, feature-flag gating, and prompt matching, with tests covering matching and disabled cases.
Before-run hook
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.test.ts
Adds the pre-run callback types and hook option, then awaits the callback during completion and cancels on reject, abort, or explicit cancel, with tests for continue and cancel paths.
Navigation request state
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.test.ts
Adds studio navigation decision types, pending request state, resolver helpers, pre-run suggestion handling, reset/session cleanup, and returned runtime fields, with runtime tests covering navigation and continue outcomes.
Chat thread navigation UI
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeChatThread.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeChatThread.test.tsx
Adds studio navigation choices, submit handling, scroll and running-indicator updates, and composer rendering for the navigation decision, with route-level UI tests.

Possibly Related PRs

Suggested Reviewers

  • htolentino-nvidia
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding a Studio-driven split between opening the UI and continuing in chat.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coding_agent_split_selection

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.ts`:
- Around line 95-98: The trigger patterns in studioUiNavigationSuggestions are
too broad and can catch normal coding requests. Tighten the regexes in the
suggestion list (including the token usage and annotation-related entries) so
they only match when paired with product-specific context like agent, intake,
workspace, or similar qualifiers. Update the matching logic in the relevant
suggestion arrays to avoid opening the Studio decision UI for generic code
prompts while preserving the intended navigation shortcuts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4bae6b5c-78d6-4ccf-a4bc-c81ce5aec337

📥 Commits

Reviewing files that changed from the base of the PR and between d8ea9e2 and 51cc70e.

📒 Files selected for processing (8)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/index.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/studioUiNavigationSuggestions.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.ts

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 20908/27474 76.1% 61.2%
Integration Tests 12109/26243 46.1% 19.5%

dmariali added 2 commits June 24, 2026 14:29
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@dmariali
dmariali force-pushed the coding_agent_split_selection branch from 50d3b03 to dcc0dbf Compare June 24, 2026 18:34
@dmariali
dmariali added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit 3800121 Jun 24, 2026
52 of 53 checks passed
@dmariali
dmariali deleted the coding_agent_split_selection branch June 24, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants