Repository navigation
release: prepare internal 0.5.0-th.1 - #7
Merged
petergaultney merged 13 commits intoOct 15, 2026
Merged
Conversation
Register a `comments` command family with the Obsidian CLI on desktop apps that expose registerCliHandler (1.12.2 and later): status, threads, watch, comment, reply, resolve, accept, reject, and suggest. Answers are text or, with --json, an ok/code envelope, since the CLI always exits 0. Threads are named by index or anchor id, passages by exact quote with an optional line. Edits to an open note go through its editor as one transaction; closed notes are edited through vault.process. Comments written by the CLI carry an ISO-8601 date after the author attributes. Undo follows the signature. A write as the user is an ordinary undo step; a write signed as another identity with author= stays out of the user's undo history, dispatched outside CodeMirror history in a note and, in a canvas, replayed into every history snapshot instead of adding one, so the user's undo never takes back someone else's comment. Every command works on canvases as well as notes. A canvas lists the CriticMarkup threads in its text cards and its comment pins, node by node. A quote is found in exactly one text card, narrowed with node=, and gets the same CriticMarkup as a note; comment node=<id> pins a thread to a node as the pin UI does, and replies and resolution update the pin. Edits to an open canvas go through its view; closed canvases are rewritten as JSON. `comments:watch` long-polls an in-memory log of review-mark changes and returns once with a cursor to resume from. It watches notes and canvases: on a canvas, each pin, its messages, its resolved state, and CriticMarkup in text cards. Only files under watched paths are read and parsed; each call has its own scope, kind filter, and ignore-author filter, and concurrent calls do not block other commands. The format flag declares only `json`: Obsidian turns each listed format value into a shortcut flag, so `text|json` swallowed `text=` parameters.
The canvas thread card rendered its thread once, when opened, so a reply or resolution made elsewhere (a collaborator through Relay, or the CLI) never appeared until the card was closed and reopened. The render pass now compares the open thread with what the card shows and rebuilds the header and comment list in place when they differ. The composer is never replaced, so a draft keeps its undo history, input-method composition, selection, and focus, and the comment list keeps its scroll position or stays at the bottom so a new reply comes into view. The comment list also stops showing a scrollbar on a one-message thread: glyph overflow on fractional line heights rounded its scroll height a pixel past its height, and two pixels of bottom padding absorb it.
Comments and highlights anchor to the text after a line's block syntax, on every path that opens a draft. A selection whose rendered text stops short of syntax Live Preview hides is no longer refused as stale.
… stale cursor While a pane loads another note its editor still carries the old cursor, so the sidebar selected and scrolled to an unrelated card. The cursor thread now comes from the selection CodeMirror last reported for that document, and a picked card only survives a note switch when it was made for the incoming note.
petergaultney
marked this pull request as ready for review
October 15, 2026 12:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🍋:
Upgrade the internal Relay Comments fork from 0.4.0-th.2 to upstream 0.5.0 plus the retained block-prefix fix and TH version-suffix verifier, then stamp 0.5.0-th.1.
The integration merge preserves TH history. Its tree exactly matches the accepted local candidate before the four-file release stamp. Conflicts in old version metadata and the prefix-fix files were resolved to that candidate; historical 0.4.0-th.1/th.2 version mappings are restored by the stamp. Existing upstream PR #6 remains unchanged. No generated main.js is committed.
Relative to upstream 0.5.0, retained changes are the independently reviewed prefix adaptation from upstream PR #6, TH suffix verification, and release metadata. Sidebar-loop, author-name, widget-selection and sidebar-scroll patches already upstream are not reapplied.
Release notes
Validation
5e29b9c980c9dd5ac3286f9f8e91fc41466f3bbd541407ab468f967427cf655d8c7d23770adc50d87c567a3482aaf53c2e10c13498a46e85f0cc3346a589bf868246ff340a5798e7e373f57e4446a31805a7c2a35f4f841d0c3d45d99a04ded6Independent review and human merge gate tagging/publication. Nurse deployment follows a separate pin/lock PR after the release exists.
Diff size
The large diff against th/integration is upstream 0.5.0 integration, principally CLI code and tests. The integration tree was verified byte-for-byte against the accepted local candidate before stamping.