Repository navigation
feat(drafts): readable annotation thread (markdown + sender distinction) - #225
Merged
Merged
Conversation
The annotation rail rendered every thread message as raw plain text in a cramped ~320px column, so a structured multi-point Aye reply collapsed into an unreadable wall. This is a presentation pass on the thread display: - Render message bodies with the shared Markdown renderer (@multica/views/common/markdown, mode="minimal") so bold, numbered/bulleted lists, headings, inline code, and links render with token-driven typography — the same renderer chat/channel messages use. - Distinguish senders: each expanded-thread message now shows an avatar (ActorAvatar base, Bot affordance for Aye), the sender name (Aye via the shared turn.agent_name string, or the resolved member name), and a relative timestamp. Aye is set apart with a primary-accent avatar/name + robot icon. - Room to breathe: widen the rail (w-80 → w-96), render the full conversation (including the opener) when expanded, comfortable padding/line-height and message grouping. Thread mechanics (typed header, reply box, Resolve/Dismiss/Reopen, open-count badge, orphaned tray, re-anchoring) are unchanged. Frontend-only; no backend, schema, or behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
The Drafts annotation thread / side conversation (the right "Annotations" rail) rendered every thread message as raw plain text in a cramped ~320px column. A structured multi-point Aye reply — bold, numbered lists, headings, code — collapsed into an unreadable wall. This is a presentation pass on the thread display itself; no behavior, backend, or schema change.
Changes (frontend only —
packages/views/drafts/)1. Markdown rendering. Expanded-thread message bodies now render through the app's shared markdown renderer —
Markdownfrom@multica/views/common/markdownwithmode="minimal"(the mode whose docstring is literally "Best for: Chat messages"). Same renderer chat + channel messages use. Bold/lists/headings/inline-code/links render with tasteful, token-driven typography (no new markdown lib, no hardcoded colors).2. Sender distinction (human vs Aye). Each message in the expanded thread is now a conversation row: an avatar + sender name + relative timestamp + the rendered body.
author_type: "agent") reuses the baseActorAvatar(@multica/ui/components/common/actor-avatar, theBotrobot affordance) and is set apart with a primary-accent avatar/name plus aBoticon. Labeled from the existingdrafts.turn.agent_name("Aye").useActorName()hook (falling back to a newannotations.youstring).3. Room to breathe. Rail widened
w-80 → w-96(320 → 384px); the editor column (mx-auto max-w-3xl) is unaffected. When a pin is expanded the full conversation renders (including the opener, which was previously only shown truncated in the collapsed card), with comfortable padding/line-height and message grouping. Collapsed cards keep a compact one-line plain-text preview.4. Mechanics unchanged. Typed annotation header (comment/question/suggestion/approve/block/highlight), reply box, Resolve/Dismiss/Reopen, open-count badge, orphaned tray, and re-anchoring all behave exactly as before.
Before → after (structure)
messages[0]raw text → replies as raw<p>text in tinybg-mutedboxes, no sender, no avatar, everything plain-text in 320px.Reused components
Markdown(@multica/views/common/markdown,mode="minimal") — wraps@multica/ui/markdown.ActorAvatarbase (@multica/ui/components/common/actor-avatar) — theBotrobot affordance. Accent uses the--primarysemantic token (see note below).useActorName(@multica/core/workspace/hooks).Verification
pnpm --filter @multica/views typecheck✅ and full monorepopnpm typecheck✅ (6/6)pnpm --filter @multica/views exec vitest run drafts/✅ (59) — extended the thread-panel test (markdown renders as<strong>/<li>; Aye + member sender labels show)pnpm --filter @multica/views lint✅ (0 errors; target file clean)pnpm test✅ (857 views tests, all packages green)i18n: added
annotations.youtoen+zh-Hans.🤖 Generated with Claude Code