Uh oh!
There was an error while loading. Please reload this page.
[Spec 1380] artifact-canvas: horizontal multi-column reading mode - #1398
Conversation
…e, horizontal column CSS layer, mode-switch anchoring
…rst tab stop, CSS scoping guard, style conformance
…ction + tall-block caps, Playwright regression fixture, CI wiring
…scendant protection for nested pre/table, 1100-line fixture, reachability + composer-clamp + policy + dark tests
…h inner-scroller yield, measured column paging, axis-aware jumps, focusable card scrollers
…ng guard order, clamp, legend/minimap tests
…ement in flow coordinates; fences carry data-line on the pre (fixes#1396)
…balState persistence, vite dev host localStorage + height contexts, README
…pair, provider persistence round-trip tests, layout-glue rationale, thread log
…tes the full review pass (markerLine + verified edit/delete + browser test)
…y, two cold lessons)
# Conflicts: # .github/workflows/test.yml
…ode column step, typed mode callback, approval frontmatter
amrmelsayed
commented
Aug 10, 2026
Architect ReviewAPPROVE on the code — the pr gate itself waits on Amr's hands-on demo pass (this is the month's largest UI change; the human checkpoint should be a human reading a real spec in columns, not my summary of one). Verified across the review passes:
For Amr's demo pass (the gate decision): vite host — Architect review |
…s column breaks; ease wheel travel (glide) instead of per-notch jumps
…r-driven comment flows (ring re-arms on first keystroke)
…er edge per comment card
…e candidate for the same-column lock
Uh oh!
There was an error while loading. Please reload this page.
Summary
Opt-in horizontal multi-column reading mode for the artifact canvas: content flows
top-to-bottom in fixed-height, readable-measure columns continuing rightward (newspaper
flow) in a horizontally scrolling container — an entire spec section visible at once on a
wide display. Vertical stays the default and is behaviorally untouched except for one
deliberate fix (#1396, below). Implemented natively (CSS multicol, zero new runtime
dependencies) across six plan phases, each consulted and committed separately.
Closes#1380
Fixes#1396
Changes
initialReadingMode/onReadingModeChangeprops (untrusted values coercedto vertical), a token-styled toggle in canvas chrome, the
.codev-canvas-mode-horizontalCSS layer with new
--codev-canvas-column-width/-gaptokens, and mode-switch positionpreservation (viewport-start block anchor, axis-aware restore).
break-inside: avoidfor pre/table/img/cards/composer(descendant-scoped — nested blocks too), with height caps + inner scroll for anything
taller than a column (Chromium fragments-and-overflows over-tall protected blocks instead
of honoring
break-inside). Unbounded embeds self-bound to the viewport height.only; yields to inner scrollers; trackpad gestures and pinch untouched), PageUp/PageDown
column paging on measured geometry with the same yield rule, axis-aware
scrollIntoViewfor every jump path.
getClientRects()flow-coordinatemath — hovering a prose block's continuation fragment lights the affordance in that
column; keyboard anchors the first fragment; clamping uses flow height, not the union box.
aria-live),minimap suppressed in horizontal, the body as a focusable labeled region
(
aria-roledescription), resize re-anchoring.data-reading-modein theinitial HTML (the canvas mounts before the first host message),
readingModeChangeaddedto
WebviewToHostMessage, aMementoplumbed through the provider,sanitizeReadingModegating both untrusted directions; vite dev host —
localStoragepersistence + fullreview-pass wiring. Height contexts in both.
<pre data-line tabindex><code tabindex>(matchingcode_block), restoring the artifact-canvas: full-row '+' affordance (GitHub-diff pattern) — structurally eliminate the hover travel-gap bug class #1343 row model for code blocks.Deliberate behavior changes (worth reviewer attention)
position context, correct card anchoring) and each fence is now two tab stops (the pre row
vertical-mode pass at dev-approval.
onto the preceding content block and emits
markerLine(the vscode: edit + preview-side delete on review comments (make the markdown reviewer functional) #1055 identity), enablingedit/delete in the dev host.
Testing
math over fabricated rects, mode/coercion/persistence contracts.
canvas-browserCI job. Covers fragmentation invariants, reachability, tall-block caps,wheel/paging efficacy (incl. no residual vertical scroll), fragment-anchored affordance,
watch-reload recovery, resize re-anchoring, dark-theme smoke, and the complete
add → edit → delete review pass in horizontal mode.
attempt, persistence round-trip through
resolveCustomTextEditor).guide.
Spec
codev/specs/1380-artifact-canvas-horizontal-mul.md
Plan
codev/plans/1380-artifact-canvas-horizontal-mul.md
Review
codev/reviews/1380-artifact-canvas-horizontal-mul.md