Skip to content

Resolve every card by its card id in the link resolver #222

Open

Description

@arthware-dev

Story

As a family member, I want every link the stack gives me to open the card it names, wherever that card is now, so that a renamed or moved note, document or diary card never breaks a link or a correction.

Context

A card is one file in the family memory that stands for one thing. Every card type already has an id that never changes:

Type Card id
document paperless_id
note, bookmark capture_id, the event id of the message it was filed from
email thread resource, the mid: URI of the thread's first message
diary card entry_id
person the file name, <bucket>/people/<id>.md
list none yet

The links the stack posts are already built not to break: /go/capture/<id> finds a capture by its id (stacklets/core/tools-server/capture_index.py), /go/docs/<id> opens Paperless, topics, people and lists are linked by slug, and go_page (lib/stack/links.py) gives no link at all rather than one keyed to a path. Since #219 a correction finds its capture by id too, but through a second scanner of its own (capture_path in stacklets/docs/bot/vault_context.py).

What is missing: only captures can be found by id, notes and diary cards answered by an edit get no link, and there are two scanners.

Proposal

  • The resolver finds a card by type and card id, reading frontmatter with stack.frontmatter. /go/capture/<id> keeps working; a diary card gets /go/diary/<entry_id>.
  • The archivist asks the resolver over the stack network instead of scanning itself; the path a filing message recorded stays its fallback.
  • go_page links notes, bookmarks and diary cards by their card id instead of returning no link.

Out of scope: a uniform id field on every card, ids for lists, rewriting existing files.

Definition of done

  • A test: a note and a diary card moved to another folder are still found by their card id
  • The archivist's own scanner is gone; a correction to a moved capture still finds it
  • go_page returns a working /go/ link for a note and a diary card
  • docs/stack-reference.md lists the card id of each type

Activity

  1. changed the title [-]Find every card in the family memory by its card id, not its path[/-] [+]Resolve every card by its card id in the link resolver[/+] on Oct 14, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions