Skip to content

feat(reader): add a session reading trail - #21

Open
oldwinter wants to merge 1 commit into
v5from
happy-hour/reading-trail
Open

feat(reader): add a session reading trail#21
oldwinter wants to merge 1 commit into
v5from
happy-hour/reading-trail

Conversation

@oldwinter

@oldwinter oldwinter commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Built a localized Reading Trail that remembers the notes visited earlier in the current tab and makes them one click away from the existing reader action row. I think it is worth merging because wandering through backlinks and Random Wander is one of the garden's best interactions, and this gives readers a quiet, reversible path through that exploration without accounts, long-term tracking, or another network request.

What changed

  • keep up to eight safe, unique note paths in sessionStorage, newest first
  • show a compact count badge and anchored trail panel with title/path context
  • move revisited notes to the front, exclude the current note, and support clear/empty/failure states
  • handle Quartz SPA nav, in-place render, full reload, cleanup, and ReadLater panel mutual exclusion
  • localize English, Simplified Chinese, and Traditional Chinese labels
  • support keyboard focus restoration, Escape, outside dismissal, dark/light, reduced motion, print, long lists, and extreme CJK/path lengths

Validation

  • focused tests: 28/28 passed
  • tsc --noEmit: passed
  • scoped Prettier and git diff --check: passed
  • production Quartz build: passed, 314 inputs / 1911 outputs
  • real Chromium QA: SPA order/revisit/uniqueness, reload, clear, Escape/focus, ReadLater exclusion, 1280px desktop, 320px mobile, dark/light, reduced motion, long-list scrolling, and extreme text clamping all passed with no page errors
  • full suite: 230/231; the sole failure is the existing ThemeSwitcher test importing undeclared jsdom, in unchanged code
  • remote checks: all four Netlify checks failed together after about 10 minutes; public deploy 6a8c8e6facc50100081c10cd ended in error with no error message and GitHub exposed zero annotations, so no deployment configuration or credentials were changed

Impact

  • 13 focused design, runtime, storage, style, locale, resource-registration, and test files
  • no dependency, lockfile, content, config, CI, infrastructure, deployment, analytics, cookie, permission, secret, or external-request changes
  • session data is bounded to eight path/title/timestamp entries and disappears with the tab session
  • GitHub Issues are disabled for this repository, so there is no linked issue

Rollback

Revert commit c1cdc31a08cb5350cf7570a2a12e3062cba9cb3e. The feature is isolated; removing its script/style registration, locale fields, and storage module restores the prior reader action row. Existing browser session data is inert without the script.

@oldwinter oldwinter added the enhancement New feature or request label Aug 24, 2026
@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for aquamarine-salamander-b041fe failed. Why did it fail? →

Name Link
🔨 Latest commit c1cdc31
🔍 Latest deploy log https://app.netlify.com/projects/aquamarine-salamander-b041fe/deploys/6a8c8e6facc50100081c10cd

@oldwinter

Copy link
Copy Markdown
Owner Author

Blocking review at exact head c1cdc31a08cb5350cf7570a2a12e3062cba9cb3e:

  1. Keyboard activation can leave Reading Trail and ReadLater simultaneously open with both triggers aria-expanded=true; pointer dismissal masks this because Enter/Space emits no pointerdown.
  2. When storage reads succeed but writes fail, each navigation reloads stale storage over the in-memory fallback. New trail entries disappear and a failed Clear can revive old entries.
  3. New spacing breaks DESIGN's base-4 rhythm and the panel implementation substantially duplicates ReadLater.

Unblock action: rebase onto current v5, introduce shared disclosure/storage behavior, and add executable DOM tests for keyboard mutual exclusion plus write-only storage failure. Focused tests pass but source-regex lifecycle tests do not cover these paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant