Skip to content

fix(j5): a persona draft's definition keeps its layout in the Recorded by J5 panel - #992

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/inbox-record-panel-967
Nov 9, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/inbox-record-panel-967

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

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

  • Splitter. J5-owned 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 (indented in agentPersonaDrafts.ts).
  • Web and mobile panels. Both J5RecordPanels render a block in monospace, laid out as written, scrolling sideways instead of wrapping. The prose around it still wraps.
  • What stays the same. The record is still plain text, so no markup in it takes effect, and a record with no indented block renders as before, except that blank lines at its very start or end are dropped.

Tests: written first in inbox.test.ts, and failing (splitRecordText didn't exist):

  • a draft-shaped record splits into prose, the block (relative indentation and a blank line kept), and prose;
  • a record with no indented block, with a list line and markup in it, comes back as one prose part with its text unchanged.

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).

State Before After
Android: the draft's definition Persona draft definition in the Recorded by J5 panel on Android, before Persona draft definition in the Recorded by J5 panel on Android, after
Web: the draft's definition Persona draft definition in the Recorded by J5 panel on web, before Persona draft definition in the Recorded by J5 panel on web, after

After: the long line scrolled to its end, on Android and on web.

Long definition line scrolled to its end on Android, after

Long definition line scrolled to its end on web, after

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 d3bd3c0b47 by the crew tester (Sol 6.1), with a real Haiku persona proposal.

  • Base: the definition wraps as prose, and continuation lines lose their indent.
  • This branch: the definition is a monospace block with its nesting intact. It scrolls sideways to the exact end of the long line and back, on both clients. The prose above and below still wraps.

Since then the branch was rebased onto trunk 116940cabf (#991, #981). The rebase resolved one import line in InboxScreen.tsx, so the code under test is unchanged and wasn't retested.

Not exercised:

  • other record kinds (an escalation), markup in a record, and more than one block;
  • web's pinned adjudication dock, which uses the same panel;
  • dark theme, iOS, and saving or rejecting the draft.

Checklist

  • One concern: the Recorded by J5 panel's quoted block
  • Tests: written first, for the splitter
  • UI changes: before/after stills and videos above, Android and web
  • Live testing: Android and web passed; the section above says what was not exercised
  • Upstream-owned files: none edited
  • Upstream product: no change
  • Surfaces: the Inbox on web, desktop and mobile, and web's pinned adjudication dock, which uses the same panel. An escalation record has no indented block, so it renders as before. No contract change.
  • Docs: in the wave's docs PR

Built by Claude Opus 5.5 in Claude Code (J5 crew seat builder-identity).

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 9, 2026 8:50am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 38 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 116940c and cd17f91.

Files selected for processing: 5

  • apps/mobile/src/j5/inbox/InboxScreen.tsx
  • apps/mobile/src/j5/inbox/J5RecordPanel.tsx
  • apps/web/src/j5/a2a/J5RecordPanel.tsx
  • packages/client-runtime/src/j5/inbox.test.ts
  • packages/client-runtime/src/j5/inbox.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions github-actions Bot added size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Nov 9, 2026

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. splitRecordText decides 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's indented() prefixes blank lines too, so a definition stays one block.
  • The record stays plain text. Web renders a pre or a p with a text child, mobile renders Text nodes, 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 J5RecordPanel component.
  • 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>
@Jacksondr5
Jacksondr5 force-pushed the j5code/inbox-record-panel-967 branch from d3bd3c0 to cd17f91 Compare November 9, 2026 08:50

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Jacksondr5
Jacksondr5 merged commit 88b39d2 into j5/main Nov 9, 2026
39 of 41 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/inbox-record-panel-967 branch November 9, 2026 09:25
Jacksondr5 added a commit that referenced this pull request Nov 11, 2026
…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>

This branch was successfully deployed

1 active deployment
Preview — cd17f91d Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile Inbox: the Recorded by J5 panel wraps a persona definition as prose

1 participant