Release Notes
Added
- Embedding hosts can supply their own comment client via
mountRw({ comments }) — an injected CommentApiClient (list/create/update/delete, plus optional subscribe for live refresh). When present, comments are enabled implicitly (no /config round-trip) and fully decoupled from the docs apiBaseUrl, so a host can serve comments at any URL shape and transport. When omitted, the viewer builds its existing HTTP client against {apiBaseUrl}/comments and reads commentsEnabled from /config — unchanged. CommentApiClient, Comment, CreateCommentRequest, and UpdateCommentRequest are now exported from @rwdocs/viewer.
- Embedding hosts can route transient notifications (e.g. a failed comment save) through their own toast/alert system by passing
mountRw({ onNotify }). Standalone rw serve falls back to a built-in toaster.
- Comments carry a
canResolve capability flag (alongside canDelete/canRestore) so a host's permission model decides whether the Resolve/Reopen affordance appears. rw serve sets it true for top-level comments and false for replies, matching current behavior.
PageMeta now exposes a section-relative subpath field (HTTP page API, @rwdocs/core, and @rwdocs/viewer types) alongside sectionRef. Embedding hosts that store their own comments can key them on the stable (sectionRef, subpath) pair instead of the URL path. See Embedding.
Changed
- Breaking:
rw serve and the rw comment CLI now both key inline and page comments on the stable (sectionRef, subpath) pair instead of the page's URL path, so CLI-created and browser-created comments land on the same key. Relocating or remounting a whole section (its sectionRef unchanged) no longer orphans the comments on its pages; a section rename or moving a single page within a section still changes the key for the affected comments. The --document flag on rw comment add / rw comment list still accepts the URL path and resolves it to the composite key internally. It now also accepts the markdown source file path, with or without the docs-root prefix (e.g. docs/guide.md or guide.md), mapping it to the page's URL path the same way the server does — so a script or agent can pass the file it just edited directly. Comments created in 0.1.25 (keyed by the old path) are not migrated: they remain in the database but are no longer queried, so they effectively disappear from the UI and CLI — negligible impact given 0.1.25's age.
Fixed
- When a site's root page (
docs/index.md or the README.md homepage) declares a section kind in its metadata, the navigation API now reports that kind for the root scope (and for the back-navigation parent of top-level sections) instead of the generic section kind, so a host mapping sections to catalog entities by kind now resolves the root consistently. Previously the page API's section_ref and the navigation API disagreed about the root's identity.
- Wide tables no longer collapse their short-content columns to a sliver (a single word breaking one or two characters per line). Columns now take their natural widths, and a table that is genuinely wider than the page scrolls horizontally inside its own box — keyboard-focusable and announced to screen readers — instead of being clipped.
- A comment whose save failed (e.g.
rw serve was down or unreachable) no longer loses the text you typed. The composer keeps your draft, its button changes to Retry, and a toast explains the save failed and that your draft is kept — instead of silently clearing the box.
n/p comment navigation no longer gets stuck on orphaned comments (inline comments whose anchored text was later edited away); they now highlight when selected, and navigation continues to the next comment.
n/p comment navigation no longer centers page-comment threads with many replies in a way that pushed the first comment off the top of the screen. Long page-comment threads now scroll so their first comment is visible, matching how the shareable #comment-<id> deep links already behaved.
- Markdown blockquotes are restyled for readability — upright (no italics), normal-weight body text with no decorative quotation marks, set off by the left border alone. Long multi-line quotes are much easier to read.
Install rw 0.1.26
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rwdocs/rw/releases/download/v0.1.26/rw-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/rwdocs/rw/releases/download/v0.1.26/rw-installer.ps1 | iex"
Install prebuilt binaries via Homebrew
brew install rwdocs/tap/rw
Download rw 0.1.26