Skip to content

Let readers follow the links in their own notes — [[wiki-links]] render as plain text while the assistant walks the graph #95

Closed

Description

@bencode

Problem

The links subsystem arrived complete on the machine's side: packages/links parses wiki-links, tags and named blocks (parse.ts — linkPattern matches [[...]]), features/links keeps an index between notes (use-note-index.ts), and the assistant can query the whole graph (features/agent/links/link-tools.ts) and even name a passage so it can be linked. Seven PRs built this — and every one wired the links to the model.

The reader's side never got connected: the markdown renderer has zero handling for the syntax (components/markdown.tsx and the whole features/reader tree contain no [[ — verified by search), so a wiki-link renders as literal text. A reader of a linked library — the git-source deployment story makes the library exactly that — cannot click from note to note. They read the name, open the Files panel, filter by path, and find the note by hand. The graph exists only because the reader's notes carry links, and today only the model can follow them.

This is the product's recurring asymmetry, seen again: document search was assistant-only (#68), and the link graph is assistant-only now.

Proposal

  • Render [[Note]] in the markdown reader as a link: resolve the name against the note index that use-note-index.ts already maintains, and open the target note in the reading pane on click — same motion as opening it from the Files panel.
  • An unresolved name renders with a quiet "not found" style instead of a dead link — the candor the column cap and the docx unconverted markers already practice.
  • Backlink panels and graph views are later layers; this issue is the follow-the-link step only.

Goal

After this, clicking a wiki-link in a note opens that note — a linked library reads like one connected body of work, not a folder of files with punctuation only the assistant understands.

Verification

grep -rl '\[\[' ui-packages/web/src/components ui-packages/web/src/features/reader --include='*.ts' --include='*.tsx' | grep -v test
pnpm --filter @gamma-reader/web test --silent
pnpm check

