Skip to content

feat(studio): Copilot chat history - #1092

Merged
dmariali merged 13 commits into
mainfrom
copilot-chat-history
Aug 5, 2026
Merged

feat(studio): Copilot chat history#1092
dmariali merged 13 commits into
mainfrom
copilot-chat-history

Conversation

@dmariali

@dmariali dmariali commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • NeMo Copilot chat is now integrated throughout Studio, including dashboard, navigation, and floating chat.
    • Chat conversations persist across sessions and workspaces, with history loading and ownership protection.
    • Added conversation deletion with confirmation and support for starting a new chat after deletion.
    • Added Studio navigation suggestions based on chat prompts.
  • Bug Fixes
    • Improved restoration of missing or stale sessions without displaying unnecessary errors.
    • Preserved existing chat history and panel preferences during the Copilot transition.

Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@dmariali
dmariali requested review from a team as code owners August 5, 2026 15:34
@dmariali dmariali changed the title Copilot chat history feat(studio): Copilot chat history Aug 5, 2026
@github-actions github-actions Bot added the feat label Aug 5, 2026
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

Copilot conversations now use durable Entity Store persistence with workspace and owner checks, deletion, bounded request context, optimistic concurrency, and legacy history replay.

Studio chat routes, APIs, types, runtime, history UI, tool rendering, navigation, and tests now use Copilot-specific names and integrations.

The NeMo client now prefers NEMO_BASE_URL, with a loopback default in the container.

Possibly related PRs

Suggested reviewers: htolentino-nvidia, aray12

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding Copilot chat history support in Studio.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot-chat-history

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: 3

🧹 Nitpick comments (6)
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistoryPanelContents.tsx (1)

21-26: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add an explicit component return type.

HistoryPanelContents is an exported complex component. Declare its JSX.Element return type.

As per coding guidelines, “Use explicit return types for public APIs and complex functions in TypeScript.”

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistoryPanelContents.tsx`
around lines 21 - 26, Add an explicit JSX.Element return type to the exported
HistoryPanelContents component declaration, preserving its existing props and
implementation.

Source: Coding guidelines

web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistorySessionButton.tsx (1)

13-13: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use a type-only React import.

React only provides React.JSX.Element. Change this to import type React from 'react'.

As per coding guidelines, “Use import type for type-only imports in TypeScript.”

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistorySessionButton.tsx`
at line 13, Change the React import in HistorySessionButton.tsx to a type-only
import, since React is used only for the React.JSX.Element type.

Source: Coding guidelines

web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/api.ts (1)

58-59: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add an explicit return type.

getClaudeCodeHistorySessionsQueryKey is an exported API. Declare its readonly tuple return type.

As per coding guidelines, “Use explicit return types for public APIs and complex functions in TypeScript.”

🤖 Prompt for 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.

In `@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/api.ts` around
lines 58 - 59, Update the exported getClaudeCodeHistorySessionsQueryKey function
with an explicit readonly tuple return type matching its four elements: the two
string literals, the sessions literal, and the workspace string.

Source: Coding guidelines

services/studio/tests/unit/test_copilot.py (2)

310-322: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Assert the response status.

test_create_session_persists_workspace_and_owner reads response.json() without checking response.status_code. A 4xx response fails later with a confusing KeyError.

Proposed fix
+    assert response.status_code == 200
     session_id = response.json()["session_id"]
🤖 Prompt for 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.

In `@services/studio/tests/unit/test_copilot.py` around lines 310 - 322, Add an
explicit successful status assertion to
test_create_session_persists_workspace_and_owner immediately after the
service_client.post call, before reading response.json()["session_id"], while
preserving the existing persistence and owner/message assertions.

79-91: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the conflict and persistence-failure branches.

FakeEntityStore.delete discards expected_db_version, so the EntityConflictError → 409 branch in delete_session_history is untested. The EntityStoreError → streamed error branch in _stream_copilot is also untested.

Make the fake honor expected_db_version and raise EntityConflictError on mismatch, and add a test where update raises EntityStoreError.

🤖 Prompt for 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.

