feat(doc-symbol): "Link to docs" — link a code symbol to its official docs #685

Merged
raisondetredev merged 1 commit from refs/pull/685/head into main 2026-06-25 20:42:14 +02:00
raisondetredev commented 2026-06-25 20:37:44 +02:00 (Migrated from codeberg.org)

Part of the multi-repo doc-symbol feature — app project-halkyon/halkyon-learn#685, backend project-halkyon/halkyon-infra#65, curator project-halkyon/halkyon-curator#17.

The app side of "Link to docs": in a flashcard answer, select a code symbol (seaborn.kdeplot, …) and one toolbar action resolves it to its official documentation URL and links it — no web searching, no commercial sites.

  • Data layer: DocSymbol, DocSymbolGateway + SupabaseDocSymbolGateway (the resolve_doc_symbol RPC), DocSymbolRepository.resolve returning ranked candidates + the single exact fully-qualified match to auto-apply. Mirrors the dictionary gateway.
  • DI: optional Dependencies.docSymbolRepository (nullable → zero test churn; the production factory wires it).
  • UI: a "Link to docs" toolbar action (shown only when wired) that reads the selected text, auto-applies a single exact match, else shows a labeled disambiguation picker — reusing the existing href/formatDelta link path (study mode renders it tappable for free). Wired into the answers editor + the PDF creator's question/hints/explanation.
  • Tests: repository ranking/resolution + toolbar select-to-link (exact apply, picker, button gating, collapsed-caret nudge). Full-lib analyze clean.

Depends on the doc_symbols table + resolve_doc_symbol RPC applied and at least Python seeded before this ships.

> Part of the multi-repo **doc-symbol** feature — app project-halkyon/halkyon-learn#685, backend project-halkyon/halkyon-infra#65, curator project-halkyon/halkyon-curator#17. The app side of **"Link to docs"**: in a flashcard answer, select a code symbol (`seaborn.kdeplot`, …) and one toolbar action resolves it to its **official** documentation URL and links it — no web searching, no commercial sites. - Data layer: `DocSymbol`, `DocSymbolGateway` + `SupabaseDocSymbolGateway` (the `resolve_doc_symbol` RPC), `DocSymbolRepository.resolve` returning ranked candidates + the single exact fully-qualified match to auto-apply. Mirrors the dictionary gateway. - DI: **optional** `Dependencies.docSymbolRepository` (nullable → zero test churn; the production factory wires it). - UI: a "Link to docs" toolbar action (shown only when wired) that reads the selected text, auto-applies a single exact match, else shows a labeled disambiguation picker — reusing the existing `href`/`formatDelta` link path (study mode renders it tappable for free). Wired into the answers editor + the PDF creator's question/hints/explanation. - Tests: repository ranking/resolution + toolbar select-to-link (exact apply, picker, button gating, collapsed-caret nudge). Full-lib analyze clean. **Depends on** the `doc_symbols` table + `resolve_doc_symbol` RPC applied and at least Python seeded before this ships.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!685
No description provided.