Skip to content

chore(studio): Coding agent adjust layout - #676

Merged
dmariali merged 8 commits into
mainfrom
coding-agent-adjust-layout
Jul 15, 2026
Merged

chore(studio): Coding agent adjust layout#676
dmariali merged 8 commits into
mainfrom
coding-agent-adjust-layout

Conversation

@dmariali

@dmariali dmariali commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-07-14 at 2 50 46 PM Screenshot 2026-07-14 at 2 50 17 PM

Summary by CodeRabbit

  • New Features
    • Added independently expandable History and Skills floating panels for the Code Agent, with persisted open/closed state.
    • Updated Global Navigation sidebar behavior for the Code Agent route, including responsive auto-collapse/expand and correct state restoration on navigation.
  • Bug Fixes
    • Improved Claude Code artifact labeling (including correct “Agent” detection) and ensured agent name isn’t overwritten during redeployment actions.
    • Refreshed “Chat artifacts” sections to show only relevant content.
  • Tests
    • Expanded Global Navigation, Code Agent history panel, and artifact/selection test coverage to match the new UI behavior.

dmariali added 4 commits July 13, 2026 16:58
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>
@dmariali
dmariali requested review from a team as code owners July 14, 2026 16:33
@dmariali dmariali changed the title Coding agent adjust layout chore(studio): Coding agent adjust layout Jul 14, 2026
@github-actions github-actions Bot added the chore label Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 24398/31577 77.3% 62.0%
Integration Tests 14024/30226 46.4% 19.3%

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

GlobalNav now applies route-specific sidebar defaults and backgrounds. Claude Code history and skills use independently persisted floating panels. Artifact rendering is conditional and simplified, while selection labeling avoids treating redeployment actions as agent names.

Changes

Global navigation behavior

