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

@ericallam ericallam commented May 10, 2026

Layer 4 of 5 in the chat.agent stack split

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

Targets feature/chat-client-transport — merge after #3544

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: #3542 Sessions dashboard, task_kind, and chat-ready hardening
  • L2 → L1: #3543 chat.agent runtime
  • L3 → L2: #3544 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: 52b8025c-af38-4d27-bc75-a1d016a1f73e

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: 234ad0c

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.

@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
@ericallam ericallam force-pushed the feature/chat-client-transport branch from 172b7c3 to a63e60a Compare May 12, 2026 08:23
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 7ee523e to fdc61c6 Compare May 12, 2026 08:23
@ericallam ericallam force-pushed the feature/chat-client-transport branch from a63e60a to ce861fb Compare May 12, 2026 08:35
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from fdc61c6 to 96700b1 Compare May 12, 2026 08:35
@ericallam ericallam force-pushed the feature/chat-client-transport branch from ce861fb to dc686d8 Compare May 12, 2026 08:40
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 96700b1 to 482d752 Compare May 12, 2026 08:40
@ericallam ericallam force-pushed the feature/chat-client-transport branch from dc686d8 to 6c3490c Compare May 12, 2026 08:46
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 482d752 to 920e876 Compare May 12, 2026 08:46
@ericallam ericallam force-pushed the feature/chat-client-transport branch from 6c3490c to 9d26e60 Compare May 12, 2026 08:52
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 920e876 to d96e2f7 Compare May 12, 2026 08:52
@ericallam ericallam force-pushed the feature/chat-client-transport branch from 9d26e60 to b971910 Compare May 12, 2026 09:44
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from d96e2f7 to 3256f42 Compare May 12, 2026 09:44
@ericallam ericallam force-pushed the feature/chat-client-transport branch from b971910 to fa95095 Compare May 12, 2026 09:46
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 3256f42 to 220b33c Compare May 12, 2026 09:46
@ericallam ericallam force-pushed the feature/chat-client-transport branch from fa95095 to dc95b98 Compare May 12, 2026 09:48
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 220b33c to 067109f Compare May 12, 2026 09:48
@ericallam ericallam force-pushed the feature/chat-client-transport branch from dc95b98 to abb2cab Compare May 12, 2026 09:52
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 067109f to c1f6db7 Compare May 12, 2026 09:52
@ericallam ericallam force-pushed the feature/chat-client-transport branch from abb2cab to 3233503 Compare May 12, 2026 10:02
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from c1f6db7 to f75bcd8 Compare May 12, 2026 10:02
@ericallam ericallam force-pushed the feature/chat-client-transport branch from 3233503 to 3b68877 Compare May 12, 2026 10:07
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from f75bcd8 to 40a3dff Compare May 12, 2026 10:07
@ericallam ericallam force-pushed the feature/chat-client-transport branch from 3b68877 to cac4fc5 Compare May 12, 2026 10:16
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 40a3dff to 1748445 Compare May 12, 2026 10:16
@ericallam ericallam force-pushed the feature/chat-client-transport branch from cac4fc5 to a4bd26a Compare May 12, 2026 10:27
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 1748445 to 95f6dd2 Compare May 12, 2026 10:27
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 a4bd26a to 76e3cec Compare May 12, 2026 10:31
@ericallam ericallam force-pushed the feature/agent-view-dashboard branch from 95f6dd2 to 234ad0c Compare May 12, 2026 10:31
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