Skip to content

The note reads at 16px and 40em, measured against the editor people arrive from - #518

Merged
lilseyi merged 5 commits into
mainfrom
claude/widen-reading-measure
Sep 13, 2026
Merged

The note reads at 16px and 40em, measured against the editor people arrive from#518
lilseyi merged 5 commits into
mainfrom
claude/widen-reading-measure

Conversation

@lilseyi

@lilseyi lilseyi commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

The reading measure landed in #508 and the owner said it still read wrong. It did, and the measure was only half of why.

1 — 40em, not 36em

36em drew 522px of text. Measured against Obsidian in a pane of the same width — 1010px — Obsidian draws 582px where we drew 522px. A tenth narrow, in the one place a reader has something to compare this to.

The old number took the low end of the 60-75 character band, on the reasoning that erring short is the cheaper error. That holds in isolation and loses to the comparison: a measure is comfortable across a range, and inside that range being conspicuously narrower than the editor somebody used yesterday is a cost the band does not price.

2 — 16px on a pointer, not 14.5px

The real cause. The pointer layout drew the note at 14.5px while a phone drew it at 16px, and nothing in the code argued for the smaller number. Because the measure is a multiple of the note's own type, that one value was shrinking the column as well as the glyphs — two defects from one number.

Measured from the owner's own screenshots, our console beside Obsidian at comparable width:

pane text % of pane gutters ink on a line
before 1116 468 42% 319/329 12px
Obsidian 1016 564 56% 214/238 14px

Small text lost in a wide pane, which is what it was. Raising the type fixes both without touching the measure again — 40em resolves against 16px instead of 14.5px, so the column widens on its own.

Measured, before and after

Chromium on the built export:

viewport before after
desktop 1440x900 522px (36em at 14.5px), gutters 319 640px (40em at 16px), gutters 260
phone 390x844 342px, gutters 0 unchanged — already 16px, and the measure cannot bind inside 24pt gutters either way

The behaviour model is unchanged and was already right: the cap is a true maximum, so the gutters absorb every pixel of a narrower pane and collapse to zero before the text does. Verified across twelve viewport widths — the column holds until the pane can no longer fit it, which is what Obsidian does and what the owner identified as the thing to match.

Self-review

  • A test named for the opposite of what it proved. the measure changes with the density, not with a second breakpoint asserted 16px against 16px once this branch landed. Renamed to what it holds, with the reason the size stopped branching and a note that re-splitting it is a decision rather than a tidy-up — the measure is a multiple of the type, so a second size moves the column too.
  • Comments that had become false. Three passages justified the measure's unit by the two densities' sizes differing. The faces still differ — Times New Roman on the wrapper, a sans in the note — which is what made ch ambiguous and is why the indirection stays; their sizes agreeing today is not something it may lean on. Corrected rather than deleted.
  • A side effect I am not fixing here and am not hiding: --lp-leading still branches, 1.75 on a pointer. At 14.5px that was a 25.4px line pitch; at 16px it is 28px, so desktop lines are about 10% airier than before this branch. That is a consequence of the size change, it is legible, and picking a new leading is its own decision with its own comparison to make. Flagged rather than folded in silently.
  • The editor bundle changed only for --lp-measure; --lp-size reaches the document through themeVars at runtime, so the size commit reproduced the bundle byte for byte.

Checks

  • apps/mobile: 281 suites, 5,340 passed, lint 0 errors, tsc --noEmit clean.
  • apps/mcp: ALL PASS, untouched.
  • pnpm test:e2e:webkit:chromium: 43 passed, including the reading-measure spec at both viewports and the case that clicks the margin beside a line to prove the caret still lands in the note. I ran the chromium project; a chromium pass is never a WebKit result — CI's Editor in WebKit job is the WebKit one.
  • The e2e bounds (30-42em, 50-95 characters) already admitted 40em and are deliberately wider than the design number; the comments quoting 36 are updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_012pS75o4hy4RDLUegCyrLcx


Generated by Claude Code

36em drew 522px of text in the console's own face. Measured against
Obsidian — the editor people arrive here from, and the only reading
measure they have to compare this one to — that is a tenth narrow: in a
1010px pane Obsidian draws 582px of text where we drew 522px in a pane of
the same width. 40em is 580px.

The old number came from taking the low end of the 60-75 character band on
the reasoning that erring short is the cheaper error. That reasoning holds
in isolation and loses to the comparison: a measure is comfortable across a
range, and inside that range being conspicuously narrower than the editor
somebody used yesterday is a cost the band does not price.

Behaviour is unchanged and was already right — the cap is a true maximum,
so the gutters absorb every pixel of a narrower pane and collapse to zero
before the text does. Verified across twelve viewport widths: the column
holds until the pane can no longer fit it, exactly as Obsidian's does.

Measured in Chromium on the built export:

  desktop 1440x900  522px (36.0em) -> 580px (40.0em), gutters 319 -> 290
  phone   390x844   342px unchanged, gutters 0 — the measure cannot bind

The e2e bounds (30-42em, 50-95 characters) already admitted this value and
are deliberately wider than the design number; the comments that quoted 36
are updated, and the editor bundle is regenerated because `styles.ts` is one
of its inputs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pS75o4hy4RDLUegCyrLcx
The pointer layout drew the note at 14.5px while a phone drew it at 16px,
and nothing anywhere argued for the smaller number. Because the reading
measure is a multiple of the note's own type, that one value was shrinking
the column as well as the glyphs — two defects from one number.

Measured against Obsidian in a pane of comparable width, 14.5px put about
12px of ink on a line against Obsidian's 14px, and left 320px gutters
against its 238. The note read as small text lost in a wide pane, which is
what it was. Raising the type fixes both without touching the measure
again: 40em resolves against 16px instead of 14.5px, so the column widens
on its own.

  desktop 1440x900  522px -> 640px of text, gutters 319 -> 260, ink 12 -> 14px
  phone   390x844   342px unchanged — already 16px, and the measure cannot
                    bind inside 24pt gutters either way

One size at both densities is also one thing to keep in step rather than
two. The comments that justified the measure's unit by the two sizes
differing are corrected: the faces still differ, which is what made `ch`
ambiguous and is the reason the indirection stays, but their sizes agreeing
today is not something it may lean on.

The editor bundle is unchanged: `--lp-size` reaches the document through
themeVars at runtime rather than being baked into the bundled script, and a
regeneration reproduced it byte for byte.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pS75o4hy4RDLUegCyrLcx
…not it

Self-review of this branch: the test asserting the note's type was named
"the measure changes with the density" and, after this branch, asserted
16px against 16px — a name describing the opposite of what the body proved.
Renamed to what it now holds, with the reason the size stopped branching
and a note that re-splitting it is a decision rather than a tidy-up, since
the measure is a multiple of the type and a second size would move the
column too.

The assertions are unchanged. What still branches on density — the text
tone — stays in the same test so the difference reads as deliberate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pS75o4hy4RDLUegCyrLcx
@lilseyi
lilseyi merged commit fb5b8ef into main Sep 13, 2026
27 checks passed
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