In `@services/studio/tests/unit/test_copilot.py` around lines 79 - 91, Update
FakeEntityStore.delete to honor expected_db_version and raise
EntityConflictError when it differs from the stored entity version, then add
coverage for delete_session_history’s conflict/409 path. Add a _stream_copilot
test using an update implementation that raises EntityStoreError and assert the
streamed error response.
services/studio/src/nmp/studio/entities.py (1)

27-28: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Consider bounding persisted messages growth.

messages grows without limit. Each completed turn rewrites the whole conversation entity through entity_store.update, so per-turn write size grows linearly with history length. Long sessions will produce large entity payloads and slow updates.

Consider capping stored turns, or storing messages as separate append-only entities.

🤖 Prompt for 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.

In `@services/studio/src/nmp/studio/entities.py` around lines 27 - 28, Bound
persisted conversation history represented by the messages field on the relevant
entity, retaining only the most recent configured turns before
entity_store.update writes it. Use an existing configuration or limit symbol if
available, and preserve the current chat_artifacts behavior; do not allow
messages to grow without limit.
🤖 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 `@agents/nemo-studio-copilot/Dockerfile`:
- Around line 58-63: Update the NEMO_BASE_URL default to use an HTTPS loopback
URL so SDK requests cannot send bearer tokens over plaintext HTTP. Preserve the
existing port and deployment override behavior, and ensure the configured base
URL remains compatible with local runtime replacement.

In `@agents/nemo-studio-copilot/tests/test_nemo_studio_copilot.py`:
- Around line 187-201: Update test_sdk_prefers_agent_base_url_override to clear
NMP_WORKSPACE with monkeypatch.delenv(..., raising=False) before calling
_get_client, ensuring the assertion for workspace="default" is unaffected by
ambient environment state.

In `@services/studio/src/nmp/studio/copilot.py`:
- Around line 1692-1699: The conversation update flow after appending messages
must handle cross-replica EntityConflictError by reloading the latest
conversation, reapplying this turn, and retrying entity_store.update within the
same request so both turns are preserved. Update the relevant exception handling
around entity_store.update and the existing EntityStoreError path; do not rely
on the per-process _session_streams guard or the local 409 check for distributed
concurrency.

---

Nitpick comments:
In `@services/studio/src/nmp/studio/entities.py`:
- Around line 27-28: Bound persisted conversation history represented by the
messages field on the relevant entity, retaining only the most recent configured
turns before entity_store.update writes it. Use an existing configuration or
limit symbol if available, and preserve the current chat_artifacts behavior; do
not allow messages to grow without limit.

In `@services/studio/tests/unit/test_copilot.py`:
- Around line 310-322: Add an explicit successful status assertion to
test_create_session_persists_workspace_and_owner immediately after the
service_client.post call, before reading response.json()["session_id"], while
preserving the existing persistence and owner/message assertions.
- Around line 79-91: Update FakeEntityStore.delete to honor expected_db_version
and raise EntityConflictError when it differs from the stored entity version,
then add coverage for delete_session_history’s conflict/409 path. Add a
_stream_copilot test using an update implementation that raises EntityStoreError
and assert the streamed error response.

In `@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/api.ts`:
- Around line 58-59: Update the exported getClaudeCodeHistorySessionsQueryKey
function with an explicit readonly tuple return type matching its four elements:
the two string literals, the sessions literal, and the workspace string.

In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistoryPanelContents.tsx`:
- Around line 21-26: Add an explicit JSX.Element return type to the exported
HistoryPanelContents component declaration, preserving its existing props and
implementation.

In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistorySessionButton.tsx`:
- Line 13: Change the React import in HistorySessionButton.tsx to a type-only
import, since React is used only for the React.JSX.Element type.
🪄 Autofix

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: b3b5e61e-b6b8-4a45-a201-e1f2240ba540

📥 Commits

Reviewing files that changed from the base of the PR and between 603b97b and e60f555.

📒 Files selected for processing (18)
  • agents/nemo-studio-copilot/Dockerfile
  • agents/nemo-studio-copilot/src/nemo_studio_copilot/register.py
  • agents/nemo-studio-copilot/tests/test_nemo_studio_copilot.py
  • services/studio/src/nmp/studio/copilot.py
  • services/studio/src/nmp/studio/entities.py
  • services/studio/src/nmp/studio/service.py
  • services/studio/tests/unit/test_copilot.py
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeLayout.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/api.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/api.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/context/ClaudeCodeChatProvider.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/context/ClaudeCodeChatProvider.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistoryPanelContents.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/HistorySessionButton.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/types.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts

