fix(notes): phones ignore a stored page width #986

Closed
kayg wants to merge 0 commits from fix/phone-ignores-page-width into dev
Owner

On a phone, a note's stored calternal-width: narrow|wide is now ignored: the page always fills the screen (owner decision, #980 bug 2). Width isn't offered on phones, so the stored value used to draw a small floating card that could not be cleared. Desktop still honours the stored width, and the file keeps its line (file over app).

Re-applies the P0 lane's reverted 437ba5193 (from #982), but the rule now lives in widthOf (apps/web/src/lib/editing.svelte.ts), so every reader of the page style (Shell, PhoneStack, Style sheet), not only the editor, sees a full page on a phone.

Specs

  • width.spec.ts, opacity.spec.ts (the six phone assertions at 390): a phone shows the full page whatever the width; desktop still shows Narrow/Wide.
  • New in style-card-box.spec.ts: a daily note with calternal-width: wide on a phone keeps a full-screen page through every Style preset, and the file keeps its width line.

Gates (head 05b87cc98): Chromium (dev-01) and WebKit (dev-02), 390 and 1440, width, opacity, style-presets, style-card-box, note-bars: all pass, except two unrelated flakes below. svelte-check 0 errors; web unit 109/109; editor unit 526/526.

Flakes (not blocking, dev has them too):

  • width.spec.ts "same height" at chromium-1440 (desktop, untouched): fails on dev too, interleaved 15x runs: dev 8/15 and 9/15, branch 6/15 and 3/15. Needs a stability issue.
  • style-card-box "daily note with a leftover width" at webkit-1440: one 30 s timeout in one run, 8/8 pass on both branch and dev on repeat.

First paint: first_js_brotli 225.407 KB (dev) to 225.468 KB (+61 B; raw +20 B), first_css unchanged. This is slightly above dev and is the cost of the one conditional; flagging it for the orchestrator's call. Budget is 240 KB.

Screenshots (before/after, phone, light and dark) are in the comment below.

🤖 Generated with Claude Code

On a phone, a note's stored `calternal-width: narrow|wide` is now ignored: the page always fills the screen (owner decision, #980 bug 2). Width isn't offered on phones, so the stored value used to draw a small floating card that could not be cleared. Desktop still honours the stored width, and the file keeps its line (file over app). Re-applies the P0 lane's reverted `437ba5193` (from #982), but the rule now lives in `widthOf` (`apps/web/src/lib/editing.svelte.ts`), so every reader of the page style (Shell, PhoneStack, Style sheet), not only the editor, sees a full page on a phone. **Specs** - `width.spec.ts`, `opacity.spec.ts` (the six phone assertions at 390): a phone shows the full page whatever the width; desktop still shows Narrow/Wide. - New in `style-card-box.spec.ts`: a daily note with `calternal-width: wide` on a phone keeps a full-screen page through every Style preset, and the file keeps its width line. **Gates (head 05b87cc98)**: Chromium (dev-01) and WebKit (dev-02), 390 and 1440, `width`, `opacity`, `style-presets`, `style-card-box`, `note-bars`: all pass, except two unrelated flakes below. svelte-check 0 errors; web unit 109/109; editor unit 526/526. Flakes (not blocking, dev has them too): - `width.spec.ts` "same height" at chromium-1440 (desktop, untouched): fails on dev too, interleaved 15x runs: dev 8/15 and 9/15, branch 6/15 and 3/15. Needs a stability issue. - `style-card-box` "daily note with a leftover width" at webkit-1440: one 30 s timeout in one run, 8/8 pass on both branch and dev on repeat. **First paint**: first_js_brotli 225.407 KB (dev) to 225.468 KB (+61 B; raw +20 B), first_css unchanged. This is slightly above dev and is the cost of the one conditional; flagging it for the orchestrator's call. Budget is 240 KB. Screenshots (before/after, phone, light and dark) are in the comment below. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A phone's page is always the screen's own card (#395, #980 bug 2): Width is not offered there, so a stored Narrow or Wide drew a small floating card that could not be cleared. The file keeps its line; desktop still honours it. Specs: the six phone card assertions in width/opacity now expect the full page, and a daily note with a stored Wide keeps a full-screen page through every look.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every reader of the page style (shell, phone stack, Style sheet) now sees a full page on a phone, not just the editor.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
perf(notes): the phone rule sits in widthOf (first paint)
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
05b87cc984
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Owner

Phone (390 px), a note with calternal-width: wide, Chromium. Before = dev, after = this PR.

light dark
before
after
Phone (390 px), a note with `calternal-width: wide`, Chromium. Before = dev, after = this PR. | | light | dark | |---|---|---| | before | ![](https://git.kayg.org/attachments/5ab08312-d9e2-4c85-aed7-61e022d13332) | ![](https://git.kayg.org/attachments/efcf52b9-4f13-4ef5-aad9-42460775aa05) | | after | ![](https://git.kayg.org/attachments/4018de9b-8f8a-409f-895e-48fd3d4dc14e) | ![](https://git.kayg.org/attachments/46a12912-ef41-44a2-88a4-c17ace955e7d) |
Author
Owner

Merged into dev by the orchestrator; phone shots checked. +61 B first paint accepted under the credit bank.

Merged into dev by the orchestrator; phone shots checked. +61 B first paint accepted under the credit bank.
kayg closed this pull request 2026-11-06 11:45:12 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!986
No description provided.