Skip to content

Reading a conversation: fold a long message, show a table's buttons on hover - #2756

Open
samjulien wants to merge 14 commits into
mainfrom
claude/conversation-reading
Open

samjulien wants to merge 14 commits into
mainfrom
claude/conversation-reading

Conversation

@samjulien

@samjulien samjulien commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Builds on #2634 (Guido), now merged; this PR targets main.

What changed

Compared with Claude and ChatGPT:

  1. A long message folds. A person's message was shown in full, so a pasted prompt pushed the Bot's answer off the screen. A message longer than about ten lines now shows its first eight, faded at the bottom, with a Show more / Show less button under it (FoldedMessage, app/src/components/channels/folded-message.tsx).
    • It's a real button (Button variant link, size xs) with aria-expanded and aria-controls.
    • "Long" is measured by height at the current width, and measured again when the width changes. A message only one or two lines past eight is shown whole, so the button never costs more room than it saves.
    • The text is clipped (max-h-[8lh], eight of its own lines), not removed, so a screen reader, the message's Copy and find in page still reach all of it. Find scrolls a clipped box to show a match; a scroll of the folded box unfolds it.
    • Only the person's messages fold. A Bot's reply is unchanged.
  2. A table's buttons wait for the pointer. Copy, Download and Full screen sat above every table in a reply. They now fade in while the pointer is on the table or focus is inside it, the same way a reply's own Copy shows on hover. Where there is no hover (a touch screen) they always show. They keep their titles and stay in the tab order, and their row keeps its room, so the table doesn't move when they appear. An open menu keeps focus inside, so it keeps them shown.

#2634's typesetting is untouched: no size, line height or spacing changed. Tokens and existing primitives only (Button, Tailwind's mask-b-from-*, the hover rule ON_HOVER already uses). No API or database change.

Screenshots

Workbench, a pasted 14-line prompt, then a reply with a table injected through __workbenchStreams.

The message, light (Desktop host):

Before Folded Unfolded

The message, dark:

Before Folded Unfolded

The table, light and dark:

Before After, at rest After, pointer on the table

Web host (folded message, table with pointer):

Message Table

390px phone (touch emulated: the table's buttons show at rest):

Before After Table, light After, dark Table, dark

Checked

  • bun run typecheck in app/, biome lint and biome format.
  • New app/tests/conversation-reading.test.tsx (5 tests): fold and unfold with aria-expanded and aria-controls; no fold one or two lines past the limit; a scroll of the folded box unfolds it; in a transcript only the person's message folds, every line still in the page; the table's actions are hidden at rest only where the device can hover, shown on hover or focus within, and keep their buttons and titles.
  • The PR doesn't touch CHANGELOG.md; the note is below.
  • Existing tests for tables, replies, the transcript, Copy and the look guards: 258 pass, 13 skipped (browser-only), 0 fail.
  • In real Chromium (workbench), scrolling the folded box unfolds it. Real Ctrl+F can't be driven headless (window.find finds nothing there, even visible text), so the find path is checked by its mechanism, not by pressing Ctrl+F.

Changelog

Conversations.

  • A long message folds, and a table's buttons wait for the pointer. A message of yours longer than about ten lines shows its first eight, with Show more and Show less, so a pasted prompt no longer pushes the answer off the screen. Copy and find still reach all of it. Copy, Download and Full screen above a table in a reply show when you point at the table or tab into it, and always on a touch screen.

guidovizoso and others added 13 commits December 1, 2026 14:28
…dings, a longer line, plain quotes

A Bot's reply, and the Markdown in an interface it draws, take typeset's spacing and type. typeset.css is shadcn's file unchanged; the conversation's tuning is .typeset-reply in styles.css. Streamdown's own utilities on headings, lists, quotes, rules and bold outrank typeset, so a reply draws those elements bare (replyMarkdownComponents). Code blocks and tables keep #2582's rules.
…glyph for its kind

It was a bordered pill in smaller type. Now it is underlined like any link, with a muted glyph in front; its kind is still said to screen readers and left out of a table's copy. Nothing in it is taller than the text, so the line keeps its height.
--text-conversation goes from 16px to the app's base 15px. The message box still opens two lines tall, now 45px.
shared/plan.ts defines update_plan: the whole list each time, 2 to 8 steps, each pending, in progress, done or failed, and a description that keeps it to jobs of three or more steps. The app draws one plan per turn as a quiet list where it first appeared, in view while the turn runs and folded with the work once it is answered.
… person's answer to its question, and keeps its last whole plan while an update is written
…x on a touch screen, where Safari would zoom into it
…n hover

- A person's message longer than about ten lines folds to its first eight, with a Show more /
  Show less button (aria-expanded, aria-controls). The text is clipped, not removed (max-h 8lh),
  so a screen reader, Copy and the browser's find still reach it; a scroll of the folded box, which
  is how find shows a match there, unfolds it. Measured by height, again when the width changes.
- Copy, Download and Full screen above a table in a reply fade in on hover or focus within the
  table, and stay shown where there is no hover. Their row keeps its room, so nothing moves.

No size or spacing from the typeset change is touched.
… Streamdown's with the pointer on it

Safari doesn't focus a button on a click, so an open Copy or Download menu faded away with its buttons once the pointer left the table. An open menu now keeps them shown.

The browser test compared the table at rest, where ours now hides its buttons on purpose. It compares with the pointer on the table, and a new test holds that the buttons are hidden at rest and shown on hover, on focus and while a menu is open, in Chromium and WebKit.
Base automatically changed from guido/readable-answers to main December 2, 2026 12:03
…ude/conversation-reading

# Conflicts:
#	app/src/theme.css
@samjulien
samjulien marked this pull request as ready for review December 2, 2026 12:11

This branch has not been deployed

No deployments
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.

2 participants