Repository navigation
fix(j5): a quoted definition wraps under its own indent instead of scrolling sideways - #1014
Conversation
…rolling sideways #992 made the Recorded by J5 panel's quoted definition a block that scrolled sideways; Jackson found sideways scrolling poor on a phone. The splitter now keeps each line's indent apart from its words, and web and mobile draw the indent beside the words, so a long line wraps under its own start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Jacksondr5
left a comment
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol (Claude Opus 5.5 and GPT Sol 6.1), head 1e93863
Both of us reviewed the PR independently. Neither found anything that blocks merge.
- The split.
splitRecordTextnow returns a block aslines: {indent, text}[]. The indent is the spaces left after the 4-space marker, so relative indentation is kept. A whitespace-only line gets an empty indent and renders as a space on mobile and a non-breaking space on web, so its height is kept. - Both panels. Each draws the indent span (
whitespace-pre, monospace), then aflex-1span that wraps (min-w-0 whitespace-pre-wrap break-wordson web), so a long or nested line wraps under its own start. - Plain text. It's still literal text children on both clients, and web's hostile-record browser test passes.
- Tests. The splitter test was changed first and failed. 19 runtime Inbox tests and 1 hostile-record browser test pass.
Note (not blocking): on mobile, each line is now its own selectable Text, so copying a whole definition means selecting line by line; #992 allowed one selection. Web selects across lines as before.
Code approval: the panel has no open code findings. Still pending: the captures on web and mobile, and green J5 CI.
Problem
#992 made the Recorded by J5 panel show a persona draft's quoted definition as a monospace block that scrolls sideways. At Checkpoint 4 Jackson found sideways scrolling poor on a phone: long lines should wrap, keeping each line's indentation, with continuation lines under their own line. Web and mobile should still match. Part of #1010 (item 4).
What changed
splitRecordText(packages/client-runtime/src/j5/inbox.ts) still finds the quoted block by indentation alone: a run of lines with four leading spaces. It now returns the block as lines, each with its own indent apart from its words.J5RecordPanels draw each line as two pieces side by side: its indent, in the same monospace font, then its words, which wrap in the width left over. A long line therefore wraps under its own start, and nested lines stay nested. Nothing scrolls sideways.Tests: the existing splitter case in
inbox.test.tsnow expects the block as lines with their indents, including a nested line and a blank line. It failed before the change. Web's hostile-record browser test still passes.UI changes
A real Haiku agent's persona draft with a long, nested instruction, base (before) and this PR (after), with the same definition on both.
Before: the long lines are reached only by scrolling sideways.
After: the record's introduction and the top of the definition.
Android, before: scrolling sideways.
android-sideways-bed54-before-published.mp4
Android, after: wrapped, read top to bottom.
android-wrapped-1e938-after-published.mp4
Web, before: scrolling sideways.
web-sideways-bed54-before-published.mp4
Web, after: wrapped.
web-wrapped-1e938-after-published.mp4
Live testing
Android and web: PASS at
1e938631cb, this PR's head, by the crew tester (Sol 6.1), with a real Haiku 5.5 persona proposal whose 1,046-character definition nests three levels.Not exercised:
Checklist
personas.mdand the Inbox definition goes in the wave's docs PRBuilt by Claude Opus 5.5 in Claude Code (J5 crew seat builder-identity).
🤖 Generated with Claude Code