Layer / File(s) Summary
Route-aware sidebar state
web/packages/studio/src/components/Layouts/GlobalNav/*, web/packages/studio/src/util/hooks/useSidebarState.ts
GlobalNav remounts across Code Agent route changes, applies route-specific sidebar defaults and backgrounds, and tests responsive navigation behavior.

Claude Code panel experience

Layer / File(s) Summary
Floating history and skills panels
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/*, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.*, web/packages/studio/src/util/localStorage.ts
History and skills replace tab selection with independently persisted expandable panels and updated accessibility assertions.
Conditional artifact presentation
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/ArtifactSections.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/ClaudeCodeArtifactsPane.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeLayout.tsx
Artifact rows and sections use simplified styling, conditional rendering, dividers, and updated dark-mode layout styling.
Artifact selection labeling
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.*
Agent-selection question detection and fallback labels are refined, with coverage for redeployment actions.

Sequence Diagram(s)

sequenceDiagram
  participant Router
  participant GlobalNav
  participant SidebarState
  Router->>GlobalNav: provide current route
  GlobalNav->>SidebarState: apply route-specific default
  SidebarState-->>GlobalNav: return persisted state
  GlobalNav-->>Router: render updated navigation
Loading
sequenceDiagram
  participant User
  participant ClaudeCodeHistoryPanel
  participant FloatingPanel
  participant LocalStorage
  User->>ClaudeCodeHistoryPanel: click expand or collapse
  ClaudeCodeHistoryPanel->>FloatingPanel: update panel state
  FloatingPanel-->>ClaudeCodeHistoryPanel: render expanded content
  ClaudeCodeHistoryPanel->>LocalStorage: persist open panel
Loading

Suggested reviewers: htolentino-nvidia, steramae-nvidia

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: studio coding-agent layout updates.
✨ 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-adjust-layout

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

🧹 Nitpick comments (2)
web/packages/studio/src/util/hooks/useSidebarState.ts (1)

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

defaultExpanded only affects the initial mount, not later renders.

useLocalStorage's value is set via a lazy useState initializer, so defaultExpanded is only consulted once per mount. Callers changing this argument without remounting (GlobalNav currently forces this via a key) will see no effect. Worth a short comment/JSDoc noting this constraint so future call sites don't silently break.

📝 Suggested doc note
+/**
+ * `defaultExpanded` is only used to seed the initial persisted value on mount.
+ * Changing it on a subsequent render has no effect unless the consuming
+ * component is remounted (e.g. via a `key` change).
+ */
 export const useSidebarState = (defaultExpanded = true) => {
🤖 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/util/hooks/useSidebarState.ts` around lines 16 - 20,
Add a concise JSDoc or inline comment above useSidebarState documenting that
defaultExpanded is only used during the initial mount because useLocalStorage
lazily initializes its state, and changes to the argument require remounting to
take effect. Do not alter the hook behavior.
web/packages/studio/src/components/Layouts/GlobalNav/index.tsx (1)

108-124: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Route-keyed remount resets the whole nav subtree, not just the sidebar.

Keying GlobalNavContent on route category forces AppBar, Breadcrumbs, ThemeSwitch, UserPopover, and ClaudeCodeTopBarChat to unmount/remount too, dropping any transient UI state (e.g. an open popover) whenever crossing into/out of the Code Agent route. Consider scoping the reset to useSidebarState itself (react to defaultExpanded changes there) instead of remounting the whole content tree.

🤖 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/components/Layouts/GlobalNav/index.tsx` around lines
108 - 124, The key on GlobalNavContent causes the entire navigation subtree to
remount when switching route categories. Remove the route-based key from
GlobalNav and update useSidebarState so it reacts to defaultExpanded changes,
resetting only sidebar state while preserving AppBar, Breadcrumbs, ThemeSwitch,
UserPopover, and ClaudeCodeTopBarChat state.
🤖 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/components/Layouts/GlobalNav/index.tsx`:
- Line 99: Update the conditional class in the GlobalNav layout’s sidebar
className so the vertical navigation background utility uses Tailwind v4 syntax,
changing the important modifier from the v3 prefix form to the suffix form while
preserving the existing selector and route condition.

---

Nitpick comments:
In `@web/packages/studio/src/components/Layouts/GlobalNav/index.tsx`:
- Around line 108-124: The key on GlobalNavContent causes the entire navigation
subtree to remount when switching route categories. Remove the route-based key
from GlobalNav and update useSidebarState so it reacts to defaultExpanded
changes, resetting only sidebar state while preserving AppBar, Breadcrumbs,
ThemeSwitch, UserPopover, and ClaudeCodeTopBarChat state.

In `@web/packages/studio/src/util/hooks/useSidebarState.ts`:
- Around line 16-20: Add a concise JSDoc or inline comment above useSidebarState
documenting that defaultExpanded is only used during the initial mount because
useLocalStorage lazily initializes its state, and changes to the argument
require remounting to take effect. Do not alter the hook behavior.
🪄 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: d05ea320-c10d-4ee4-868c-7c86f1dd4d1c

📥 Commits

Reviewing files that changed from the base of the PR and between b62a72e and 181e073.

📒 Files selected for processing (15)
  • web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx
  • web/packages/studio/src/components/Layouts/GlobalNav/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeLayout.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/ArtifactSections.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/ClaudeCodeArtifactsPane.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/FloatingPanel.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/constants.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/helpers.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/types.ts
  • web/packages/studio/src/util/hooks/useSidebarState.ts
  • web/packages/studio/src/util/localStorage.ts
💤 Files with no reviewable changes (3)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/constants.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/types.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/helpers.ts

Comment thread web/packages/studio/src/components/Layouts/GlobalNav/index.tsx Outdated
dmariali added 2 commits July 14, 2026 13:17
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

🤖 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/components/Layouts/GlobalNav/index.tsx`:
- Line 99: Update the NavigationDrawer className to always include
sidebarBackground, while keeping only the nested
[&_.nv-vertical-nav-root]:bg-transparent! override conditional on
isClaudeCodeChatRoute. Preserve the existing sizing, overflow, and grid-area
classes.
🪄 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: 55a3f76a-d84f-4719-b80c-a5bf7b696869

📥 Commits

Reviewing files that changed from the base of the PR and between 181e073 and 9d8bfa0.

📒 Files selected for processing (1)
  • web/packages/studio/src/components/Layouts/GlobalNav/index.tsx

Comment thread web/packages/studio/src/components/Layouts/GlobalNav/index.tsx
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

🤖 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/ClaudeCodeHistoryPanel.test.tsx`:
- Around line 238-258: Update the `ClaudeCodeHistoryPanel` test fixture so
`selections` is an actually empty array, keeping the existing assertions for
omitted sections and dividers. If whitespace-only selection values are expected
to be ignored, cover that behavior in a separate test rather than combining it
with the empty-section case.
🪄 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: 6a6fab09-120e-4859-af4d-14187653a9f3

📥 Commits

Reviewing files that changed from the base of the PR and between 9d8bfa0 and 343f06d.

📒 Files selected for processing (2)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.test.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/ClaudeCodeArtifactsPane.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/ClaudeCodeArtifactsPane.tsx

Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@dmariali
dmariali added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit 62bb60f Jul 15, 2026
57 checks passed
@dmariali
dmariali deleted the coding-agent-adjust-layout branch July 15, 2026 16:10
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