Fix #167 (r2): pin gutter width so wrapped-row renumbering stays aligned #192

Merged
fen merged 1 commits from fix-167 into dev 2026-09-10 17:09:56 +00:00
Collaborator

QA-fail follow-up to #188: the gutter feedback loop is closed by pinning .code .gutter width (flex 0 0 auto, 3ch, overflow visible), so its blank-row padding can no longer shrink the code column and re-wrap lines. paste-lines.js (external, CSP-safe) renumbers the gutter from each .codeline block measured height (height / line-height) so numbers count VISUAL rows; blank .gutline rows keep numbers aligned with line starts. Rebased on current dev; only #167 files differ from dev.

Verified in headless chromium on a local build (1400x900 and 375x812): long unbroken lines (10 lines -> 11 visual rows each) and mixed content both give gutter element count == measured visual rows, correct number at each line start, every gutter row on the 36.72px pitch, and no horizontal scroll. Works on load and on live wrap toggle; wrap-off unchanged.

QA-fail follow-up to #188: the gutter feedback loop is closed by pinning .code .gutter width (flex 0 0 auto, 3ch, overflow visible), so its blank-row padding can no longer shrink the code column and re-wrap lines. paste-lines.js (external, CSP-safe) renumbers the gutter from each .codeline block measured height (height / line-height) so numbers count VISUAL rows; blank .gutline rows keep numbers aligned with line starts. Rebased on current dev; only #167 files differ from dev. Verified in headless chromium on a local build (1400x900 and 375x812): long unbroken lines (10 lines -> 11 visual rows each) and mixed content both give gutter element count == measured visual rows, correct number at each line start, every gutter row on the 36.72px pitch, and no horizontal scroll. Works on load and on live wrap toggle; wrap-off unchanged.
fen added 1 commit 2026-09-10 16:53:57 +00:00
Fix #167: renumber gutter to visual rows when line wrap is on
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 41s
26a00257b0
Split the paste codebody into per-line block spans (paste-lines.js) and
rebuild the gutter from each line's wrapped height so numbers count
visual rows, not logical lines. Pinned the gutter width (flex 0 0 auto,
3ch) so its row count no longer feeds back into the code column width.
ResizeObserver renumbers on wrap toggle / resize; wrap-off behavior is
unchanged (one number per newline).
fen closed this pull request 2026-09-10 16:54:18 +00:00
fen deleted branch fix-167 2026-09-10 16:54:18 +00:00
fen reopened this pull request 2026-09-10 17:06:56 +00:00
fen added 1 commit 2026-09-10 17:08:58 +00:00
Fix #167: renumber gutter to visual rows when line wrap is on
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 39s
e430eb57b7
Split the paste codebody into per-line block spans (paste-lines.js) and
rebuild the gutter from each line's wrapped height so numbers count
visual rows, not logical lines. Pinned the gutter width (flex 0 0 auto,
3ch) so its row count no longer feeds back into the code column width.
ResizeObserver renumbers on wrap toggle / resize; wrap-off behavior is
unchanged (one number per newline).
fen merged commit d77f1faf67 into dev 2026-09-10 17:09:56 +00:00
Author
Collaborator

Reopen verification: the push after reopen landed as PR #192 (merged 17:09:56Z) and is confirmed on dev (merge-base ancestry: head is an ancestor of dev; merge fix-167 f1665f1 into dev). Follow-up QA pass on #167 verified the gutter alignment fix live on palette-dev (PR #200 merged, dev image rebuilt and rolled out, rendered CDP checks at 1400x900 and 375x812 passed). No further work needed; leaving the close to the owner/QA flow.

Reopen verification: the push after reopen landed as PR #192 (merged 17:09:56Z) and is confirmed on dev (merge-base ancestry: head is an ancestor of dev; merge fix-167 f1665f1 into dev). Follow-up QA pass on #167 verified the gutter alignment fix live on palette-dev (PR #200 merged, dev image rebuilt and rolled out, rendered CDP checks at 1400x900 and 375x812 passed). No further work needed; leaving the close to the owner/QA flow.
Sign in to join this conversation.