Repository navigation
fix(j5): a persona draft's definition keeps its layout in the Recorded by J5 panel - #992
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 5 billable files and costs up to $1.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 15 seconds for your next included review. View limit details
|
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 d3bd3c0
Both of us reviewed the PR independently. Neither found anything that blocks merge.
- The rule.
splitRecordTextdecides by indentation alone. A run of lines with four leading spaces is a block: exactly four spaces are removed, so relative indentation inside the block is kept. The server'sindented()prefixes blank lines too, so a definition stays one block. - The record stays plain text. Web renders a
preor apwith a text child, mobile rendersTextnodes, and nothing is parsed as markup. Web's hostile-record browser test still passes. - Escalations. They're unaffected unless their text contains four-space-indented lines, which would show in monospace, still as plain text.
- One precision on the "exact prose" claim. Prose is trimmed of leading and trailing newlines even when the record has no block, so a record with no indented line is exact apart from that outer whitespace. This makes no visible difference.
- Every consumer. Web's Inbox page, web's adjudication dock and mobile's Inbox all use the same panel; mobile's inline panel becomes the
J5RecordPanelcomponent. - Tests. They were written first. 20 focused tests pass: 19 runtime Inbox tests and 1 hostile-record browser test.
Code approval: the panel has no open code findings. Still pending: the sideways scrolling on web and mobile needs the tester's captures, and green J5 CI.
…d by J5 panel The panel wrapped a persona draft's quoted definition as prose, so wrapped lines lost their indentation. A shared splitter now separates the record's indented block, by indentation alone, and web and mobile show it in a monospace block that scrolls sideways, with the prose still wrapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d3bd3c0 to
cd17f91
Compare
Jacksondr5
left a comment
There was a problem hiding this comment.
Conflict-only check: reviewer-opus, head cd17f91 (rebased onto 116940c)
git range-diff shows the commit unchanged apart from context: InboxScreen.tsx now imports both #991's WorktreeCleanupsSection and this PR's J5RecordPanel, side by side. The code approval stands.
The earlier Test Web failure (sharedTimeline.browser.test.tsx, "keeps a message on screen when the thread becomes shared") is in a file this PR doesn't touch. If it fails again on this head, it's a flaky test from #900 to fix or file, not something this PR should retry around.
…rolling sideways (#1014) #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>
Problem
The Inbox's Recorded by J5 panel wraps a persona draft's quoted definition as prose. On a phone, long lines wrap and continuation lines lose their indentation, so the definition's structure is hard to read. Web's panel does the same: it keeps newlines but wraps every line. Closes #967.
What changed
splitRecordText(packages/client-runtime/src/j5/inbox.ts) splits a record into prose and the indented blocks it quotes. The rule is indentation alone: a run of lines with four leading spaces is a block. It doesn't parse YAML. The server already indents a draft's definition this way (indentedinagentPersonaDrafts.ts).J5RecordPanels render a block in monospace, laid out as written, scrolling sideways instead of wrapping. The prose around it still wraps.Tests: written first in
inbox.test.ts, and failing (splitRecordTextdidn't exist):Web's existing browser test checks that a hostile record still renders as one plain paragraph.
UI changes
A real Haiku agent's persona draft with a long single-line instruction, base (before) and this PR (after).
After: the long line scrolled to its end, on Android and on web.
Before, Android: the definition wraps, and a sideways swipe does nothing.
android-wrapped-355672f-before.mp4
After, Android: the definition scrolls sideways to the end of its long line and back.
android-horizontal-excerpts-d3bd3c0-after.mp4
Before, web: the definition wraps, and a sideways wheel does nothing.
web-horizontal-355672f-before.mp4
After, web: the definition scrolls sideways and back.
web-horizontal-short-d3bd3c0-after.mp4
Live testing
Android and web: PASS at
d3bd3c0b47by the crew tester (Sol 6.1), with a real Haiku persona proposal.Since then the branch was rebased onto trunk
116940cabf(#991, #981). The rebase resolved one import line inInboxScreen.tsx, so the code under test is unchanged and wasn't retested.Not exercised:
Checklist
Built by Claude Opus 5.5 in Claude Code (J5 crew seat builder-identity).
🤖 Generated with Claude Code