Skip to content

feat(reader): add local link wander - #28

Open
oldwinter wants to merge 1 commit into
v5from
happy-hour/local-link-wander
Open

feat(reader): add local link wander#28
oldwinter wants to merge 1 commit into
v5from
happy-hour/local-link-wander

Conversation

@oldwinter

@oldwinter oldwinter commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Built a localized "follow a link from this note" reader action that randomly selects only visible, published internal links authored in the current article. It feels worth merging because it turns the garden's link graph into a one-click contextual walk: readers keep following the thread they are already on instead of jumping randomly across the whole collection, while broken links and unsafe destinations never become dead ends.

Verification

  • npx tsx --test quartz/components/scripts/localLinkWander.test.ts quartz/plugins/emitters/componentResources.test.ts (15/15 passed)
  • npx tsc --noEmit
  • Scoped Prettier check for every changed TypeScript/SCSS file
  • git diff --check
  • npx quartz build (314 inputs, 1912 outputs)
  • npm test (238/239 passed; the only failure is the existing undeclared jsdom import in local-plugins/theme-switcher/test/themeSwitcherScript.test.ts)
  • Real Chromium QA at 1280x900 and 390x844 covered visible published candidates, broken-link exclusion, native link semantics, a successful SPA hop, the published no-candidate state, back navigation, repeated render events, focus-visible, dark mode, reduced motion, and viewport containment with zero browser errors

Impact

  • Adds one dependency-free reader script, focused tests, and scoped styles
  • Reuses Quartz's existing content-index promise; no new requests, storage, analytics, or content writes
  • Adds English, Simplified Chinese, and Traditional Chinese labels with the existing locale fallback pattern
  • Does not change content, dependencies, lockfiles, configuration, CI, deployment, permissions, or infrastructure
  • Related: 首页与导览主入口多条双链 404,却显示为有效内链 #24. This action avoids unpublished/broken wikilinks as destinations, but deliberately does not close the underlying broken-link rendering issue.

Rollback

Revert commit 8ca225f4 to remove the action, its resource registration, labels, tests, styles, and design contract without data migration or persistent-state cleanup.

@oldwinter oldwinter added the enhancement New feature or request label Aug 28, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@netlify

netlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

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

@oldwinter

Copy link
Copy Markdown
Owner Author

Blocking standards finding at exact head 8ca225f4f5eeed4ee19c5e0eb40de25fb2d0d714: DESIGN requires visible internal links and exclusion of hidden links, but eligibility checks only layout rects and aria-hidden. visibility:hidden retains rects, so an invisible link can be chosen. Lifecycle tests regex-match source instead of executing pending index loads across rapid nav/render events; home/404 and modifier-key behavior remain implicit.

Unblock action: reject computed-hidden links including hidden ancestors and add executable visibility/lifecycle/keyboard tests before merge.

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