Skip to content

Ink Notes 0.1.5-beta.43

Pre-release
Pre-release

Choose a tag to compare

@mgHurryo mgHurryo released this 13 Nov 15:16
· 28 commits to master since this release
93155d6

Full webkit/chromium feedback round (#421-#449) plus the first file-boundary refactor of the writing core.

Highlights

  • WebKit long-session PDF memory released: thumbnail LRU with eviction-release, per-page pdf.js cleanup, old-document destroy (#429)
  • Ink no longer bleeds or flashes onto the next page when switching right after writing (#430)
  • Page rail: scrolling confined to the thumbnail list, controls stay fixed, filters actually hide rejected pages, square selection marker, page numbers clear of tag controls (#431/#433/#434/#439/#438)
  • Eraser: sparse-sample sweep closes skip gaps (#435), scribble erase deletes whole strokes within the circle range (#442), undo/redo finalize live input so no steps are lost (#444)
  • Gestures: finger pans the page under lasso instead of selecting ink (#432); pen input is never swallowed by panning right after a tool switch (#443)
  • Held straight strokes snap within 800ms with looser tolerances (#436); rectangles keep uniform side widths (#437)
  • Chromium trackpad: horizontal swipes rearm after settling (no more one-page lock) (#445); vertical scrolling rides the browser's native path (#446)
  • Fast-paging rail: stays open after a page selection and while wheel activity continues, smoother 280ms hand-back (#427/#440/#428)
  • PDF opens read page metadata through a bounded concurrent pool (#441); dense page turns composite exact-density cached tiles with paced prewarming (#448/#449)
  • Pure stroke geometry extracted into src/ink-geometry.ts (#447)

Changes
Addresses the full webkit/chromium feedback round (memory, page-preview isolation, rail behavior, eraser/undo history, gesture ownership, PDF open latency, trackpad paging, page-turn frame stability) plus the first file-boundary refactor of the shared writing core.

  • Reposition sticky cards across preview-rail width changes instead of rebuilding (#421): StickyNoteLayer.sync() now takes the existing preview() path when only the sticky host's width changed, repositioning mounted cards, rescaling board canvases and re-placing text boxes instead of rebuilding the layer.
  • Mount undo/redo history tiles as each render settles (#422): gesture-free history commits mount each replacement tile the moment its render settles (commitInteractive progressive flag, enabled only on the history path); eraser, lasso and deferred pen-up commits keep the atomic whole-batch swap.
  • Map preview line width through the pressure curve (#423): the multi-point preview branch now routes the averaged endpoint pressure through the same samplePressureCurve mapping the committed renderer uses, so configured pressure curves no longer render visibly thinner live previews.
  • Drop the leaked tile backend when progressive parse fails (#424): the progressive-open catch clears the tiles backend before disposing the worker session, so a failed large-notebook open cannot leave a backend bound to a dead session.
  • Keep the sticky inline draft when a commit hits busy or read-only guards (#425): a refused commit no longer destroys the draft — the input stays mounted with its text until an accepting commit lands.
  • Refresh sticky header height on width-only card reposition (#426): the width-only sync path now updates the .ink-sticky-header inline height with the same formula the rebuild path bakes at construction.
  • Keep the paging rail open after a page selection (#427): clicking a rail thumbnail claims the borrowed rail (fastPagingRailBorrowed=false) so the quiet timer cannot collapse it mid-inspection; later bursts stay consistent because an un-hidden rail never re-borrows.
  • Smooth fast paging retraction (#428): the rail's quiet window extends 1000→1300ms and the expand/collapse transition 200→280ms (view.ts, pdf-view.ts, styles.css kept in sync), so the hand-back after a fast-paging burst no longer snaps.
  • Release long-session PDF raster memory (#429): thumbnail surfaces get an LRU (12) with release-on-evict, mounted surfaces are released with previewReady cleanup, invalidateThumbnails releases before clearing the DOM, readSourcePages cleans up each pdf.js page proxy, and resetViewState destroys the old document — addressing the WebKit long-session memory creep.
  • Clear pending ink preview on page switch (#430): navigatePages discards the outgoing page's pending preview before the shared overlay host is redirected, so freshly written ink no longer flashes on the destination page; other noteIndex paths were verified covered by the renderPage pendingInkPageId guard.
  • Confine thumbnail scrolling to the rail (#431): scrollIntoView on thumbnails is replaced by a scrollRailThumb delta that moves only the rail's own scroll box, fixing the preview rail jumping to the middle of long documents on expand.
  • Pan the page with a finger while lasso is selected (#432): finger touch no longer drives the lasso tool in any mode — a finger always pans, matching the reported navigation expectation; the unified touch contract was rewritten to pin pan-only finger behavior with pinch takeover intact.
  • Keep rail controls fixed while thumbnails scroll (#433): the rail restructures into a flex column with .ink-rail-thumbs as the only scroll container (overscroll-behavior: contain), so header/filters/actions stay fixed and thumbnail scrolling cannot chain to the editor; scrollRailThumb resolves the container via the thumb's closest(".ink-rail-thumbs").
  • Hide thumbnails rejected by rail filters (#434): the .is-filtered-out rule is scoped per view so the ink/tag filters actually collapse rejected thumbnails in both editors.
  • Sweep the eraser between sparse pointer samples (#435): fast eraser motion interpolates between successive pointer samples (spacing radius/2, capped at 1024 steps), closing the gaps where strokes survived a pass the user watched cross them.
  • Recognize held straight strokes sooner (#436): the straight-line snap deadline drops 2000→800ms with a widened tolerance band (chord 40→32px, tolerance 3-10px scaled by chord, travel ratio 1.16) — deliberate held strokes snap promptly while writing cadence stays free of false positives.
  • Keep rectangle side widths uniform (#437): rectangle outlines stamp each segment with its own normal instead of averaging vertex normals, so corners no longer taper the long sides; every row's fill width is asserted within 0.2px.
  • Keep page numbers clear of tag controls (#438): the thumb tag button moves to the bottom-left and page numbers gain z-index, removing the overlap that hid the page number.
  • Square the page selection marker (#439): the page-selection ::after enforces min-width/aspect-ratio 1/box-sizing with a 2px radius, matching the Chromium square marker.
  • Keep the paging rail open during wheel activity (#440): horizontal wheel input that cannot flip a page still refreshes the borrowed-rail quiet timer (refreshFastPagingRailQuietTimer with an !fastPagingRail guard), so the rail stays out while a trackpad gesture is active and hands back after real silence.
  • Read source page metadata concurrently (#441): readSourcePages uses a bounded 4-worker pool (order-preserving, failure stops dispatch) while keeping per-page pdf.js cleanup from #429 — large PDFs open without the serial per-page metadata stall.
  • Bound pen scribble erase to a circle (#442): scribble erase deletes whole strokes within the eraserSize circle range (all-or-nothing sampling cap 4096), replacing the fragment-chipping square semantics; sticky ownership clipping and whole-stroke undo are preserved.
  • Keep Pointer Pencil touch out of page pan (#443): capture-phase ownership records active pen pointers, released on pointerup/cancel/blur — a pen contact right after a tool switch no longer gets swallowed by page panning in either event order.
  • Finish active input before undo and redo (#444): Ctrl/Cmd+Z/Y and the toolbar buttons finalize any in-flight pointer input first, so eraser strokes and other live edits become undoable steps instead of being lost or requiring double undos.
  • Rearm settled horizontal trackpad swipes (#445): a confirmed re-swipe rising from a settled tail reopens the horizontal one-page-per-contact budget (frozenSettled + strictly-rising confirmation), ending the "swipe once then stuck" trackpad behavior; merged inertia tails keep the cap.
  • Keep vertical scrolling on the browser default path (#446): ordinary vertical trackpad scrolling no longer gets canceled and re-applied synchronously — the wheel handler lets the scroller's native path run (pageDelta marks it consumed) and only takes ownership at page edges, during flip settle, or under zoom, removing the vertical jank and lost steps.
  • Isolate stroke geometry helpers (#447): pure eraser/selection geometry (hit testing, scribble recognition, stroke sampling/splitting, bounds, clipboard transforms) moves from ink-writing.ts into src/ink-geometry.ts with the original exports kept as a compatibility re-export; the moved bodies are the current master semantics (sampleStrokeForEraser keeps the #442/#435 parameters) — first step of the reported single-file maintenance burden.
  • Reuse raster tiles during page turns (#448): the swipe stage composites exact-density cached neighbor tiles instead of re-running stroke geometry inside the gesture (all-or-nothing with full-resolution vector fallback), with neighbor prewarming on the settled viewport and 1/64px size quantization so prewarmed tiles match the stage — dense notebook pages measured 316ms→3.3ms stage preparation, longest frame 329ms→22.3ms.
  • Pace neighbor prewarming for smooth page turns (#449): in-flight prewarm tile transfers cap at 4 when no visible work is pending (visible tiles still batch-submit and are never starved), and a cold-cache page turn paints page images first, adding ink once worker tiles land (rAF poll bounded by stage lifetime) — cold neighbors no longer rasterize every stroke inside the gesture.