Refs

  • packages/links/src/parse.ts — the parser that already defines the syntax (linkPattern, ParsedLink, LinkTarget)
  • ui-packages/web/src/features/links/use-note-index.ts — the note index a click resolves against
  • ui-packages/web/src/components/markdown.tsx — renders [[Note]] as literal text today (verified: no [[ anywhere in the reader tree)
  • ui-packages/web/src/features/agent/links/link-tools.ts — the graph the assistant already walks
  • Let the reader search inside a PDF — Ctrl+F sees only the page on screen, while the assistant has a search tool #68 — the same assistant/reader asymmetry, for search; this is it for navigation

Activity

  1. added
    enhancement
    source:scheduled
    on Oct 4, 2026
  2. bencode commented on Oct 4, 2026

    @bencode
    OwnerAuthor

    Independent review — implemented on main; closing via the verify gate. (posted by the scheduled issue-reviewer loop, independent of the authoring session)

    Timing. Filed 07:50Z on Oct 4; PR #94 (32f5054, "follow links between notes in the reader") merged 08:08Z — 18 minutes later. The proposal was accurate when filed and landed almost immediately; the creation session could not have seen it coming without watching open PRs.

    Evidence audit of the proposal's claims (against 54aa77d):

    • ✅ reader tree had no [[ handling pre-feat: follow links between notes in the reader #94 — now features/reader/markdown-reader/wiki-link.tsx exists and index.tsx:25 wires WikiLink into the renderer.
    • ✅ Goal delivered as proposed: graph.resolve(target) resolves against the note index; click → openLink(target, resolution.fileId) opens the note; unresolved renders the quiet not-found style (title="No note named … yet."); ambiguous names get a chooser popover — all three behaviors the Proposal asked for, plus a back-navigation integration test (shell/links-navigation.integration.test.tsx: "opens the linked note at the named block, and Back returns").

    Anchor repaired (logged). The Verification grep used grep -rql — -q silences all output, so | grep -v test always received empty input and always exited 1; the anchor could never pass in any state. Edited the body to drop -q (only change). After that, verify passes on main.

    Note for the authoring session: the same -ql pitfall will silently break any future list-pipeline anchor; and PR #94 was open when this was filed — a quick gh pr list before filing would have caught the race.

    Closed as implemented (verify gate passed post-repair).

  3. bencode commented on Oct 4, 2026

    @bencode
    OwnerAuthor

    ✓ Verification passed

    ui-packages/web/src/features/reader/pdf-reader.tsx
    ui-packages/web/src/features/reader/markdown-reader/wiki-link.tsx
    
    > @gamma-reader/web@0.0.0 test /Users/bencode/work/gamma-reader/ui-packages/web
    > vitest run --project unit --silent
    
    
     RUN  v5.0.0 /Users/bencode/work/gamma-reader/ui-packages/web
    
    
     Test Files  48 passed (48)
          Tests  306 passed (306)
       Start at  16:14:50
       Duration  6.00s (environment 42%, tests 24%, setup 12%, import 12%, transform 9%)
    
    Environment  |unit| jsdom was created 48 times · 20.24s total, 42% of tracked time
                 create it once per worker with pool: 'vmThreads' (keeps per-file isolation) or isolate: false (shares it across files)
                 learn more: https://vitest.dev/guide/improving-performance#test-environments
    
    
    > gamma-reader@0.0.0 check /Users/bencode/work/gamma-reader
    > biome check . && pnpm typecheck && pnpm test && pnpm test:integration
    
    Checked 309 files in 114ms. No fixes applied.
    
    > gamma-reader@0.0.0 typecheck /Users/bencode/work/gamma-reader
    > pnpm -r typecheck
    
    Scope: 6 of 7 workspace projects
    packages/links typecheck$ tsc -p tsconfig.json
    packages/shared typecheck$ tsc -p tsconfig.json
    ui-packages/code-lab typecheck$ tsc -p tsconfig.json
    packages/links typecheck: Done
    ui-packages/code-lab typecheck: Done
    packages/shared typecheck: Done
    web-packages/server typecheck$ tsc -p tsconfig.json
    ui-packages/code-lab-playground typecheck$ tsc -p tsconfig.json
    ui-packages/web typecheck$ tsc -p tsconfig.json
    ui-packages/code-lab-playground typecheck: Done
    web-packages/server typecheck: Done
    ui-packages/web typecheck: Done
    
    > gamma-reader@0.0.0 test /Users/bencode/work/gamma-reader
    > pnpm -r test
    
    Scope: 6 of 7 workspace projects
    packages/links test$ vitest run
    ui-packages/code-lab test$ vitest run
    ui-packages/code-lab test:  RUN  v5.0.0 /Users/bencode/work/gamma-reader/ui-packages/code-lab
    packages/links test:  RUN  v5.0.0 /Users/bencode/work/gamma-reader/packages/links
    packages/links test:  Test Files  4 passed (4)
    packages/links test:       Tests  36 passed (36)
    packages/links test:    Start at  16:14:58
    packages/links test:    Duration  216ms (import 58%, transform 28%, tests 12%, worker 2%)
    packages/links test: Done
    ui-packages/code-lab test:  Test Files  4 passed (4)
    ui-packages/code-lab test:       Tests  13 passed (13)
    ui-packages/code-lab test:    Start at  16:14:58
    ui-packages/code-lab test:    Duration  702ms (environment 32%, tests 28%, transform 24%, import 15%, worker 1%)
    ui-packages/code-lab test: Done
    web-packages/server test$ vitest run
    ui-packages/web test$ vitest run --project unit
    web-packages/server test:  RUN  v5.0.0 /Users/bencode/work/gamma-reader/web-packages/server
    ui-packages/web test:  RUN  v5.0.0 /Users/bencode/work/gamma-reader/ui-packages/web
    web-packages/server test:  Test Files  13 passed (13)
    web-packages/server test:       Tests  107 passed (107)
    web-packages/server test:    Start at  16:14:59
    web-packages/server test:    Duration  1.13s (tests 47%, transform 32%, import 20%, worker 1%)
    web-packages/server test: Done
    ui-packages/web test:  Test Files  48 passed (48)
    ui-packages/web test:       Tests  306 passed (306)
    ui-packages/web test:    Start at  16:14:59
    ui-packages/web test:    Duration  6.38s (environment 45%, tests 24%, setup 12%, import 11%, transform 9%)
    ui-packages/web test: Environment  |unit| jsdom was created 48 times · 23.13s total, 45% of tracked time
    ui-packages/web test:              create it once per worker with pool: 'vmThreads' (keeps per-file isolation) or isolate: false (shares it across files)
    ui-packages/web test:              learn more: https://vitest.dev/guide/improving-performance#test-environments
    ui-packages/web test: Done
    
    > gamma-reader@0.0.0 test:integration /Users/bencode/work/gamma-reader
    > pnpm -r --if-present test:integration
    
    Scope: 6 of 7 workspace projects
    ui-packages/web test:integration$ vitest run --project integration
    ui-packages/web test:integration:  RUN  v5.0.0 /Users/bencode/work/gamma-reader/ui-packages/web
    ui-packages/web test:integration: Not implemented: navigation to another Document
    ui-packages/web test:integration:  Test Files  6 passed (6)
    ui-packages/web test:integration:       Tests  68 passed (68)
    ui-packages/web test:integration:    Start at  16:15:06
    ui-packages/web test:integration:    Duration  5.83s (tests 70%, import 10%, transform 9%, environment 8%, setup 2%)
    ui-packages/web test:integration: Done
    

    cc @bencode please verify

  4. added
    state:needs-verification
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsource:scheduledstate:needs-verification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions