Skip to content

feat(console): autolink bare entity ids so a printed tsk_/goal_ is clickable (v0.334.0) - #609

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/task-id-autolink
Aug 10, 2026
Merged

feat(console): autolink bare entity ids so a printed tsk_/goal_ is clickable (v0.334.0)#609
vikasprogrammer merged 1 commit into
mainfrom
feat/task-id-autolink

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

Agents write ids in prose — tsk_dcde91f9e81af705 is in progress with an engineer — and until now that was a dead token: you had to copy it and hunt for the row. Now every displayed entity id is a link.

One resolver, three display paths (web/src/lib/entity-links.ts — prefix → console route):

  • remarkWikiLinks (rendered markdown): bare ids, plus an id written as an inline `code` span — backticks are how agents usually write one, so the span is wrapped in a link rather than unwrapped, keeping its monospace look. The four chat/answer surfaces that only had remark-gfm got the plugin too.
  • InlineLinks (raw-text surfaces): Inbox cards, memory notes.
  • The xterm link provider: a new first matcher, so an id printed in the live pane is clickable exactly like a URL there (this is where the report that prompted this was read).

Scope guard: only prefixes whose route detail IS the id — tsk_#/tasks/<id>, goal_#/goals/<id>, art_#/artifacts/<id>. A session's route detail is its tmux name, not ses_…, so sessions are deliberately absent.

False-positive guard: \b + a ≥4-hex tail, so goal_id, x_tsk_…, atsk_… and uppercase lookalikes don't match.

Also: markdown links to in-app #/… targets now route in place instead of opening a pointless new tab.

Verified with npm run typecheck, cd web && npm run build, and npm run test:governance (all green).

🤖 Generated with Claude Code

https://claude.ai/code/session_015ZUfffxY4hKv7M6wMCcaTz

…they're displayed

Agents reference rows by id in prose ("tsk_dcde91f9e81af705 is in progress"),
which leaves the reader with a token they can only follow by hand-searching a
list. One shared resolver (web/src/lib/entity-links.ts) maps a prefixed id to
its console route, and all three display paths use it:

- remarkWikiLinks: bare ids in rendered markdown, plus an id written as an
  inline `code` span (wrapped, so it keeps its monospace look). Also added the
  plugin to the four chat/answer surfaces that only had remark-gfm.
- InlineLinks: raw-text surfaces (Inbox cards, memory notes).
- Xterm link provider: a new first matcher, so an id printed in the live pane
  is clickable like a URL.

Only prefixes whose route detail IS the id are included; a session's route is
keyed by its tmux name, so ses_ is deliberately absent. mdComponents links to
in-app `#/…` targets now route in place instead of opening a new tab.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZUfffxY4hKv7M6wMCcaTz
@vikasprogrammer
vikasprogrammer merged commit 6123a85 into main Aug 10, 2026
1 check passed
@vikasprogrammer
vikasprogrammer deleted the feat/task-id-autolink branch August 10, 2026 14:02
vikasprogrammer added a commit that referenced this pull request Aug 11, 2026
…they're displayed (#609)

Agents reference rows by id in prose ("tsk_dcde91f9e81af705 is in progress"),
which leaves the reader with a token they can only follow by hand-searching a
list. One shared resolver (web/src/lib/entity-links.ts) maps a prefixed id to
its console route, and all three display paths use it:

- remarkWikiLinks: bare ids in rendered markdown, plus an id written as an
  inline `code` span (wrapped, so it keeps its monospace look). Also added the
  plugin to the four chat/answer surfaces that only had remark-gfm.
- InlineLinks: raw-text surfaces (Inbox cards, memory notes).
- Xterm link provider: a new first matcher, so an id printed in the live pane
  is clickable like a URL.

Only prefixes whose route detail IS the id are included; a session's route is
keyed by its tmux name, so ses_ is deliberately absent. mdComponents links to
in-app `#/…` targets now route in place instead of opening a new tab.


Claude-Session: https://claude.ai/code/session_015ZUfffxY4hKv7M6wMCcaTz

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant