Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions ARCHITECTURE.md

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,38 @@ expired recovery UX" work occupies that slot).

---

## docs: the hand-kept lists caught up to main at ec29abc (2026-10-14)

A read of AGENTS.md, ARCHITECTURE.md, RECONSTITUTE.md, SUPABASE_SETUP.md, FEATURES.md,
FEATURE-CATALOG.md, PUNCHLIST.md, the guides and the DEEP-ZOOM plan against the code after the
three PRs since the pass at 655a023 (#335 the DEEP-ZOOM row and plan, #336 the feature, #337 its
live check). The feature wrote its CHANGELOG entry, its ARCHITECTURE rows and catalog bullet and
AGENTS.md's `maxZoom` field; what drifted was around them.

- **RECONSTITUTE.md.** The coordinate contract said `toCanvas` multiplies by `state.zoom *
devicePixelRatio`; it has been the render zoom and the effective density since the rung blits,
and DEEP-ZOOM gave it a third term, the overlay window's origin. Both bullets say so, and the
rendering pipeline names the second overlay target.
- **ARCHITECTURE.md.** The zoom.spec row described one of its three tests and none of the
DEEP-ZOOM change (the slider's max is the device's ceiling, not a literal 1200); the two zoom
feature rows ran their DEEP-ZOOM sentence onto the previous one with no period; the Deep zoom
catalog bullet said nothing of Zoom Settings or the rail's three new ticks; the grep table had
no row for the overlay window or the ceiling; the registry's publish-only examples gain
`getDeviceZoomCeiling`.
- **FEATURES.md and FEATURE-CATALOG.md.** A line and an entry for deep zoom (the feature wrote
neither).
- **PUNCHLIST.md.** The DEEP-ZOOM row was closed on ship, but the plan's Decisions still read
"Assumed, Will to confirm" for the two ceilings and its Tests still owe one run on Wendi's
machine: row DEEP-ZOOM-CONFIRM, a ⚑ call, points at both. The plan's intro said "Nothing is
built" above its own Built section; fixed, and Decisions names the row.
- features/zoom.js's header names the third publish-only dep it reads; sw.js restamped.
- Not touched: SUPABASE_SETUP.md (nothing under supabase/ changed), the guides (none names a
zoom ceiling), JOURNEY-MAP.md, the deck, DECOMPOSITION_MAP.md (a dated reading at 65f712f; its
line that `renderAnnotationsInner` is untouched and untested predates the `paintOverlay` split
and deep-zoom.spec.js, and the next `build:projectmap` reading supersedes it). Pre-existing,
not from these PRs: aim-loupe-desktop, aim-loupe-phase2, measure-loupe and zoom-canvas-cap
have no ARCHITECTURE Files row.

## feat(zoom): zoom past 1200% with a sharp overlay window (DEEP-ZOOM, 2026-10-14)

Wendi wanted to zoom in past 1200%, and at depth her marks blurred while the sheet stayed crisp.
Expand Down Expand Up @@ -55,6 +87,7 @@ The plan (journeys/plans/DEEP-ZOOM.md, measured on main the same day) in three p
buffer at 23,994,600 px, the tiles live, the ratchet at 0.5, a probe on the seeded run in the
window its colour and clear one CSS px above it. Before the merge the same sheet at the old
1200% ceiling drew the icons soft and the runs three pixels fat beside crisp plan text.

## docs: the hand-kept lists caught up to main at 655a023 (2026-10-13)

A read of AGENTS.md, ARCHITECTURE.md, RECONSTITUTE.md, SUPABASE_SETUP.md, FEATURES.md,
Expand Down
9 changes: 9 additions & 0 deletions FEATURE-CATALOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@ sheet re-renders for seconds after every zoom and the view "moves under you."
*Useful because:* Rendering is cached, ladder-stepped, and moved off the main thread, so zooming a
dense CAD sheet re-sharpens continuously instead of freezing.

**Deep zoom (to 5000%)**
*Problem:* A congested detail (a stacked riser, a packed mechanical room) needs more than 1200%,
and at depth the marks used to blur against the still-crisp sheet, while older builds went white or
black from "too many pixels."
*Useful because:* The ceiling is 5000% on a capable device (1200% on a phone or a small-memory one;
the project's own setting rides the save, never the device's), the visible area gets its own
full-density overlay so counters, numbers and length labels stay as sharp as the plan's line work,
and the full-page backdrop is budgeted so deep zoom uses less memory than 1200% did.

