Repository navigation
feat(ui): add the shared agent pieces: avatar, status pill, list dot, New pill and badge - #1760
Merged
Merged
Conversation
…eams The first part of the new Chat (Drive Chat specs, P0 part A1). Nothing uses it yet, and with the flag off nothing changes: today's /dashboard/agent keeps its own tables and code. - CHAT_AGENTIC turns the new Chat on, read on the server at request time (web lib/chat/flag.ts, server lib/chat-flag.js), so the same build runs with it on or off. CHAT_AGENTIC_ORGS narrows it to listed workspaces. Off unless "true", so a self-hosted install sees nothing new. - 00400 adds chat_conversations, chat_messages, chat_runs, chat_run_steps and chat_user_prefs. A chat is private to its author (CHAT-20 §16c): only they read it, admins included, and messages, runs and steps follow their chat's policies, so sharing with the team can be one more policy later. The server writes them; a person writes only their own Chat settings (menu, where pages open, focus areas, model, effort), kept on the server so they follow them across devices (DECISIONS N3). - A step's tool and debug record stay with the server: members are granted every other column. Step kinds live in chat_step_kinds, so a new kind is an inserted row, not a rewritten check. - web lib/chat/events.ts types every event a run streams (CHAT-00, with room for CHAT-25's), names steps by their place in the run, and chatEvent() refuses a tool's name, a debug record, an id or a dollar amount before an event reaches the browser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A deleted brand now leaves its chats with their author, as about the workspace, the way agent_conversations does (00009), rather than deleting a person's private history with it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd add app links and the step converter A uuid in an event's text (a page path, a link the person pasted) no longer stops the run: chatEvent() shows it as "…". The answer's own text is still sent as it is, and forbidden keys still throw. - Forbidden keys are patterns now, in the type (ChatForbiddenKey) and at run time alike: any tool key (toolInput, toolResult…) and params; debug, tokens and latency; money (usd, price, amount, spend, cost, cents). A cost multiplier, a percent and a tooltip still pass. - Deliverable cards and page.opened get an optional href for their Open (CHAT-06, CHAT-25): a path under /dashboard/ only, with no host, query, fragment, "//" or ".." part, kept whole by the masking. - steps.ts holds chat_run_steps' member columns (every one but tool and debug_json, checked against the migration's grant) and toClientStep(), the one way a stored step reaches the browser: built field by field, so a row read with the service role gives up its tool and debug record too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ch new message - chat_user_prefs.focus holds at most the 8 areas, each once (chat_text_array_distinct: a check can't hold a subquery); the model column says the server checks it against the catalog before a run. - A trigger on chat_messages sets its chat's last_message_at (security definer, so it reaches the chat whoever writes the message; it never moves back). - The step kinds comment no longer says a kind can be removed: steps keep theirs, and there is no index on kind to find out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y be read A change applies when the app starts again: a restart when self-hosted, a new deployment on Vercel. The web flag is for dynamic server code only; a page rendered at build time would keep the build's value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… New pill and badge Chat P0, part D1: the pieces Chat and Content Editor share (Chat agentic plan §2), copied from the approved Chat v2 mockups, and a page to sign them off. Nothing uses them yet. - components/agentic: the agent avatar (idle, working, waiting, done; it breathes, bobs and sweeps while working, an amber ring grows out of it while it waits, no spinning ring), the status pill beside a title, the approval pills of a step (Auto, Asks you, Auto · logged, Needs your click, Done), the step marker (not started, running, needs you, failed, done), the list dot with its progress line and the "What the dots mean" legend (chatMenu.dotLegend), the outlined New pill, the attention dot and count, and the done tick. - Each says its state to a screen reader, or hides when the words beside it already do; coloured states have their dark-theme colours; every motion stops with reduced motion. - /dashboard/chat/preview shows every piece in every state, only with CHAT_AGENTIC on for the workspace (not found otherwise), and is not in the menu. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…st look The owner's sign-off on the shared agent pieces (Chat P0, D1): - The avatar turns soft red when a run stops on a failed step, as the Chat v2 mockup's failed run shows it; the failure card (D2) uses it. - tone="muted" is the Agents list look from the governance mockup: the avatar sits still, with no spark; an idle, paused or stopped agent is a grey tile, and one waiting for the person wears a fixed amber ring. Chat keeps the dark, moving avatar by default. - The legend's "?" button says "What the dots mean", as the legend it opens does, not "What the colors mean". - The preview page shows the failed state and the Agents list avatars. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
approved these changes
Oct 29, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
What I checked
- Flag off changes nothing. The one new route is
/dashboard/chat/preview, a server component.- It reads the user from the session and their
profiles.organization_id, then callschatAgenticEnabled(orgId). - Anything but on for that workspace is
notFound(), and so is a signed-out visitor. - The read uses cookies, so the page is rendered per request, and the flag isn't frozen at build time.
- It isn't linked from the menu.
- The tests cover
CHAT_AGENTICunset,''and'false', a workspace not inCHAT_AGENTIC_ORGS(and the list's case and spaces), and signed out.
- It reads the user from the session and their
- Components (
components/agentic).- They are presentational. The only client component is
DotLegend(a Popover), and there's no data fetching, effect, storage ordangerouslySetInnerHTML. - Every animation also has
motion-reduce:animate-none. - The status pills and dots carry text labels, not colour alone.
- The legend's trigger has an
aria-label. - The only control on the page has a
data-actionid (chatMenu.dotLegend), and the test checks for it.
- They are presentational. The only client component is
- CSS.
globals.cssadds a@themeblock of keyframes, one colour token and theanimate-*utilities. Nothing existing is redefined. - Copy. The
agentic.*strings inen.jsonare plain English. On main merged with #1759,en.jsonconflicts only because both add a top-level block at the same place, so keep both. - No PostgREST embeds. No migration.
- Tests:
components/agenticand the preview page test pass.tsc, eslint and the format check pass on the stack merged with main.
Follow-ups
- When Chat ships, the preview page can go, or stay staff-only. As it is, any member of a workspace with Chat on can open it, which is harmless (it shows only static samples).
7 of 8 tasks
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Chat P0, part D1: the agent's shared pieces that Chat, the runs tray and agent tasks reuse, plus a preview page for design sign-off. The design was approved by the product owner on 2026-10-29, from the local preview in light and dark mode at 1024 px. Every piece follows the approved Chat v2 mockup (
CHAT-mockup-v2.html, andCHAT-mockup-v2-governance.htmlfor the Agents list).web/src/components/agentic/AgentAvatar(30/26/22 px)tone="muted"is the Agents list's look: still, grey when idle, paused or stopped, with a steady amber ring when it needs you. In chat it stays black and alive.StatusPillApprovalPillStepMarkerListDot,ListProgressDotLegendNewPill,AttentionDot,AttentionCount,DoneTickdata-actionid (CHAT-23).prefers-reduced-motion.green,amber,red), each with adark:pair. Greys use theme tokens. The spark's gold is--color-agent-spark.web/messages/en.json›agentic.Preview:
/dashboard/chat/previewshows every piece in every state.CHAT_AGENTIC, and byCHAT_AGENTIC_ORGSwhen that is set.Related issue
None (Chat P0, Drive › Chat).
Stacked on #1758 (Chat A1, for the flag). Independent of #1759. The diff against #1758 holds only this change.
Type of change
feat— New feature (behindCHAT_AGENTIC)How to test
web/.env.localsetCHAT_AGENTIC=trueand restartyarn dev./dashboard/chat/preview.Screenshots
Light and dark at 1024 px were checked in the browser; screenshots are available on request.
Checklist
content/editor/[draftId]/_before-publish.test.tsxfailed on the focus race that test(content): wait for the dialog's first focus before opening the JSON-LD code #1753 fixes; this branch doesn't touch it.🤖 Generated with Claude Code