Skip to content

release: prepare internal 0.5.0-th.1 - #7

Merged
petergaultney merged 13 commits into
th/integrationfrom
relay-comments/release-0.5.0-th.1
Oct 15, 2026
Merged

petergaultney merged 13 commits into
th/integrationfrom
relay-comments/release-0.5.0-th.1

Conversation

@petergaultney

Copy link
Copy Markdown

🍋:

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

  • Obsidian CLI commands to list/watch threads, comment, reply, resolve, suggest, accept and reject in notes and canvases (desktop Obsidian 1.12.2+).
  • Live refresh of open canvas threads and better sidebar selection when switching notes.
  • Improved handling of Markdown syntax hidden by Live Preview.
  • Retained complete block-prefix fix and safe selection refusal/save-time validation.

Validation

  • Accepted candidate and integration merge trees are identical; the stamped tree differs from the candidate only in four version metadata files (+8/-5).
  • Lint, production build/TypeScript, no-node check, release artifact verification, whitespace checks and 177 focused tests across seven suites passed.
  • Candidate's earlier 111 focused tests and isolated TH-suffix verifier check also passed.
  • Artifact SHA256 fingerprints:
    • main.js: 5e29b9c980c9dd5ac3286f9f8e91fc41466f3bbd541407ab468f967427cf655d
    • manifest.json: 8c7d23770adc50d87c567a3482aaf53c2e10c13498a46e85f0cc3346a589bf86
    • styles.css: 8246ff340a5798e7e373f57e4446a31805a7c2a35f4f841d0c3d45d99a04ded6

Independent 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.

Category Files +Lines -Lines Net Total % of diff
code (including tests) 33 +5198 -257 +4941 5455 94.7%
config 3 +5 -3 +2 8 0.1%
docs 3 +197 -99 +98 296 5.1%
lockfiles 1 +2 -2 0 4 0.1%

dtkav and others added 13 commits September 26, 2026 09:05
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
petergaultney marked this pull request as ready for review October 15, 2026 12:33
@petergaultney
petergaultney merged commit 1b420ed into th/integration Oct 15, 2026
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.

2 participants