Comment thread agents/nemo-studio-copilot/Dockerfile
Comment thread agents/nemo-studio-copilot/tests/test_nemo_studio_copilot.py
Comment thread services/studio/src/nmp/studio/copilot.py Outdated
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 30743/39237 78.3% 62.7%
Integration Tests 18061/37189 48.6% 21.0%

Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts (1)

64-76: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Cancel stale history loads when the selected session is already active.

If session A is loading while session B remains active, navigation back to B does not call loadSession in CopilotChatRoute/index.tsx because B === sessionId. requestedSessionIdRef therefore remains A, and the response for A passes the stale-request check and temporarily replaces B.

Invalidate or abort the pending request when the selected session changes back to the active session. Add a regression test for B → A → B navigation before A resolves.

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts`
around lines 64 - 76, Update useCopilotChatRuntime so changing the selected
session back to the active session invalidates or aborts any pending load
tracked by requestedSessionIdRef, preventing a stale response from session A
from replacing active session B. Preserve loadSession behavior for genuinely new
sessions, and add a regression test covering B → A → B navigation before A
resolves.
🧹 Nitpick comments (4)
web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts (1)

29-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add an explicit return contract.

getBlockingInputRequest is exported. Define an interface for its result and use it as the return type.

Proposed change
+interface BlockingInputRequestDetails {
+  readonly id: string;
+  readonly title: string;
+  readonly description: string;
+}
+
-export const getBlockingInputRequest = (request: CopilotInputRequest) => {
+export const getBlockingInputRequest = (
+  request: CopilotInputRequest
+): BlockingInputRequestDetails => {
🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts`
at line 29, Define a named interface describing the result returned by
getBlockingInputRequest, then annotate the exported function’s return type with
that interface. Ensure the interface captures the function’s existing return
shape without changing its runtime behavior.

Source: Coding guidelines

web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx (1)

9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Define a props interface and an explicit return type.

Replace the inline { skill: CopilotSkill } contract with SkillCardProps. Add an explicit return type to SkillCard.

As per coding guidelines, prefer interfaces for object contracts and use explicit return types for public APIs.

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx`
at line 9, Update the SkillCard component’s inline props contract to a named
SkillCardProps interface containing skill: CopilotSkill, and annotate SkillCard
with an explicit JSX return type while preserving its current rendered output.

Source: Coding guidelines

web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx (1)

21-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add explicit return types to exported components.

  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx#L21-L26: add the HistoryPanelContents return type.
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx#L6-L20: add return types to both skeleton components.
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx#L15-L15: add the FloatingPanel return type.
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx#L15-L15: add the SkillsPanelContents return type.

As per coding guidelines, use explicit return types for public APIs and complex functions.

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx`
around lines 21 - 26, Declare explicit React return types for the exported
HistoryPanelContents component and both skeleton components in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx:21-26
and
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx:6-20;
also add the corresponding return types to FloatingPanel in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx:15
and SkillsPanelContents in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx:15.

Source: Coding guidelines

web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts (1)

212-212: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant trailing \b after the lookahead.

The \b after (?!...) asserts at the same position as the \b following agent. Remove it.

♻️ Proposed cleanup
-    /\b(build|create) (an? )?agent\b(?!\s+(class|component|helper|test|function|module))\b/i,
+    /\b(build|create) (an? )?agent\b(?!\s+(class|component|helper|test|function|module))/i,
🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts`
at line 212, Remove the redundant trailing word-boundary assertion from the
agent-matching regular expression in the navigation suggestions pattern, keeping
the existing lookahead and preceding boundary unchanged.
🤖 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/CopilotChatRoute/studioUiNavigationSuggestions.ts`:
- Around line 236-251: Update the catalog ordering or regex patterns so the
job-list entries safe-synthesizer and data-designer are selected for prompts
mentioning existing jobs. Prefer placing these entries before
safe-synthesizer-new and data-designer-new, or constrain the creation patterns
to exclude “jobs”; preserve creation routing for prompts that do not refer to
jobs.

---

