v0.10.2 - Threads v2, Git Remote Sync, Highlighting Bypass & VitePress Migration
v0.10.2 - Threads v2, Git Remote Sync, Highlighting Bypass & VitePress Migration
Threads v2, Git Remote Sync, Highlighting Bypass & VitePress Migration
v0.10.2 delivers the complete Threads v2 review architecture, automated Git synchronization under serve, core Git plugin programmatic API, plaintext codeblock bypass in lite-hl, and VitePress migration enhancements.
Added
- Threads v2 Complete Architecture (
@docmd/plugin-threads):- Review Drafts & Staging: Comments are kept as private per-user drafts stored locally in
.docmd/drafts/until published, allowing authors and reviewers to draft thoughts without cluttering live Markdown files. - Atomic Publishing: One-shot atomic publication merges staged drafts into source Markdown files using pure container syntax via the
threads:publish-reviewaction. - Multi-Block Threads Support: Preserves and updates every
::: threadsblock independently across document sections (#303, superseding #298 with credit to @2648782102). - Workspace Subproject Isolation: Stores thread journals, drafts, and author profiles under subproject docs roots (
docsRootOf) when running in multi-project docmd workspaces (#301). - Discard Review Workflow: Reviewers can discard draft reviews via
threads:discard-review, reverting uncommitted changes cleanly without leaving stale state or file corruption (#305). - Review Drawer Panel & Orphaned Threads: Integrated review management UI in the drawer panel, listing open, discarded, and published reviews, and gracefully flagging orphaned threads whose anchor text was edited away upstream (#306).
- Identity Headers & Role Permissions: Enforces trusted caller identity headers (
caller.identity), author email resolution (authorEmailHeader), and role permissions duringdocmd serve(#302). - Automated Git Sync under Serve: Live git synchronization for published and discarded reviews during
docmd serve, featuring fetch/reset workflows, push retries with exponential backoff, subshell credential helpers, and bot committer attribution (#307). - Comment Length & Rate Limits: Built-in configurable write limits (
maxCommentLength,maxCommentsPerMinute) to prevent abuse and ensure safe concurrent editing (#308). - Closes #267.
- Review Drafts & Staging: Comments are kept as private per-user drafts stored locally in
- Core Git Plugin Programmatic API Layer (
@docmd/plugin-git):- Dedicated API Export (
@docmd/plugin-git/api): Exposes standalone programmatic git utilities and theGitClientclass for core, plugins, or external CI automation scripts. - Remote Provider Parsing & Detection: Automatically parses repository remotes and detects GitHub, GitLab (including self-hosted / enterprise instances), Bitbucket, and generic hosts across HTTPS, SSH, and SCP formats.
- Canonical URL Generators: Programmatically constructs canonical edit URLs, blob view URLs, history timelines, and commit URLs across all supported hosting platforms.
- Token & Credential Helpers: Resolves personal access tokens across options and environment variables (
DOCMD_GIT_TOKEN,DOCMD_THREADS_GIT_TOKEN,GITHUB_TOKEN,GITLAB_TOKEN,GIT_TOKEN) using secure subshell credential helpers.
- Dedicated API Export (
- Universal Modal Architecture & Table Lightbox (
@docmd/ui,@docmd/template-summer):- Universal Modal API (
window.docmd.modal): Unified, accessible modal manager powered by native HTML5<dialog class="docmd-modal">supporting arbitrary content types (table,image, custom plugins) with backdrop dismissal, Escape dismissal, and zero hardcoded locale strings. - Table Lightbox Expand: Large tables automatically feature a floating expand button (
.table-expand-button) outside horizontal scroll wrappers. Clicking opens the table in an expanded modal view with fixed sticky headers (th) and bi-directional scrolling, addressing table header visibility (#295).
- Universal Modal API (
Fixed
- Plaintext Codeblock Syntax Bypass (
@docmd/parser,lite-hl0.2.2):- Plaintext codeblock fences (
plaintext,text,txt,none,raw,nohighlight,no-highlight) now bypass grammar tokenization, emitting unstyled escaped text without injecting spurioushljs-*spans or theme keyword colors (#299, closing #297). - Upgraded custom highlighter
lite-hlto 0.2.2 with native plain-text bypass and structural Markdown tokenization that prevents normal prose words from being misidentified as programming keywords.
- Plaintext codeblock fences (
- VitePress Migration Improvements (
@docmd/core):- Subfolder Asset Preservation: Migration now preserves nested subfolders and images when converting root-layout VitePress documentation sites (#309).
- TypeScript Config
.mtsDetection: Automatically recognizes and parses.vitepress/config.mtsconfiguration files (#310). - MkDocs Site-Absolute Navigation Paths: Resolved MkDocs migration navigation paths to generate site-absolute paths (
/guide/) instead of relative paths, ensuring nested links resolve properly (#296).
- Git Client & Threads Security Hardening (
@docmd/plugin-git,@docmd/plugin-threads):- Hardened remote URL validation against polynomial ReDoS (CWE-1333) and sanitized command execution parameters with
--delimiters against second-order argument injection (CWE-88). - Closed GitHub CodeQL Code Scanning alerts #151, #152, #153, and #154.
- Hardened remote URL validation against polynomial ReDoS (CWE-1333) and sanitized command execution parameters with
- Threads UI & Sidebar Layout Modernization (
@docmd/plugin-threads):- Docked threads FAB notch flush to the right viewport border with smooth hover expansion.
- Automatically hides the table of contents drawer when the threads panel opens (
body.tc-panel-open), providing an expanded, distraction-free reading canvas. - Localized comment timestamps according to the visitor’s browser language with full ISO UTC tooltips.
- Refined inline discussion cards with author-only deletion, differentiated borders, and stable emoji reactions.
- Dev Quiet-Window File Save Deferral (
@docmd/core): Fixed file watcher behavior during post-rebuild quiet windows. When a Markdown file save occurs inside the post-rebuild quiet window, the change event is deferred and re-evaluated immediately after the window closes rather than being dropped (#293). - Browser Bridge Reconnect Reload (
@docmd/ui): Reloads the page once when the bridge reconnects after a disconnect, ensuring seamless recovery when dev servers restart (#288). - NO_COLOR Test Independence (
@docmd/core): Decoupled CLI default-banner assertions from shellNO_COLORandFORCE_COLORenvironment variables (#289).
Documentation & Beta Test Suite
- Threads v2 Complete Guide: Updated
plugins/threads.mdacross all 4 locales (en,de,es,zh) with detailed documentation covering drafts, reviews drawer, git synchronization, identity headers, and rate limits. - Git Plugin API Documentation: Added complete programmatic API references and usage guides to
plugins/git.mdacross all 4 locales. - Universal Modal & Table Lightbox Documentation: Updated
content/syntax/index.md,content/syntax/images.md, andreference/browser-api.md. - Beta Test Suite Verification: Validated Threads v2, table lightboxes, and git sync in the staging environment at
beta-test.
Links
Documentation: https://docs.docmd.io/
Cloud Platform: https://cloud.docmd.io/
Dev & Writing Skills: https://github.com/docmd-io/docmd-skills
Contributors
- @svallory contributed Threads v2 (Steps 1–16), discard lock validation, dev save deferral, browser bridge reconnect, and testing specs across #287, #288, #289, #290, #291, #292, #293, #294, #301, #302, #304, #305, #306, #307, #308, #311, and docs#25.
- @jayhemnani9910 contributed VitePress migration subfolder copying (#309), VitePress
config.mtssupport (#310), and MkDocs navigation path resolution (#296). - @2648782102 contributed multi-block threads parsing research in #298 and #303.
- @mgks contributed plaintext codeblock bypass in #299,
lite-hl0.2.2 highlighter enhancements, and the@docmd/plugin-gitprogrammatic API layer.
Full Changelog: https://github.com/docmd-io/docmd/compare/0.10.1...0.10.2