Skip to content

fix(j5): a quoted definition wraps under its own indent instead of scrolling sideways - #1014

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/record-wrap-1010
Nov 11, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/record-wrap-1010

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

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

  • Splitter. 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.
  • Web and mobile panels. Both 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.
  • What stays the same. The block keeps its monospace font, the prose around it still wraps, and the record is still plain text. On mobile each line is selectable on its own, rather than the whole block at once.

Tests: the existing splitter case in inbox.test.ts now 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.

State Before After
Android: the nested definition Persona draft's nested definition in the Recorded by J5 panel, Android before Persona draft's nested definition wrapping under its indents, Android after
Web: the nested definition Persona draft's nested definition in the Recorded by J5 panel, web before Persona draft's nested definition wrapping under its indents, web after

Before: the long lines are reached only by scrolling sideways.

The definition scrolled sideways, Android before

The definition scrolled sideways, web before

After: the record's introduction and the top of the definition.

The record's introduction and upper definition, Android after

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.

  • Base: long lines needed sideways scrolling.
  • This head: each long line wraps under its own indent; both end markers in the instruction show; nothing scrolls sideways (two sideways swipes leave the Android view unchanged). The web definition reads exactly as on base, and the prose around it still wraps.

Not exercised:

  • iOS, dark theme and desktop;
  • web's pinned adjudication dock and escalation records (same panel);
  • selecting and copying, very deep indents, unbroken URLs and hostile markup (the web hostile-record test still passes).

Checklist

  • One concern: how the Recorded by J5 panel lays out a quoted block
  • Tests: the splitter case, changed first
  • 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 has no indented block, so it renders as before. No contract change.
  • Docs: the "scrolls sideways" wording in personas.md and the Inbox definition goes in the wave's docs PR

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

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Nov 11, 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 11, 2026 10:08pm UTC

Request Review

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

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The record parser now represents quoted blocks as lines with separate indentation and text. The mobile and web panels render each line separately, allowing text to wrap while retaining its indentation.

Changes: Quoted block wrapping

Layer / File(s) Summary
Block-line parsing and shape
packages/client-runtime/src/j5/inbox.ts, packages/client-runtime/src/j5/inbox.test.ts
RecordPart now represents blocks as lines with separate indentation and text. splitRecordText preserves indentation for block lines, and the test expects the line-based shape.
Mobile and web block rendering
apps/mobile/src/j5/inbox/J5RecordPanel.tsx, apps/web/src/j5/a2a/J5RecordPanel.tsx
Both panels render block lines as separate rows. Indentation is rendered separately from text, which can wrap. Empty lines are displayed as a space or nonbreaking space.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Jacksondr5/j5code#1010: The issue requests wrapped quoted-definition lines that retain indentation in both web and mobile panels. This PR makes that change in both panels.

Suggested reviewers: bryantderosier

Merge Risk: Minimal · up to 1e938

The change makes quoted definitions wrap under their own indentation instead of scrolling sideways. No actionable merge-blocking risk was found; visual checks on Android and web remain pending.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a quoted definition in the Recorded by J5 panel now wraps under its own indent instead of scrolling sideways. The title matches the summary, the description, and the o…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template. It has Problem, What changed, UI changes, Live testing, Upstream impact, and Checklist sections. The Problem section names the defect (sideways scrolli…
Full details: Title check

Explanation

The title names the main change: a quoted definition in the Recorded by J5 panel now wraps under its own indent instead of scrolling sideways. The title matches the summary, the description, and the objectives. It is a conventional fix() title and stays under the usual length.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, What changed, UI changes, Live testing, Upstream impact, and Checklist sections. The Problem section names the defect (sideways scrolling of quoted blocks on phones) and the scope (Part of #1010, item 4). It does not use the required 'Closes #123' form, because the PR is only part of #1010. The What changed section explains the splitter change and both panels. The UI section has before and after captures for Android and web. The Live testing section gives a verdict, the tested commit, and what was not exercised. The Upstream impact section is missing. The template says to delete it when the PR touches only J5-owned paths, and the author lists no upstream-owned files, so the omission is acceptable. The checklist is filled in. Two items need a closer look: the 'One concern' item says the description has no 'also', and the description contains no 'also'. The 'Docs' item defers the 'scrolls sideways' wording in personas.md to a later docs PR, so the docs requirement is not fully met in this PR. The description also ends with the model attribution the template asks for, but it names Claude Opus 5.5, which is a model name the author supplied and which I cannot verify. Overall the description is mostly complete, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bed54fa and 1e93863.

Files selected for processing: 4

  • 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

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

@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 1e93863

Both of us reviewed the PR independently. Neither found anything that blocks merge.

  • The split. splitRecordText now returns a block as lines: {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 a flex-1 span that wraps (min-w-0 whitespace-pre-wrap break-words on 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.

This branch was successfully deployed

1 active deployment
Preview — 1e938631 Deployed Nov 11, 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.

1 participant