Skip to content

feat(studio): Update chat interface styling - #176

Merged
dmariali merged 20 commits into
mainfrom
add-reasoning-styling-to-assistant-chat
Jun 4, 2026
Merged

dmariali merged 20 commits into
mainfrom
add-reasoning-styling-to-assistant-chat

Conversation

@dmariali

@dmariali dmariali commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-04 at 4 03 14 PM

Summary by CodeRabbit

  • New Features

    • Pluggable message parts: collapsible "Thinking" reasoning blocks, richer tool-call displays, and streaming structured assistant parts
    • Option to hide assistant message actions; copy and regenerate controls now inline
  • UI Improvements

    • Consistent inline and block code styling for light/dark themes
    • Minor chat/session list and button styling refinements
    • Enter key submits landing composer (Shift+Enter inserts newline)
  • Tests

    • Added coverage for thinking blocks, tool-call displays, code rendering, assistant-action visibility, and streaming parts

dmariali added 2 commits June 3, 2026 14:46
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
show 'code' blocks with background, hide unnecessary action blocks, fix spacing (still needs some more work)

Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
@dmariali
dmariali requested review from a team as code owners June 4, 2026 13:26
@coderabbitai

coderabbitai Bot commented Jun 4, 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

Structured assistant outputs (reasoning, text, tool-call) are extracted from Claude events, streamed into a part-aware runtime, stored as parts in history, and rendered by AssistantChatThread via pluggable reasoning and tool-call components; also adds unified code-surface classes and related tests and minor UI/routing tweaks.

Changes

Claude Code structured message parts

Layer / File(s) Summary
Unified code surface classes
web/packages/common/src/components/Chat/MessageContent/index.tsx, web/packages/common/src/components/Chat/MessageContent/index.spec.tsx, web/packages/common/src/components/CodeDisplay/index.tsx, web/packages/common/src/components/CodeDisplay/index.spec.tsx, web/packages/common/src/components/MarkdownContent/components/CodeBlock.tsx, web/packages/common/src/components/MarkdownContent/MarkdownContent.spec.tsx
Add shared inline/fenced code CSS constants and apply them to react-markdown/CodeSnippet; tests assert light/dark surface and inline rounded classes.
Pluggable message part renderers & actions
web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx, web/packages/common/src/components/AssistantChat/index.spec.tsx
Expose reasoningPartComponent, toolCallPartComponent, and hideAssistantMessageActions; forward them into message content via memoized wrappers; replace copy UI and render inline copy/regenerate controls; add tests for assistant action visibility.
Collapsible reasoning block
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeReasoningPart.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeReasoningPart.spec.tsx
New ClaudeCodeReasoningPart renders a details/summary "Thinking" block opened when running and auto-closes on completion; tests cover running vs complete states.
Tool-call helpers & UI
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolParts.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.spec.tsx
Add toolParts helpers (omission, arg normalization, factory) and ClaudeCodeToolCallPart to render Read (subtle), Write/Edit/MultiEdit (file-change cards with diff stats and review surfaces), and generic collapsible tool details; tests cover omission and expand behavior.
Stream parsing to parts
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/stream.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/stream.spec.ts
Introduce getAssistantPartsFromClaudeEvent mapping Claude content into reasoning/text/tool-call parts with omission filtering and deterministic toolCallId; update getAssistantTextFromClaudeEvent to compose only reasoning/text.
Runtime part support
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts
Extend runtime contract with appendAssistantParts and optional content result; add helpers to merge parts and derive visible text; refactor streaming/update/complete flows to be part-aware; switch streaming from text to parts.
History → structured parts conversion
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/util.ts, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/util.spec.ts
Convert stored assistant history into ThreadAssistantMessagePart[] (reasoning, text, tool-call), skip omitted tools, and omit assistant message when assembled content is empty; update tests/fixtures.
Final wiring, tests, and minor UI
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/index.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeLayout.tsx, web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.tsx, web/packages/studio/src/routes/DashboardLandingRoute/index.tsx, related specs
Wire new reasoning/tool-call components into AssistantChatThread and hide assistant actions for Claude flows; change New chat routing target; adjust HistoryPanel icon/spacing; add LandingComposer Enter/Shift+Enter submission behavior and tests.

Possibly related PRs

Suggested reviewers

  • htolentino-nvidia
  • aray12
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic. While styling changes exist, the PR fundamentally refactors assistant message rendering with new component props, reasoning/tool-call part components, and streaming architecture changes—none captured by "Update chat interface styling". Revise title to reflect the core change: e.g., 'feat(studio): Add customizable reasoning and tool-call rendering in assistant chat' or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-reasoning-styling-to-assistant-chat

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

@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: 4

