Feat v0.4.3 backlinks wikilinks
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 21s
CI/CD / test-frontend (pull_request) Successful in 22s
CI/CD / test-go-pg (pull_request) Successful in 2m34s
CI/CD / test-sqlite (pull_request) Successful in 3m3s
CI/CD / build-and-deploy (pull_request) Successful in 1m21s

Obsidian-style [[wikilinks]] for the notes surface. New ext_notes_links
table (source_id, target_id, link_text) with bidirectional indexes.

Backend: _extract_wikilinks() parses [[...]] via split (no regex in
Starlark). _sync_links() on create/update resolves titles to note IDs.
Cascade delete cleans both directions. GET /links/:id and
GET /backlinks/:id endpoints.

Frontend: wikilinks render as clickable links in preview — blue for
resolved, red for unresolved. Clicking resolved navigates; clicking
unresolved creates the note and re-saves source to resolve the link.
BacklinksPanel shows incoming links below editor with click navigation.

Notes package 0.3.0 → 0.4.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 16:37:07 +00:00
parent 32beb3cee4
commit b92b713715
7 changed files with 391 additions and 16 deletions

View File

@@ -529,6 +529,80 @@
outline-offset: -2px;
}
/* ── Wikilinks ──────────────────────────── */
.wikilink {
color: var(--accent);
text-decoration: none;
border-bottom: 1px dashed var(--accent);
cursor: pointer;
}
.wikilink:hover {
border-bottom-style: solid;
}
.wikilink.wikilink--unresolved {
color: var(--danger, #e53e3e);
border-bottom-color: var(--danger, #e53e3e);
opacity: 0.7;
}
.wikilink.wikilink--unresolved:hover {
opacity: 1;
}
/* ── Backlinks Panel ────────────────────── */
.backlinks-panel {
border-top: 1px solid var(--border);
padding: 10px 16px;
background: var(--bg-raised);
flex-shrink: 0;
max-height: 200px;
overflow-y: auto;
}
.backlinks-panel__header {
font-size: 11px;
font-weight: 600;
color: var(--text-2);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 6px;
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
user-select: none;
}
.backlinks-panel__toggle {
font-size: 9px;
color: var(--text-2);
}
.backlinks-panel__count {
background: var(--bg-hover);
color: var(--text-2);
font-size: 10px;
padding: 0 6px;
border-radius: 8px;
line-height: 16px;
}
.backlinks-panel__item {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
}
.backlinks-panel__item:hover {
background: var(--bg-hover);
}
.backlinks-panel__title {
color: var(--accent);
font-weight: 500;
}
.backlinks-panel__context {
color: var(--text-2);
font-size: 11px;
}
/* ── Responsive ──────────────────────────── */
@media (max-width: 700px) {
.notes-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 40vh; }