3df7697 ←78b352cantonApr 8, 2026 api

edit TODO.md via macOS

+ inserted paragraph this plugin only uses official, stable Obsidian APIs:
+ inserted list item addStatusBarItem() — status bar text at the bottom
+ inserted list item addRibbonIcon() — ribbon icon in the left sidebar
+ inserted list item addCommand() — command palette entries
+ inserted list item registerObsidianProtocolHandler() — URI handler
+ inserted list item addSettingTab() — settings page
+ inserted paragraph Obsidian has no official API for file explorer badges, edito...
+ inserted list item hover tooltips on wikilinks (no HoverProvider API)
✎ modified list item status bar: version, sync status icons (✓↑↓!⚠), author (AI p...
✎ modified list item open in Obsidian: URI handler (obsidian://sublimated?action=...
− deleted heading todo: immediate (VS Code parity)
− deleted heading status bar update
− deleted paragraph current: sublimated: v12 · synced · by anton target: sublima...
− deleted list item add sync status icons: ✓ synced, ↑ uploading, ↓ downloading,...
− deleted list item add visibility indicator: 🌐 public, 👥 shared, 🔒 private
− deleted list item add branch display (hide when main)
− deleted list item add AI agent prefix: by AI: name when modifiedByType === "ai...
− deleted list item add visibility field to FileMetadata in xattr.ts (VS Code ha...
+ inserted list item all 13 xattr fields read: version, commit, url, contentHash,...
+ inserted heading todo
✎ modified list item add TTL-based in-memory cache for xattr reads
✎ modified paragraph Obsidian re-reads all xattrs on every file switch (shells ou...
✎ modified list item file explorer sync badges (requires DOM hacking)
✎ modified paragraph we deliberately skip these VS Code features that have no sta...
− deleted list item use FileExplorerPlugin API or CSS-based decorations on file ...
− deleted list item read sync-status xattr per file, show badge/icon next to fil...
− deleted list item ✓ synced, ↑ uploading, ↓ downloading, ! error, ⚠ conflict
− deleted heading todo: later
✎ modified heading comments sidebar
✎ modified paragraph VS Code has full CommentController (513 lines) with gutter "...
− deleted paragraph Obsidian equivalent:
✎ modified list item threaded replies
− deleted list item anchor resolution: text search (quote+prefix+suffix) -> bloc...
✎ modified list item new comment creation on sublimated.com (link to web UI)
− deleted heading reactions
− deleted list item show reactions on file or section level in sidebar or status...
− deleted list item hover/click to see who reacted
− deleted list item adding reactions on sublimated.com — plugin links to web UI
✎ modified list item registerView() — custom sidebar panel (version history)
✎ modified list item CodeLens-style section attribution above headings (no CodeLe...
− deleted list item command palette: "sublimated: show section history"
− deleted list item per heading: last author, edit count, actor count
− deleted list item API: file context endpoint (sections array)
− deleted heading hover and diagnostics
− deleted paragraph VS Code: wikilink hovers (versions, comments, backlinks), br...
− deleted list item render broken [[links]] with visual indicator
✎ modified list item ribbon icon: history button opens version sidebar
✎ modified heading official Obsidian APIs only
− deleted heading block attribution (PM JSON)
− deleted list item per-paragraph attribution: original author, creation date, e...
✎ modified list item inline editor decorations (no stable decoration API)
− deleted heading character-level attribution (Loro)
− deleted list item percentage breakdown of who wrote what
− deleted list item human vs AI edits
− deleted list item colored highlights in reading view per author
− deleted heading @mention rendering
− deleted list item render @username as styled inline elements
− deleted list item autocomplete when typing @
− deleted list item API provides user list via folder context endpoint
− deleted heading stale content detection
− deleted list item check embedded files (![[data.csv]]) for staleness via conte...
− deleted list item show notice if referenced file changed since current file wa...
− deleted heading backlinks
− deleted list item sidebar: files linking to current file via [[wikilinks]]
− deleted list item sublimated adds over native Obsidian backlinks: version coun...
− deleted heading broken link detection
− deleted list item flag [[links]] to nonexistent files
− deleted list item offer to create missing file
− deleted list item detect broken embeds (![[missing.png]])
− deleted heading open questions
− deleted heading sharing and access visibility
− deleted list item status bar: show sharing status alongside sync info
− deleted list item file explorer: icons next to shared/public files
− deleted list item command: "sublimated: show access" — who has access, roles, ...
− deleted list item needs: com.sublimated.visibility#PS xattr, GET /v1/items/{id...
M /sublimated/undefined +20 -85
23 unmodified lines
24- `com.sublimated.modified-at#PS` — server-side timestamp of last change
25
26plugin reads these directly from filesystem. no API calls, no token, no signup for core features.
27
28## official Obsidian APIs only
29
30this plugin only uses official, stable Obsidian APIs:
31- `addStatusBarItem()` — status bar text at the bottom
32- `addRibbonIcon()` — ribbon icon in the left sidebar
33- `registerView()` — custom sidebar panel (version history)
34- `addCommand()` — command palette entries
35- `registerObsidianProtocolHandler()` — URI handler
36- `addSettingTab()` — settings page
37
38Obsidian has no official API for file explorer badges, editor hover tooltips, or inline decorations. VS Code has `FileDecorationProvider`, `HoverProvider`, `CodeLens` etc — Obsidian doesn't. plugins that add file tree badges do it via DOM manipulation (finding internal `fileItems`, appending `<span>` elements, watching with MutationObserver). this is fragile — Obsidian can change its internal DOM structure in any update and badges break silently. not worth the maintenance cost.
39
40we deliberately skip these VS Code features that have no stable Obsidian equivalent:
41- file explorer sync badges (requires DOM hacking)
42- hover tooltips on wikilinks (no HoverProvider API)
43- CodeLens-style section attribution above headings (no CodeLens API)
44- inline editor decorations (no stable decoration API)
45
46## done
47
30- status bar (basic): text showing version, sync status, author. click to open on web. updates on file change
48- status bar: version, sync status icons (✓↑↓!⚠), author (AI prefix), branch, visibility (🌐👥🔒). click to open on web. updates on file change
49- version history sidebar: version list with number/author/timestamp, "view on web" link
50- ribbon icon: history button opens version sidebar
51- view on web: command palette + status bar click opens sublimated.com URL from xattr
52- copy web link: command to copy sublimated.com URL to clipboard
34- open in Obsidian: URI handler (`obsidian://sublimated?action=open&file=path`), OAuth token flow (`action=auth`), URLHandler.swift, SharePopup.astro OPEN IN section
53- open in Obsidian: URI handler (`obsidian://sublimated?action=open&file=path`), OAuth token flow (`action=auth`)
54- welcome modal: first-run with setup steps, links, hasSeenWelcome flag
55- settings page: API token input, test connection, workspace detection (.sbl/ folder), links
56- all 13 xattr fields read: version, commit, url, contentHash, id, createdBy, modifiedBy, modifiedByType, syncStatus, space, branch, modifiedAt, visibility
57
38## todo: immediate (VS Code parity)
58## todo
59
40### status bar update
41
42current: `sublimated: v12 · synced · by anton`
43target: `sublimated: v12 · ✓ synced · by anton · feature-x · 🌐` (matches VS Code)
44
45- add sync status icons: ✓ synced, ↑ uploading, ↓ downloading, ! error, ⚠ conflict
46- add visibility indicator: 🌐 public, 👥 shared, 🔒 private
47- add branch display (hide when `main`)
48- add AI agent prefix: `by AI: name` when `modifiedByType === "ai_agent"`
49- add `visibility` field to FileMetadata in xattr.ts (VS Code has it, Obsidian doesn't yet)
50
60### cache layer
61
53VS Code has `cache.ts` with in-memory cache. Obsidian re-reads all xattrs on every file switch.
54- add TTL-based cache for xattr reads (avoid shelling out `xattr` 12 times per tab switch)
62Obsidian re-reads all xattrs on every file switch (shells out `xattr` 13 times per tab switch).
63- add TTL-based in-memory cache for xattr reads
64- cache API responses (folder context, file context)
65- invalidate on file save events
66
67### workspace detection
3 unmodified lines
71- CloudStorage mount path detection: `~/Library/CloudStorage/Sublimated-{space}/` (prod) and `~/Library/CloudStorage/sublimated-dev-{space}/` (dev)
72- `.sbl/config` or `.sbl/config.yml` parsing for space slug
73- detection result: space slug, folder path, root path, detection mode
74
66### file explorer decorations
67
68VS Code shows sync status badges on files in the explorer tree. Obsidian equivalent:
69- use FileExplorerPlugin API or CSS-based decorations on file tree items
70- read sync-status xattr per file, show badge/icon next to filename
71- ✓ synced, ↑ uploading, ↓ downloading, ! error, ⚠ conflict
72
75### version history improvements
76
77- group versions by day: "Today", "Yesterday", "X days ago", "Mon DD"
78- show commit message per version
10 unmodified lines
89plugin-side: `main.ts` already handles the URI. settings.ts needs a "Sign in" button.
90server-side: add GET `/auth/obsidian` route to id.sublimated.com. bearer plugin already set up.
91keep manual API token input as fallback. token should be long-lived.
92
91## todo: later
93### comments sidebar
94
93### comments and threads
95VS Code has full CommentController (513 lines) with gutter "+", threading, resolve, reactions. Obsidian has no comment API — use a sidebar view (official `registerView()` API).
96
95VS Code has full CommentController (513 lines) with gutter "+", threading, resolve, reactions.
96
97Obsidian equivalent:
97- sidebar view: list comments anchored to specific text
98- author, timestamp, quoted text, resolved/unresolved status
100- threaded replies inline
99- threaded replies
100- clicking a comment scrolls to anchored text
102- anchor resolution: text search (quote+prefix+suffix) -> blockIndex -> orphaned
101- "resolve" button (API call)
104- new comment creation on sublimated.com (no input forms in plugin)
102- new comment creation on sublimated.com (link to web UI)
103- API: GET /v1/spaces/{slug}/items/{id}/context
104
107### reactions
108
109- show reactions on file or section level in sidebar or status bar
110- hover/click to see who reacted
111- adding reactions on sublimated.com — plugin links to web UI
112
113### section-level history
114
115VS Code has CodeLens above headings. Obsidian has no CodeLens.
116- command palette: "sublimated: show section history"
117- per heading: last author, edit count, actor count
118- API: file context endpoint (sections array)
119
120### hover and diagnostics
121
122VS Code: wikilink hovers (versions, comments, backlinks), broken link warnings, unresolved comment indicators.
123Obsidian equivalent:
124- render broken `[[links]]` with visual indicator
125- list unresolved comments in sidebar
126- hover on wikilinks if Obsidian API supports it
127
128### block attribution (PM JSON)
129
130- per-paragraph attribution: original author, creation date, edit count, last editor
131- requires PM JSON representation (block IDs stable across edits)
132
133### character-level attribution (Loro)
134
135- percentage breakdown of who wrote what
136- human vs AI edits
137- colored highlights in reading view per author
138
139### @mention rendering
140
141- render `@username` as styled inline elements
142- autocomplete when typing `@`
143- API provides user list via folder context endpoint
144
145### stale content detection
146
147- check embedded files (`![[data.csv]]`) for staleness via content-hash xattr
148- show notice if referenced file changed since current file was last edited
149
150### backlinks
151
152- sidebar: files linking to current file via `[[wikilinks]]`
153- sublimated adds over native Obsidian backlinks: version count, author info, comment count
154
155### broken link detection
156
157- flag `[[links]]` to nonexistent files
158- offer to create missing file
159- detect broken embeds (`![[missing.png]]`)
160
105## API endpoints
106
107plugin uses these (shared with VS Code extension and language server):
108- GET /v1/spaces/:slug/items/:folderId/context — folder context (items, links, users)
15 unmodified lines
124- push current code (excluding node_modules)
125- set up a workflow to mirror from sublimated.com to GitHub (manual push or automated)
126- add GitHub release workflow for Obsidian plugin submission (main.js, manifest.json, styles.css as release assets)
127
184## open questions
185
186### sharing and access visibility
187
188- status bar: show sharing status alongside sync info
189- file explorer: icons next to shared/public files
190- command: "sublimated: show access" — who has access, roles, visibility
191- needs: `com.sublimated.visibility#PS` xattr, `GET /v1/items/{id}/access` endpoint
192
128## promotion
129
130- r/ObsidianMD
131- Obsidian Forum "Share & showcase"
3 unmodified lines