**Background page warm-up**
*Problem:* Jumping deep into a 40-page set means a cold multi-second render on every first visit.
*Useful because:* After a document opens, idle time pre-renders every page (your marked pages
Expand Down
1 change: 1 addition & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Compiled 2026-07-31 from the live app, ARCHITECTURE.md's feature catalog, and th
## Speed & navigation

- **Instant zoom & pan (wheel, pinch, zoom rail)** — Big, dense sheets stay responsive — zoom commits are served from cache so the view sharpens immediately instead of re-rendering for seconds.
- **Deep zoom (to 5000%)** — Zoom in to 5000% on a desktop (1200% on a phone or a small-memory device) and the marks stay as crisp as the sheet: the visible area gets its own full-density overlay, so a congested detail reads at any depth with no white or black canvas.
- **Background page warm-up** — After a document opens, every page pre-renders in idle time, so jumping deep into a 40-page set is instant instead of a cold multi-second load.
- **Offline-grade caching of rendered pages** — Sheets you visited render from a persisted cache on reopen — yesterday's project opens warm today.
- **Aim loupe (mobile)** — Press-and-hold magnifier for precise mark placement with a finger.
Expand Down
1 change: 1 addition & 0 deletions PUNCHLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ How agents add to this list: AGENTS.md, "Recording a to-do".
| ICON-STORE | Opening a project REPLACES the user's own icon store with its `customIconPaths` (annotation-model.js:509 and 444 into app.js:209, wholesale; a project with an empty list empties the store), and they ride the user's later saves. Since #268 they are inert, but should a project be able to add icons to a user's store at all? Decide, then build | decision | ⚑ call | — | |
| DEMO-TRACK | The demo track behind the test drive's "Try it" is built for all three trades (phases 1 to 3 landed 2026-10-02). Left: a tester's real tablet and phone walk with a stopwatch against the 60 s target | test | tester | — | [DEMO-TRACK.md](journeys/plans/DEMO-TRACK.md#open-after-phase-2) |
| BOARD-QUIET | All Bids for a lead: the board becomes a quiet list, actions on the hovered row, exceptions only, grouped by estimator once there are enough; PEOPLE-TWINS, REVIEW-BAR, DROP-CARD-BUTTONS and CLOUD-OFF-ICON shipped the first steps (the twin fleet off by default, the decision in the opened bid only, oldest waiting first, the cloud silent unless the PDF is missing) | build | agent | — | [BID-BOARD-QUIET.md](journeys/plans/BID-BOARD-QUIET.md#what-is-left) |
| DEEP-ZOOM-CONFIRM | Zoom past 1200% shipped 2026-10-14 on two assumed ceilings: 5000%, and 1200% on a phone, a small canvas cap or a low-memory Chromium (one constant each, app.js `deviceZoomCeiling`). Will confirms both or names others; then one run on Wendi's machine at 3000% (her Save Status export carries the probed canvas cap, the safety knob and any blank events) | decision | ⚑ call | — | [DEEP-ZOOM.md](journeys/plans/DEEP-ZOOM.md#decisions) |
13 changes: 10 additions & 3 deletions RECONSTITUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ All annotations are stored in **PDF-space** (zoom- and pan-independent), so the
takeoff is stable across zoom levels and screen sizes. Three helpers own the
conversion (see `// SECTION: Coordinate Helpers`):

- `toCanvas(p)` — PDF-space -> canvas pixels. Multiplies by
`state.zoom * devicePixelRatio`.
- `toCanvas(p)` — PDF-space -> canvas pixels. Multiplies by the render zoom and the
effective density, `currentRenderZoom * currentEffDpr` (`state.zoom * devicePixelRatio`
when the raster is exact; a rung blit holds the zoom at the rung and the canvas budget
clamps the density), and while the deep-zoom overlay window paints it also subtracts
the window's origin, `overlayOffset` (zero for the page pass; DEEP-ZOOM 2026-10-14,
ARCHITECTURE.md "Deep zoom").
- `canvasToPdf(canvasX, canvasY)` — canvas/wrapper coords -> PDF-space. Divides by
`state.zoom` after subtracting `state.pan`.
- Never store canvas pixels in annotations; always convert to PDF-space first.
Expand Down Expand Up @@ -167,7 +171,10 @@ events -> handlers -> mutate state -> render
`state.zoom * devicePixelRatio`, copies it to the visible PDF canvas, then calls
`renderAnnotations()`.
- `renderAnnotations()` draws the active canvas's annotations onto the annotation
canvas (converting PDF-space -> canvas pixels via `toCanvas`).
canvas (converting PDF-space -> canvas pixels via `toCanvas`), and past the canvas
budget once more onto the overlay window, the visible area at full density
(`renderAnnotationWindow`, the same `paintOverlay` body), so the marks stay as sharp
as the sheet at deep zoom.
- `updateUI()` reconciles the DOM (sidebar lists, buttons, status bar) with
`state`.
- `renderAnnotationsToContext(ctx, page, scale, overrides, annotationsOverride)`
Expand Down
3 changes: 2 additions & 1 deletion features/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
* and binds the modal's Close / max / speed inputs at this file's load.
*
* getMaxZoom / getWheelZoomSpeed stay defined in app.js (used in ~10 places
* there) and are read here via App.*. Boundary rule: all shared dependencies
* there) and are read here via App.*, as is getDeviceZoomCeiling since DEEP-ZOOM
* (the slider's max and its hint). Boundary rule: all shared dependencies
* are read from App.* at call time, never captured at load, so load order
* beyond "after app.js" does not matter. See ARCHITECTURE.md "Feature files /
* window.App registry". No build step.
Expand Down
4 changes: 3 additions & 1 deletion journeys/plans/DEEP-ZOOM.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Will, 2026-10-14: Wendi wants to zoom in past 1200%. The fear is the white or black canvas
from "too many pixels", which the app had before. Investigated and measured on main at
655a0231 the same day; the proposal below was approved and then handed to another builder.
Nothing is built. Mockups: none needed; the measurements and screenshots were taken on the
Built the same day, all three parts (see Built, below). Mockups: none needed; the measurements and screenshots were taken on the
real app on the restaurant sheet (`samples/sample-plan-advanced.pdf`, P-101, 1224×792 pt).

## What the measurements say
Expand Down Expand Up @@ -149,3 +149,5 @@ Live check: see CHANGELOG.md's DEEP-ZOOM entry.
## Decisions

Assumed, Will to confirm: the ceiling is 5000%, and phones and small-cap devices hold 1200%.
Open as PUNCHLIST row DEEP-ZOOM-CONFIRM (2026-10-14), together with the run on Wendi's machine
under Tests above.
4 changes: 2 additions & 2 deletions sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* visit once the CDN has settled. The app's admin "global force reload" clears caches
* as a backstop.
*/
const CACHE_VERSION = 'b681d94c35ef';
const CACHE_VERSION = '09b60244e400';
const CACHE_NAME = `counttooling-shell-${CACHE_VERSION}`;

// The full same-origin app shell. GENERATED by `npm run build:sw`, do not edit by hand:
Expand Down Expand Up @@ -281,7 +281,7 @@ const PRECACHE_SHA256 = {
'/features/line-color.js': '2fd4c7594f1a3686fd9323b7bc4d97f5b9c151b32475d5a4428062a075378ecb',
'/features/custom-icon-upload.js': 'cf0d6731862f3baa8b7ed55cbfc89759df42934f52d1c22586ac37d3b406ab06',
'/features/note.js': 'b7cc88aa00ac8a2450c59299959108ae3bd5b18b0e420fd61264533c23347d6b',
'/features/zoom.js': '5bfd9362c676102d514c4b1e90cd2ca9b4a2d679f15ea134a30aac8935cf53a3',
'/features/zoom.js': '119f2fa59ab960e977a348a2fb2d292d02fe2199f7f9f078d4d257f709c9a8b9',
'/features/zoom-rail.js': '408522adca830c44fc407ce1cf143097782c255c4b20261efb7119ff9a7edd1b',
'/features/manage-icons.js': '9da0efb19f2e86b1d3b2f1d9bd6eda2a12ae3e307abba3a9f2c9b5da8d646382',
'/features/multiply-zone-settings.js': 'e808757a5758d7c0ba64d989ef3f6e051266b40a26ff01ae9ea8187b7b834dee',
Expand Down
Loading