Outside diff comments:
In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts`:
- Around line 64-76: Update useCopilotChatRuntime so changing the selected
session back to the active session invalidates or aborts any pending load
tracked by requestedSessionIdRef, preventing a stale response from session A
from replacing active session B. Preserve loadSession behavior for genuinely new
sessions, and add a regression test covering B → A → B navigation before A
resolves.

---

Nitpick comments:
In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts`:
- Line 29: Define a named interface describing the result returned by
getBlockingInputRequest, then annotate the exported function’s return type with
that interface. Ensure the interface captures the function’s existing return
shape without changing its runtime behavior.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx`:
- Around line 21-26: Declare explicit React return types for the exported
HistoryPanelContents component and both skeleton components in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx:21-26
and
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx:6-20;
also add the corresponding return types to FloatingPanel in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx:15
and SkillsPanelContents in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx:15.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx`:
- Line 9: Update the SkillCard component’s inline props contract to a named
SkillCardProps interface containing skill: CopilotSkill, and annotate SkillCard
with an explicit JSX return type while preserving its current rendered output.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts`:
- Line 212: Remove the redundant trailing word-boundary assertion from the
agent-matching regular expression in the navigation suggestions pattern, keeping
the existing lookahead and preceding boundary unchanged.
🪄 Autofix

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: 4e358fe3-867f-46d9-9cbc-0a8a59488ccd

📥 Commits

Reviewing files that changed from the base of the PR and between 5847180 and 4655873.

📒 Files selected for processing (73)
  • web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx
  • web/packages/studio/src/components/Layouts/GlobalNav/index.tsx
  • web/packages/studio/src/routes/DashboardLandingRoute/index.test.tsx
  • web/packages/studio/src/routes/DashboardLandingRoute/index.tsx
  • web/packages/studio/src/routes/DashboardLandingRoute/skillActionSuggestions.ts
  • web/packages/studio/src/routes/DashboardLandingRoute/skillActionTemplates.test.ts
  • web/packages/studio/src/routes/DashboardLandingRoute/skillDisplayName.test.ts
  • web/packages/studio/src/routes/DashboardLandingRoute/skillDisplayName.ts
  • web/packages/studio/src/routes/PageLayout/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/context/useClaudeCodeChatContext.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/BlockingInputComposer.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/BlockingInputComposer.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotChatThread.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotChatThread.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotHistoryPanel.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotHistoryPanel.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotLayout.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotStudioLink.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotStudioLink.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotStudioLinkTarget.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotToolCallPart.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotToolCallPart.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotTopBarChat.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotTopBarChat.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/JobProgressToolCall.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/JobProgressToolCall.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/activeSessionStorage.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/api.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/api.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/artifacts.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/artifacts.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/context/CopilotChatProvider.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/context/CopilotChatProvider.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/context/useCopilotChatContext.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/ArtifactSections.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/CopilotArtifactsPane.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistorySessionButton.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/helpers.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/helpers.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/index.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/index.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/jobProgressConsts.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/stream.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/stream.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/CollapsedThinkingToolCall.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/FileChangeToolCallCard.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/SubtleToolCallRow.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/constants.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/helpers.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolParts.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolParts.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCustomAssistantChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCustomAssistantChatRuntime.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/util.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/util.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/utils/jobProgress.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/utils/jobProgress.ts
  • web/packages/studio/src/routes/groups/dashboardRoutes.tsx
  • web/packages/studio/src/util/localStorage.ts
💤 Files with no reviewable changes (2)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/types.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/context/useClaudeCodeChatContext.ts

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts (1)

64-76: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Cancel stale history loads when the selected session is already active.

If session A is loading while session B remains active, navigation back to B does not call loadSession in CopilotChatRoute/index.tsx because B === sessionId. requestedSessionIdRef therefore remains A, and the response for A passes the stale-request check and temporarily replaces B.

Invalidate or abort the pending request when the selected session changes back to the active session. Add a regression test for B → A → B navigation before A resolves.

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts`
around lines 64 - 76, Update useCopilotChatRuntime so changing the selected
session back to the active session invalidates or aborts any pending load
tracked by requestedSessionIdRef, preventing a stale response from session A
from replacing active session B. Preserve loadSession behavior for genuinely new
sessions, and add a regression test covering B → A → B navigation before A
resolves.
🧹 Nitpick comments (4)
web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts (1)