🤖 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/common/src/components/AssistantChat/AssistantChatThread.tsx`:
- Around line 26-27: Replace the relative imports in AssistantChatThread.tsx
with the project's absolute alias paths: update the import statements that
currently reference '../Chat/ChatEmptyState' and '../Chat/MessageContent' to use
the `@nemo/common` alias (e.g., import { ChatEmptyState } from
'`@nemo/common/components/Chat/ChatEmptyState`' and import { MessageContent } from
'`@nemo/common/components/Chat/MessageContent`') so ChatEmptyState and
MessageContent are imported via the absolute alias as required by
web/**/*.{ts,tsx,js,jsx} guidelines.
- Around line 8-10: The imports for ReasoningMessagePartComponent,
TextMessagePartComponent, and ToolCallMessagePartComponent are type-only and
should use TypeScript's `import type` syntax; update the import statements in
AssistantChatThread.tsx to prefix these specific symbols with `import type` (or
convert the entire import to an `import type { ... } from '...'`) so the
compiler and bundler treat them as type-only imports.
- Around line 246-257: AssistantMessageWithReasoningPart and
UserMessageWithReasoningPart are currently declared inside the
AssistantChatThread render, causing new component identities each render; move
their definitions out of the render scope (declare them at module level) or
memoize them with useMemo/useCallback so they keep stable identity, and ensure
they still receive reasoningPartComponent and toolCallPartComponent (pass those
as props or capture them via stable refs) before assigning them to the
components prop where they are used.

In `@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/util.ts`:
- Around line 30-33: getAssistantMessagePart currently builds toolCallId from
only toolName and part index which can collide across different assistant
messages; update the toolCallId construction in getAssistantMessagePart (and the
analogous spots referenced around the same area) to include the message scope
(for example the parent assistant message's unique id or an
assistantMessageIndex) in the id string so it becomes unique per assistant
message (e.g., combine part.toolName + partIndex + assistantMessageId or
assistantMessageIndex). Locate the toolCallId assembly inside
getAssistantMessagePart and replace/augment it to include the message-level
identifier so every assistant message emits a distinct toolCallId.
🪄 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: bbe0b233-606c-4e12-b81a-7bd3bda06d3b

📥 Commits

Reviewing files that changed from the base of the PR and between 26dfd29 and 5706f57.

📒 Files selected for processing (22)
  • web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx
  • web/packages/common/src/components/AssistantChat/index.spec.tsx
  • web/packages/common/src/components/Chat/MessageContent/index.spec.tsx
  • web/packages/common/src/components/Chat/MessageContent/index.tsx
  • web/packages/common/src/components/CodeDisplay/index.spec.tsx
  • web/packages/common/src/components/CodeDisplay/index.tsx
  • web/packages/common/src/components/MarkdownContent/MarkdownContent.spec.tsx
  • web/packages/common/src/components/MarkdownContent/components/CodeBlock.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/ClaudeCodeReasoningPart.spec.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeReasoningPart.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.spec.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/stream.spec.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/stream.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolParts.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useClaudeCodeChatRuntime.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/useCustomAssistantChatRuntime.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/util.spec.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/util.ts

Comment thread web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx Outdated
Comment thread web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx Outdated
Comment thread web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx Outdated
Comment thread web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/util.ts
@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 18714/24765 75.6% 62.0%
Integration Tests 11995/23529 51.0% 26.2%

dmariali added 2 commits June 4, 2026 10:14
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/DashboardLandingRoute/index.tsx`:
- Around line 98-103: The composer textarea currently suppresses keyboard focus
visibility by using "outline-none" and removing "focus-visible" outlines in both
the outer className and attributes.TextAreaElement; restore an accessible focus
indicator by removing the global outline-none and replacing it with a visible
focus style (e.g., a focus-visible ring or border) on the TextAreaElement so
keyboard users can see focus, or rely on the framework's default accessible
focus by deleting the focus-within:outline-none / focus-visible:outline-none
entries; target the className on the textarea and the attributes.TextAreaElement
to apply the change.
🪄 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: 52063695-e228-41ee-a646-69c4e0842562

📥 Commits

Reviewing files that changed from the base of the PR and between 5706f57 and 7996014.

📒 Files selected for processing (2)
  • web/packages/studio/src/routes/DashboardLandingRoute/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeHistoryPanel.tsx

Comment thread web/packages/studio/src/routes/DashboardLandingRoute/index.tsx Outdated
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/common/src/components/AssistantChat/index.spec.tsx`:
- Line 19: Replace the relative import of AssistantChatThread in the test
(import { AssistantChatThread } from './AssistantChatThread') with the project's
configured absolute alias import; locate the import in AssistantChat
index.spec.tsx and update it to use the repository's alias-based path for
AssistantChatThread so it complies with the no-relative-import-paths lint rule.
🪄 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: 46c33870-c7fb-451e-b1d3-bb1abb4aa1a8

📥 Commits

Reviewing files that changed from the base of the PR and between 7996014 and ff0a98b.

📒 Files selected for processing (3)
  • web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx
  • web/packages/common/src/components/AssistantChat/index.spec.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/index.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/index.tsx
  • web/packages/common/src/components/AssistantChat/AssistantChatThread.tsx

Comment thread web/packages/common/src/components/AssistantChat/index.spec.tsx Outdated
dmariali added 15 commits June 4, 2026 11:16
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>
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 added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit f029675 Jun 4, 2026
39 checks passed
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.

2 participants