Pane v2 slice 1: orientation-aware first-page hero (pdf.js, #629) #632

Merged
Cordy merged 13 commits from fix-pane2 into main 2026-09-20 21:53:46 +00:00
Owner

First slice of the approved pane-v2 design (pane-v2-unified-mockup.html), on the #629 decision (A: pdf.js client-side, B2 recorded fallback in #630).

  • The pane's thumb slot becomes an orientation-aware first-page hero: portrait 300px (docs/PDFs/portrait photos, page card ~212×274), landscape 176px (sheets/slides/landscape photos, ~340×150). Pane widens 320→380px.
  • Sources: images via existing /api/v1/thumb (now object-fit contain in hero sizes, orientation from natural dims); PDFs raw + vendored pdf.js 4.8.69 (page 1 to canvas, DPR-aware, orientation from the page box); office via existing /api/v1/preview/pdf (Gotenberg) then the same pdf.js path; text/markdown/code get a first-lines page card streamed and cut at 4KB/28 lines — no converter needed.
  • Honest states: >30MB or any failure → plain icon box; shimmer while rendering; the pane's facts never wait on the hero; stale async guarded (seq + detItem), documents destroyed after render.
  • Click-through: hero opens Collabora for editor formats (PDF too when the editor takes it), otherwise the raw file in a new tab; office files also get an explicit "Edit in {app}" button under the facts. The old openPreview overlay is no longer reachable from the pane (full removal is slice 1b).
  • pdf.js vendored flat in web/static/ (pdfjs.mjs + worker + LICENSE, Apache-2.0) because both ci.yml and release.yml cp web/static/* without -r; lazy-loaded via dynamic import on first PDF/office hero only.
  • New pure block pure:hero (plan/orientation/snippet/click-kind) + web/test/hero.test.js (21 asserts). Two #615-era guards updated to the approved design: det-dock's width pin (320→380) and det-pv's thumb-click assert (openPreview → editor/raw hand-off).

Red-green on the runner: RED confirmed (pure block absent), then go vet + full go test (webcheck included) + extract fence + all web suites green (commit faddd90).

First slice of the approved pane-v2 design (`pane-v2-unified-mockup.html`), on the #629 decision (A: pdf.js client-side, B2 recorded fallback in #630). - The pane's thumb slot becomes an orientation-aware first-page hero: portrait 300px (docs/PDFs/portrait photos, page card ~212×274), landscape 176px (sheets/slides/landscape photos, ~340×150). Pane widens 320→380px. - Sources: images via existing `/api/v1/thumb` (now object-fit contain in hero sizes, orientation from natural dims); PDFs raw + vendored pdf.js 4.8.69 (page 1 to canvas, DPR-aware, orientation from the page box); office via existing `/api/v1/preview/pdf` (Gotenberg) then the same pdf.js path; text/markdown/code get a first-lines page card streamed and cut at 4KB/28 lines — no converter needed. - Honest states: >30MB or any failure → plain icon box; shimmer while rendering; the pane's facts never wait on the hero; stale async guarded (seq + detItem), documents destroyed after render. - Click-through: hero opens Collabora for editor formats (PDF too when the editor takes it), otherwise the raw file in a new tab; office files also get an explicit "Edit in {app}" button under the facts. The old `openPreview` overlay is no longer reachable from the pane (full removal is slice 1b). - pdf.js vendored flat in `web/static/` (`pdfjs.mjs` + worker + LICENSE, Apache-2.0) because both ci.yml and release.yml `cp web/static/*` without `-r`; lazy-loaded via dynamic import on first PDF/office hero only. - New pure block `pure:hero` (plan/orientation/snippet/click-kind) + `web/test/hero.test.js` (21 asserts). Two #615-era guards updated to the approved design: det-dock's width pin (320→380) and det-pv's thumb-click assert (openPreview → editor/raw hand-off). Red-green on the runner: RED confirmed (pure block absent), then go vet + full go test (webcheck included) + extract fence + all web suites green (commit faddd90).
Cordy merged commit c9d65079d2 into main 2026-09-20 21:53:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
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: Cordy/Cairn#632
No description provided.