Repository navigation
ATL-900: CommsView team-chat blocks, and ToolCallCard / TurnRow opt-in props - #19
Merged
Merged
Conversation
…rnRow opt-in props Part 1, the team-chat view model in the package: - comms-view.ts: CommsConversationRowView, CommsAuthor (person or badged integration), CommsReaction, CommsReplyRef, CommsSendState, CommsMessageView, CommsCallMarker, CommsTranscriptRow, with the wire field mapping for adapter authors. People are the session view's PersonRef. - comms-view-helpers.ts: transcriptRows, reactionChips, conversationTitle (web's rule), unreadBadge, formatClock (cached, 1,024 FIFO), formatDayLabel. - CommsConversationRow, CommsMessageRow (memo; toolbar mounts on hover, focus or an open menu; colour and opacity only), CommsDayDivider, CommsUnreadLine, CommsComposerShell (desktop's glass-rim bar with the tucked reply strip). - rounded-composer utility (23px), desktop's composer corner. Part 2, opt-in props: - ToolCallCard: controlled open/onOpenChange, data-tool-call-id, onCopy per whole text payload, labels (ToolCallCardLabels, DEFAULT_TOOL_CALL_CARD_LABELS). - TurnRow: renderItemFooter, openToolCallIds/onOpenToolCallIdsChange, thinkingLabel, thinkingBody, onOpenAttachment, onCopyPayload; commentSlot now also anchors thinking items.
…pen" for screen readers axe's label-content-name-mismatch: an aria-label of "Open <name>" dropped the size the chip shows, so the accessible name no longer contained the visible text.
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
ATL-900. Team chat gets one view model in the package, built the same way the session view was. Desktop's current comms components are the reference.
Part 1: CommsView (
src/components/comms/, exported from the root entry, which needs no optional peer)comms-view.ts: types only.CommsConversationKind,CommsConversationRowView,CommsAuthor(a person, or a badged integration withvia),CommsReaction,CommsReplyRef(loaded/deleted/missing),CommsSendState,CommsMessageView,CommsCallMarker,CommsTranscriptRow. People are the session view'sPersonRef. The docblock maps each wire field to the model for adapter authors.comms-view-helpers.ts:COMMS_GROUP_WINDOW_MS,transcriptRows,reactionChips,conversationTitle(web's rule; desktop's "A & B / +N" is retired),unreadBadge,formatClock(cached, 1,024 FIFO, optionalhourCycle) andformatDayLabel(at, now).CommsConversationRow,CommsMessageRow(memoised),CommsDayDivider,CommsUnreadLineandCommsComposerShell, withCommsMessageRowLabels/DEFAULT_COMMS_MESSAGE_ROW_LABELS.rounded-composerutility (23px): desktop's composer corner, now in the package.Part 2: opt-in props on the session blocks
ToolCallCard:open/onOpenChange,data-tool-call-idon the root,onCopyon each whole text payload (the check shows for 1,200ms, and only whenonCopyresolvestrue), andlabels(ToolCallCardLabels,DEFAULT_TOOL_CALL_CARD_LABELS).TurnRow:renderItemFooter,openToolCallIds/onOpenToolCallIdsChange,thinkingLabel,thinkingBody,onOpenAttachment, andonCopyPayload, which passes through to each card.Where desktop overrode the issue text (desktop is the source of truth):
data-tone.subtle. The message avatar islg(32px, desktop draws 30) and the gutter isw-9.border-success/60 bg-success/15.IconButton sm).ratchet-allow, so it stays out.Other deviations, flagged:
reactionChipstakes{ userId, emoji }rows, not wireuser_id.labelsgainsunknownAuthor,jumpToMessage,via(name),postedBy(name)andreactors(reaction). The last one carries the names desktop shows in the chip tooltip.ToolCallCardLabels.truncated(part)andbinary(part, size?)takepartso the existing "Output truncated" and "Binary output" strings stay unchanged.conversationTitlekeeps "Former member" whole in a group title ("Former member, Lin"), where web's rule would print "Former".thinkingBodydefaults to"text", which is the current rendering.stories/components/comms/, fixtures instories/components/comms/fixtures.ts), notcomms/fixtures/. There is nopackage-boundary.test.ts.router-agnostic.test.tscovers this, and both acceptance greps are clean.blocks-comms-messagerow--unread-line-label, since one file holds one title.Left out:
SessionTimelineforwarding of the newTurnRowprops: that file is outside this issue's list.Upgrade note (there is no unreleased section in the README, so this is for the release batch): Team chat blocks are new on the root:
CommsConversationRow,CommsMessageRow,CommsDayDivider,CommsUnreadLine,CommsComposerShell, theCommsViewtypes and their helpers, plus arounded-composerutility.ToolCallCardaddsopen/onOpenChange,onCopy,labelsanddata-tool-call-id.TurnRowaddsrenderItemFooter,openToolCallIds/onOpenToolCallIdsChange,thinkingLabel,thinkingBody,onOpenAttachmentandonCopyPayload.TurnRow'scommentSlotis now also called for thinking items ({ kind: "message", id }), beside the disclosure.Evidence
bun run typecheck,format:check,theme:check,test(42 files, 386 tests),build,test:consumer,build-storybookandstorybook:smoke: all green.index.json. The plays ran in headless Chromium against the built Storybook with no play exceptions and no console errors, across DisabledRow, Deleted, IntegrationVia, ToolbarOnFocus, AuthorNameSlot, CustomLabels, Transcript, Replying, CustomSend, CustomSendLabel, ControlledOpenToolCall, PlainThinking, OpenableAttachments and CopyPayloads.shots/ATL-900/:Blocks/Comms/*story and each new session story, in Atlas dark and light;MessageRow/Transcript,ConversationRow/ListandComposerShell/Replyingin atlas, dracula and rose-pine, dark and light, desktop and phone.grep -nE "translate|scale-|rotate|transform" src/components/comms/*.tsxand the contracts/tauri/router/mock grep both return nothing.Merge Danger
TurnRownow callscommentSlotfor thinking items, which the issue asks for. The thinking disclosure also sits in one extra flex wrapper.session-timeline.test.tsx's anchor expectation gainsmessage:e2. Any consumer that passescommentSlotgets a comment control beside each thought.ToolCallCardalways carriesdata-tool-call-id. This is additive.rounded-composeris a new utility name. Desktop defines the same one inglobals.css, so delete desktop's copy on adoption. It is the same value, so nothing breaks in between.CommsMessageRowis memoised by identity. Callers must keepcan,labels,reactionEmoji, the slots and the callbacks stable, or every row re-renders.4066b885onuzayermasud/atl-426-design-system.