Skip to content

feat(webapp): agent-view dashboard for chat.agent runs (4/5)#3545

Open
ericallam wants to merge 1 commit into
feature/chat-client-transportfrom
feature/agent-view-dashboard
Open

feat(webapp): agent-view dashboard for chat.agent runs (4/5)#3545
ericallam wants to merge 1 commit into
feature/chat-client-transportfrom
feature/agent-view-dashboard

Conversation

@ericallam
Copy link
Copy Markdown
Member

Layer 4 of 5 in the chat.agent stack split

Dashboard surfaces for inspecting and debugging chat.agent runs.
Depends on the Sessions primitive (L1), chat.agent runtime (L2),
and the browser chat transport (L3).

Targets feature/chat-client-transport — merge after L3

Run inspector — chat-aware

  • AgentView + AgentMessageView (run inspector tab for chat.agent runs)
  • AIChatMessages + AISpanDetails + types.ts (per-span chat message
    rendering, tool-call / tool-output handling)
  • PromptSpanDetails (gen_ai.* span detail panel)
  • StreamdownRenderer + shikiTheme (markdown renderer with shiki
    highlighting and v2 patch)
  • useAutoScrollToBottom hook

Playground UI (interactive chat.agent debugger)

  • /playground index + /playground/$agentParam routes
  • /agents route + AgentListPresenter
  • PlaygroundPresenter (per-org basin variants, clientData wiring)
  • realtime session routes for playground + run inspector chat
  • AI-generate-payload + AIPayloadTabContent for the test panel

Navigation + theming

  • SideMenu links for Agents and Playground
  • BlankStatePanels copy updates
  • tailwind config + tailwind.css storybook hooks
  • streamdown@2 dep in apps/webapp/package.json

Includes agent-view-sessions, playground-trigger-config-fields,
run-agent-view, and streamdown-v2-upgrade server-changes entries.

Stack

  • L1 → main: Sessions primitive
  • L2 → L1: chat.agent runtime
  • L3 → L2: browser chat client + transport
  • L4 → L3 (this PR)
  • L5 → L4: ai-chat reference + MCP tooling

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e3561ca5-4ac8-45f6-8f3f-10169c1f5c72

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/agent-view-dashboard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 10, 2026

⚠️ No Changeset found

Latest commit: 7ee523e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment on lines +274 to +284
await prisma.playgroundConversation.updateMany({
where: {
chatId,
runtimeEnvironmentId: environment.id,
},
data: {
...(messagesData ? { messages: messagesData as any } : {}),
...(lastEventId ? { lastEventId } : {}),
...titleUpdate,
},
});
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.

🚩 Playground save intent missing userId filter (inconsistent with delete)

The save intent at resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.action.tsx:274 uses updateMany with { chatId, runtimeEnvironmentId } but does not include userId in the where clause. In contrast, the delete intent at line 295 correctly filters by userId. This means any authenticated user with access to the same project/environment could theoretically overwrite another user's conversation messages if they knew the chatId. In practice this is mitigated by chatIds being client-generated UUIDs (extremely hard to guess), but the inconsistency weakens defense-in-depth. Adding userId to the save query would align with the delete intent's authorization model.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +265 to +269
const bucketKeys: string[] = [];
for (let i = 0; i < 24; i++) {
const h = new Date(startHour.getTime() + i * 3600_000);
bucketKeys.push(h.toISOString().slice(0, 13).replace("T", " ") + ":00:00");
}
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.

🚩 Sparkline bucket key format must match ClickHouse DateTime string representation

In AgentListPresenter.server.ts:268, bucket keys are generated as h.toISOString().slice(0, 13).replace('T', ' ') + ':00:00' (e.g., '2024-01-15 14:00:00'). These are used to look up values from ClickHouse rows keyed by toStartOfHour(created_at). The match depends on the ClickHouse client returning DateTime values in the exact same YYYY-MM-DD HH:MM:SS format. This works with the default ClickHouse DateTime string representation, but if the client or ClickHouse session is configured differently (e.g., ISO 8601 with T separator, or with timezone suffix), the keys won't match and all sparklines will show zeros. The schema uses z.string() so there's no format normalization.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Dashboard surfaces for inspecting and debugging chat.agent runs.
Depends on the Sessions primitive (L1) and chat.agent runtime (L2+L3).

Run inspector — chat-aware:
- AgentView + AgentMessageView (run inspector tab for chat.agent runs)
- AIChatMessages + AISpanDetails + types.ts (per-span chat message
  rendering, tool-call/tool-output handling)
- PromptSpanDetails (gen_ai.* span detail panel)
- StreamdownRenderer + shikiTheme (markdown renderer with shiki
  highlighting and v2 patch)
- useAutoScrollToBottom hook

Playground UI (interactive chat.agent debugger):
- /playground index + /playground/$agentParam routes
- /agents route + AgentListPresenter
- PlaygroundPresenter (per-org basin variants, clientData wiring)
- realtime session routes for playground + run inspector chat
- AI-generate-payload + AIPayloadTabContent for the test panel

Navigation + theming:
- SideMenu links for Agents and Playground
- BlankStatePanels copy updates
- tailwind config + tailwind.css storybook hooks
- streamdown@2 dep in apps/webapp/package.json

Includes agent-view-sessions, playground-trigger-config-fields,
run-agent-view, and streamdown-v2-upgrade .server-changes.
@ericallam ericallam force-pushed the feature/chat-client-transport branch from a60187c to 172b7c3 Compare May 11, 2026 19:01
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from ecfac76 to 7ee523e Compare May 11, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant