Skip to content

feat(platform): draw a chat's own turns as the thread's bubble - #4570

Merged
yannickmonney merged 7 commits into
mainfrom
feat/chat-thread-parity
Oct 9, 2026
Merged

yannickmonney merged 7 commits into
mainfrom
feat/chat-thread-parity

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

A chat and a task now draw the viewer's own words the same way. A chat's user turns render through the shared ThreadMessage (@tale/ui/thread), the same component a task's own comments use:

  • Bubble: the thread's own-bubble geometry and surface. Width answers to the conversation column (85 %, 75 % from a 28rem column), so the transcript scroller is now a size container.
  • Long messages fold behind Read more / Show less past 384px through ReadMore. The text stays in the DOM for find-in-page and screen readers. This replaces the chat's hand-rolled Show more.
  • Time and Edit message wait for hover, keyboard focus or touch, as on a task comment.
  • Branch navigator: a forked message's ‹ n/m › stays in view. It uses a new trailing slot on ThreadMessage: the always-visible end of an own message's footer row.
  • Placeholders: the dormant stand-in and the loading placeholder use the same bubble classes and reserve the footer row, so waking a row or swapping in the transcript moves nothing.
  • Focus: closing the editor (Escape, Cancel, a started edit) returns focus to the pencil.
  • Shared chat: the title and byline sit on the transcript's column.
  • Automations: a settings form's description clamps through ReadMore's lines mode instead of its own measuring code.

Deleted: app/features/chat/lib/layout.ts and the chat / automations showMore / showLess strings (en, de, fr).

Stacked on #4559.

Verification

  • @tale/ui thread and read-more unit tests pass, including a new trailing test.
  • Platform chat and automations component suites pass (1,273 tests).
  • message-thread.browser.test.tsx passes 16/16, including a new test that Escape returns focus to the pencil. The follow-scroll test now appends three replies: with the wider bubble, one reply fit inside the response slack, so the test no longer covered the scrolling.
  • Platform and ui typechecks are clean.
  • Dev stack:
    • 1440px light and dark, and 390px: clamped long bubble, hover footer, ‹ 2/2 › navigator.
    • Shared chat at 600, 1024 and 1440px: the title and the transcript start at the same x.
  • Adversarial review, three lenses (correctness, accessibility, layout), each finding independently verified:
    • Fixed in this PR: the shared-chat alignment, line-height parity, the dormant footer reserve, and focus restore.
    • The composer-alignment part of the layout finding was refuted. The column's 16px → 24px inset at ≥512px matches what the thread layout constants already specified.

Docs and manual tests

  • Chat basics and the automations catalog in en, de and fr.
  • design/docs/app.md.
  • The ui-docs thread page now documents trailing.
  • New manual boxes: CHAT-F63–F65, CHAT-A9, CHAT-P6 and AUTO-F69, with rows in reference/automation.md.

@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from 28acd38 to 3cd0849 Compare October 8, 2026 15:23
@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch 2 times, most recently from 73695a7 to 8268a47 Compare October 8, 2026 17:24
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from 3cd0849 to fb3f9d3 Compare October 8, 2026 17:24
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Reviewed head 8268a47dfa18f62646a55bddf3679d60d29c59b1 (base fb3f9d3495e7066db83f1dde9fd721dd164f1a84). I did not author this PR. I reviewed the complete 28-file diff, the shared ThreadMessage primitive and its tests, chat callers/placeholders, locale catalogs, docs/manual coverage, and the exact-head check runs.