29-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add an explicit return contract.

getBlockingInputRequest is exported. Define an interface for its result and use it as the return type.

Proposed change
+interface BlockingInputRequestDetails {
+  readonly id: string;
+  readonly title: string;
+  readonly description: string;
+}
+
-export const getBlockingInputRequest = (request: CopilotInputRequest) => {
+export const getBlockingInputRequest = (
+  request: CopilotInputRequest
+): BlockingInputRequestDetails => {
🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts`
at line 29, Define a named interface describing the result returned by
getBlockingInputRequest, then annotate the exported function’s return type with
that interface. Ensure the interface captures the function’s existing return
shape without changing its runtime behavior.

Source: Coding guidelines

web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx (1)

9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Define a props interface and an explicit return type.

Replace the inline { skill: CopilotSkill } contract with SkillCardProps. Add an explicit return type to SkillCard.

As per coding guidelines, prefer interfaces for object contracts and use explicit return types for public APIs.

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx`
at line 9, Update the SkillCard component’s inline props contract to a named
SkillCardProps interface containing skill: CopilotSkill, and annotate SkillCard
with an explicit JSX return type while preserving its current rendered output.

Source: Coding guidelines

web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx (1)

21-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add explicit return types to exported components.

  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx#L21-L26: add the HistoryPanelContents return type.
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx#L6-L20: add return types to both skeleton components.
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx#L15-L15: add the FloatingPanel return type.
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx#L15-L15: add the SkillsPanelContents return type.

As per coding guidelines, use explicit return types for public APIs and complex functions.

🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx`
around lines 21 - 26, Declare explicit React return types for the exported
HistoryPanelContents component and both skeleton components in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx:21-26
and
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx:6-20;
also add the corresponding return types to FloatingPanel in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx:15
and SkillsPanelContents in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx:15.

Source: Coding guidelines

web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts (1)

212-212: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant trailing \b after the lookahead.

The \b after (?!...) asserts at the same position as the \b following agent. Remove it.

♻️ Proposed cleanup
-    /\b(build|create) (an? )?agent\b(?!\s+(class|component|helper|test|function|module))\b/i,
+    /\b(build|create) (an? )?agent\b(?!\s+(class|component|helper|test|function|module))/i,
🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts`
at line 212, Remove the redundant trailing word-boundary assertion from the
agent-matching regular expression in the navigation suggestions pattern, keeping
the existing lookahead and preceding boundary unchanged.
🤖 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/CopilotChatRoute/studioUiNavigationSuggestions.ts`:
- Around line 236-251: Update the catalog ordering or regex patterns so the
job-list entries safe-synthesizer and data-designer are selected for prompts
mentioning existing jobs. Prefer placing these entries before
safe-synthesizer-new and data-designer-new, or constrain the creation patterns
to exclude “jobs”; preserve creation routing for prompts that do not refer to
jobs.

---

Outside diff comments:
In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts`:
- Around line 64-76: Update useCopilotChatRuntime so changing the selected
session back to the active session invalidates or aborts any pending load
tracked by requestedSessionIdRef, preventing a stale response from session A
from replacing active session B. Preserve loadSession behavior for genuinely new
sessions, and add a regression test covering B → A → B navigation before A
resolves.

---

Nitpick comments:
In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts`:
- Line 29: Define a named interface describing the result returned by
getBlockingInputRequest, then annotate the exported function’s return type with
that interface. Ensure the interface captures the function’s existing return
shape without changing its runtime behavior.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx`:
- Around line 21-26: Declare explicit React return types for the exported
HistoryPanelContents component and both skeleton components in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx:21-26
and
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx:6-20;
also add the corresponding return types to FloatingPanel in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx:15
and SkillsPanelContents in
web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx:15.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx`:
- Line 9: Update the SkillCard component’s inline props contract to a named
SkillCardProps interface containing skill: CopilotSkill, and annotate SkillCard
with an explicit JSX return type while preserving its current rendered output.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts`:
- Line 212: Remove the redundant trailing word-boundary assertion from the
agent-matching regular expression in the navigation suggestions pattern, keeping
the existing lookahead and preceding boundary unchanged.
🪄 Autofix

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: 4e358fe3-867f-46d9-9cbc-0a8a59488ccd

📥 Commits

Reviewing files that changed from the base of the PR and between 5847180 and 4655873.

📒 Files selected for processing (73)
  • web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx
  • web/packages/studio/src/components/Layouts/GlobalNav/index.tsx
  • web/packages/studio/src/routes/DashboardLandingRoute/index.test.tsx
  • web/packages/studio/src/routes/DashboardLandingRoute/index.tsx
  • web/packages/studio/src/routes/DashboardLandingRoute/skillActionSuggestions.ts
  • web/packages/studio/src/routes/DashboardLandingRoute/skillActionTemplates.test.ts
  • web/packages/studio/src/routes/DashboardLandingRoute/skillDisplayName.test.ts
  • web/packages/studio/src/routes/DashboardLandingRoute/skillDisplayName.ts
  • web/packages/studio/src/routes/PageLayout/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/context/useClaudeCodeChatContext.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/BlockingInputComposer.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/BlockingInputComposer.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotChatThread.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotChatThread.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotHistoryPanel.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotHistoryPanel.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotLayout.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotStudioLink.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotStudioLink.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotStudioLinkTarget.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotToolCallPart.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotToolCallPart.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotTopBarChat.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/CopilotTopBarChat.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/JobProgressToolCall.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/JobProgressToolCall.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/activeSessionStorage.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/api.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/api.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/artifacts.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/artifacts.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/blockingInputRequest.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/context/CopilotChatProvider.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/context/CopilotChatProvider.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/context/useCopilotChatContext.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/ArtifactSections.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/CopilotArtifactsPane.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/FloatingPanel.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelContents.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistoryPanelSkeletons.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/HistorySessionButton.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillCard.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/SkillsPanelContents.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/helpers.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/helpers.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/historyPanel/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/index.test.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/index.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/jobProgressConsts.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/stream.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/stream.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/CollapsedThinkingToolCall.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/FileChangeToolCallCard.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/SubtleToolCallRow.tsx
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/constants.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/helpers.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolCall/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolParts.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/toolParts.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/types.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCopilotChatRuntime.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCustomAssistantChatRuntime.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/useCustomAssistantChatRuntime.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/util.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/util.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/utils/jobProgress.test.ts
  • web/packages/studio/src/routes/agents/CopilotChatRoute/utils/jobProgress.ts
  • web/packages/studio/src/routes/groups/dashboardRoutes.tsx
  • web/packages/studio/src/util/localStorage.ts
💤 Files with no reviewable changes (2)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/types.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/context/useClaudeCodeChatContext.ts
🛑 Comments failed to post (1)
web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts (1)

236-251: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Earlier catalog entries shadow these two destinations.

Matching runs in catalog order and returns the first match. safe-synthesizer-new (line 55, /\bsafe[-\s]?synthesizer\b/i) matches "safe synthesizer jobs", so safe-synthesizer never handles that phrase. data-designer-new (line 109, /\bdata designer\b/i) matches every string that /\bdata designer jobs?\b/i matches, so data-designer is unreachable. Prompts asking about existing jobs route to the creation UIs.

Move the job-list destinations before the creation destinations, or make the creation patterns exclude "jobs".

♻️ Example: exclude job phrasing from the creation patterns
-      /\bsafe[-\s]?synthesizer\b/i,
+      /\bsafe[-\s]?synthesizer\b(?!\s+jobs?\b)/i,
-      /\bdata designer\b/i,
+      /\bdata designer\b(?!\s+jobs?\b)/i,
🤖 Prompt for 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.

In
`@web/packages/studio/src/routes/agents/CopilotChatRoute/studioUiNavigationSuggestions.ts`
around lines 236 - 251, Update the catalog ordering or regex patterns so the
job-list entries safe-synthesizer and data-designer are selected for prompts
mentioning existing jobs. Prefer placing these entries before
safe-synthesizer-new and data-designer-new, or constrain the creation patterns
to exclude “jobs”; preserve creation routing for prompts that do not refer to
jobs.

@dmariali
dmariali added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit ca85d0f Aug 5, 2026
52 checks passed
@dmariali
dmariali deleted the copilot-chat-history branch August 5, 2026 19:51
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