feat: add @docmd/plugin-threads — inline discussion threads#98
Merged
mgks merged 2 commits intodocmd-io:mainfrom Apr 9, 2026
Merged
feat: add @docmd/plugin-threads — inline discussion threads#98mgks merged 2 commits intodocmd-io:mainfrom
mgks merged 2 commits intodocmd-io:mainfrom
Conversation
Converts all server-side plugin code from JavaScript/CommonJS to TypeScript/ESM targeting @docmd/core@^0.6.5 and @docmd/parser@^0.6.5. Client code was already TypeScript and is unchanged. Renames package from @svallory/docmd-plugin-threads to @docmd/plugin-threads. Files converted: - index.js -> src/index.ts - src/plugin/parser.js -> src/plugin/parser.ts - src/plugin/containers.js -> src/plugin/containers.ts - src/plugin/highlight-rule.js -> src/plugin/highlight-rule.ts - src/plugin/actions.js -> src/plugin/actions.ts Added tsconfig.json for server-side compilation (client uses esbuild). Updated package.json with ESM type, exports map, and peer dependencies.
This was referenced Apr 5, 2026
Closed
Member
|
Merged! Looking forward to building on the threads plugin. 🎉 |
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.
Summary
Adds
@docmd/plugin-threads— a plugin for inline discussion threads stored directly in markdown files. Comments are the source of truth in the.mdfiles, no database needed.Features
Markdown syntax
This has a ==highlighted snippet=={t-abc123} that links to a thread. ::: threads ::: thread t-abc123 ::: comment c-def456 "Alice" "2026-01-15" This is a comment with **markdown** support. ::: ::: :::Context
This is the plugin discussed in #73. Depends on #94 (parser export), #95 (plugin hooks), #96 (action dispatcher), and #97 (WebSocket RPC).
The plugin is fully TypeScript/ESM, targeting
@docmd/core@^0.6.5and@docmd/parser@^0.6.5.Architecture
src/plugin/): Markdown parser/serializer, container rules, highlight syntax rule, 8 WebSocket action handlers (CRUD for threads, comments, reactions)src/client/): Lit web components — text selection UI, inline editor, identity panel, thread cards, comment displaysrc/types.ts): Thread, Comment, Reaction, Anchor interfacesTest plan
pnpm build— tsc compiles server code, esbuild bundles clientdocmd dev, select text, create thread, add reply, verify reload