fix(7736): #N in a body links to the record it names, not to a tag
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / Python tests (push) Failing after 1m37s
CI & Build / integration (push) Successful in 2m11s
CI & Build / Build & push image (push) Skipped
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / Python tests (push) Failing after 1m37s
CI & Build / integration (push) Successful in 2m11s
CI & Build / Build & push image (push) Skipped
A purely numeric #N is a record reference everywhere now. The tag patterns (frontend utils/tags.ts, the editor decoration, the first-line tag strip, tag autocomplete, backend utils/tags.py) leave digits alone, so #3127 is no longer drawn as a tag chip linking to /notes?tag=3127. - utils/recordRefs.ts links #N, milestone N and rule N in rendered markdown, with the same patterns and other-numbering word list as services/record_refs.py. A drift test reads the TS source and fails when the two differ. - v-record-refs (directives/recordRefs.ts) asks POST /api/notes/resolve-refs once per body for what each id is. A link gets the route for its kind (task, lesson, snippet, note, milestone, rule) and its kind and title on hover. One the reader cannot open is drawn as a dead reference, and missing vs not shared read the same. Applied on every surface that renders markdown. - /milestones/:id finds the project and opens its board at that milestone (?milestone= expands it, scrolls to it and focuses it). - Backlinks include records that cite #N in a body or a work log, through readable_notes_clause instead of an owner-only filter, and route by kind. The graph draws #N citations as dashed reference edges. - create_note, create_task and add_task_log say which forms link. There were no numeric tags to clean up: tags are stored only from the explicit field, and none of the 200 most used is numeric. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -147,6 +147,37 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* A record reference — `#4286`, `milestone 639`, `rule 34`. Reads as a link in
|
||||
running text rather than a chip: a work log cites a dozen of them, and a row
|
||||
of pills would drown the sentence they sit in. */
|
||||
.record-ref {
|
||||
color: var(--fs-wikilink);
|
||||
text-decoration: underline;
|
||||
text-decoration-color: color-mix(in srgb, var(--fs-wikilink) 40%, transparent);
|
||||
text-underline-offset: 0.15em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
border-radius: var(--fs-radius-sm);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.record-ref:hover {
|
||||
text-decoration-color: currentColor;
|
||||
}
|
||||
|
||||
.record-ref:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: var(--fs-focus-ring);
|
||||
}
|
||||
|
||||
/* One the reader cannot open: missing, trashed or not shared. Still legible —
|
||||
the number is part of the sentence — but plainly not a way through. */
|
||||
.record-ref--missing {
|
||||
color: var(--fs-text-tertiary-fg);
|
||||
text-decoration-style: dashed;
|
||||
text-decoration-color: var(--fs-text-tertiary);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* Task list */
|
||||
.prose ul[data-type="taskList"] {
|
||||
list-style: none;
|
||||
|
||||
Reference in New Issue
Block a user