Verdict: ACCEPT

  1. UX-CLARITY — PASS. User turns now use the same ThreadMessage variant="own" bubble contract as task comments. The footer keeps branch navigation visible while time/edit affordances reveal on hover/focus/touch, and the docs/manual cases describe the resulting states.
  2. A11Y — PASS (source evidence). ThreadMessage keeps the body in the DOM for clamped content, delegates the labelled Read more/Show less control to the shared ReadMore, uses a semantic <time>, and restores focus to the edit button after cancel/accepted edit (services/platform/app/features/chat/components/message-item.tsx). The branch navigator remains in the footer and is supplied as a separate trailing control. Runtime screen-reader/keyboard behavior remains covered by the declared manual cases, not claimed as executed here.
  3. UI-RESPONSIVE — PASS (source evidence). Chat, shared-chat, and skeleton rows now use the thread column and container-query geometry; the shared width/surface tokens are reused for live and dormant user rows. The manual suite covers 1440px/390px, long content, themes, and placeholder replacement; no browser execution was performed in this API-only review.
  4. LOCALE — PASS. The removed showMore/showLess keys are removed consistently from en/de/fr automation and chat catalogs, while the shared common.actions.readMore/showLess contract is used by the new ReadMore path. No de-CH-only override is introduced or left unmatched in this diff.
  5. CODE — PASS. The change removes duplicated chat layout/clamp logic and reuses @tale/ui/thread/layout, ThreadMessage, and ReadMore; affected callers include live, dormant, skeleton, and shared-chat paths. The added component/browser tests exercise the new trailing footer and edit-focus behavior and are meaningful regressions for the prior implementation.
  6. CICD — PENDING/HELD, not a code finding. At this head, Opengrep OSS and PR scope completed successfully. CI ready (CLI) and CI ready (SAST) failed because their prerequisite jobs were cancelled/skipped; logs contain ##[error]release: expected skipped, got cancelled; pr-scope: expected success, got cancelled; Scope must explicitly be true or false and ##[error]sast: expected success, got cancelled. These are workflow/base-run cancellation outcomes, not evidence of a failure caused by this PR. Other candidate/build jobs are skipped or cancelled, so merge readiness is not established.

No checkout, install, test, rerun, push, merge, or Ops-review credential was used.

@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch from 8268a47 to 9fc5928 Compare October 8, 2026 18:57
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from fb3f9d3 to 59d52bc Compare October 8, 2026 18:57
@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch from 9fc5928 to 15933b3 Compare October 8, 2026 21:11
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch 2 times, most recently from d8d0483 to c266110 Compare October 8, 2026 22:17
@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch from 15933b3 to ecc983a Compare October 8, 2026 22:17
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from c266110 to 275bbed Compare October 8, 2026 23:28
@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch 2 times, most recently from 98b99ae to fbf6c31 Compare October 9, 2026 01:51
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from 275bbed to 245c81c Compare October 9, 2026 01:51
@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch from fbf6c31 to b8ba3c2 Compare October 9, 2026 02:37
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from a30b67a to 9e78259 Compare October 9, 2026 02:56
Base automatically changed from feat/unified-conversation to main October 9, 2026 02:56
ThreadMessage takes a trailing slot: an own message's always-visible end of its footer row, after the time and actions that wait for hover or focus. A chat's branch navigator sits there.
The user's turns render through ThreadMessage like a task's own comments: the shared bubble geometry, Read more past 384px, the time and edit pencil on hover, and the branch navigator always in view. The dormant row and the loading placeholder take the same classes, and the transcript scroller becomes the size container the thread's column answers to. The chat's own layout constants and Show more strings go.
The declared form's operator instructions keep their three-line clamp through ReadMore's lines mode instead of a hand-rolled measure, and share its Read more / Show less labels.
The thread guide and the ThreadMessage story say what `trailing` is for: a
control that stays in view at the end of an own message's footer while its
time and actions wait for hover or focus, such as a chat's branch navigator.
An other-voice message has no such row and ignores it.
The chat guide in EN, DE and FR says how your own messages read: a long one
behind Read more, the time and Edit message on hover, focus or touch, and the
branch navigator beside them; the package catalog guide says a settings
form's description folds after three lines. The design doc gives chat turns
and task comments one own-message anatomy. Manual boxes CHAT-F63 to F65,
CHAT-A9, CHAT-P6 and AUTO-F69 come with their automation rows.
…tate

Closing the message editor hands focus back to the pencil that opened it instead of dropping it to the page. A dormant user row keeps the room of the footer row the awake bubble carries, and a user's words render at the bubble's 24px line height, so neither waking a row nor swapping in the loading placeholder moves what sits below.
The title and byline answer to the same container and column as the messages under them, so both switch to the wider inset at the same width.
@yannickmonney
yannickmonney force-pushed the feat/chat-thread-parity branch from b8ba3c2 to 9b5fda8 Compare October 9, 2026 02:57
@yannickmonney
yannickmonney merged commit 139494e into main Oct 9, 2026
@yannickmonney
yannickmonney deleted the feat/chat-thread-parity branch October 9, 2026 02:57
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