Harden review session lifecycle, fix annotation-mode UX drift/misfires, and add Plan→Draft→Refine + reveal extensibility hooks#7
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the deck review lifecycle, improves annotation UX, and adds extensibility hooks for reveal deck rendering while updating workflow guidance toward Plan → Draft → Refine.
Changes:
- Replaces existing review sessions for the same deck before starting a new review.
- Improves overlay annotation behavior with section-local pins, ignored reveal UI targets, mis-tap filtering, and popover light-dismiss.
- Adds custom CSS/template/marked plugin build hooks plus tests and documentation updates.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
mcp/tools/review.ts |
Adds replacement behavior for existing review servers for the same deck. |
mcp/tools/build.ts |
Exposes custom CSS, template, and marked plugin inputs to build_deck. |
runtime/engines/reveal.ts |
Adds rendering extensibility hooks and per-build marked renderer support. |
runtime/overlay/pin.ts |
Moves annotation pins into per-slide layers with section-relative placement. |
runtime/overlay/annotation-mode.ts |
Adds mis-tap filtering and ignores reveal navigation/chrome targets. |
runtime/overlay/popover.ts |
Adds outside-pointer light-dismiss behavior. |
test/unit/engines-reveal.test.ts |
Adds coverage for custom CSS/template rendering and marked plugin loading. |
test/integration/mcp-flow.test.ts |
Verifies repeated start_review replaces the prior session. |
skills/deckmark/SKILL.md |
Updates workflow guidance to Plan → Draft → Refine. |
README.md |
Documents planning flow and new build tool inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pin.style.left = `${rect.left - sectionRect.left - 12}px`; | ||
| pin.style.top = `${rect.top - sectionRect.top - 12}px`; |
| customCssPath: opts.customCss ? resolve(cwd, opts.customCss) : undefined, | ||
| templatePath: opts.template ? resolve(cwd, opts.template) : undefined, | ||
| markedPlugins: opts.markedPlugins?.map(p => resolve(cwd, p)) |
There was a problem hiding this comment.
Implemented in 1185ea2. build_deck now resolves customCss, template, and markedPlugins paths and rejects any that escape the requested dir.
| const existing = [...running.values()].filter(r => r.deckDir === deckDir); | ||
| for (const r of existing) { | ||
| try { await r.app.close(); } catch { /* ignore */ } | ||
| } |
There was a problem hiding this comment.
Fixed in commit 4da9071. Before closing the old Fastify instance, closeSession is now called on the replaced session so its file is updated with closed: true. Any in-progress wait_for_close poll reading that session will detect it and return promptly instead of waiting until timeout.
Hands-on usage surfaced four gaps: repeated
start_reviewleaked servers, annotation interactions were error-prone (pin drift + accidental captures + no light-dismiss), the reveal pipeline was too rigid to extend, and workflow guidance skipped narrative planning before drafting.Review server lifecycle
start_reviewnow closes any existing running server for the samedeckDirbefore starting a new one.Overlay annotation UX correctness
<section>and positioned in section-relative coordinates (instead of viewport/scroll absolute positioning), so they stay aligned under reveal scaling/transforms..controls,.progress, etc.) and applies mis-tap filtering (movement threshold + primary-click/modifier guard).Rendering pipeline extensibility (minimal surface area)
buildDeckhooks:customCssPath(append user CSS),templatePath(custom HTML template with{{DECKMARK_*}}placeholders),markedPlugins(load local modules exportingdefault/register(marked)).build_deckinputs:customCss,template,markedPlugins.Workflow guidance: add planning phase
content.mddrafting.Coverage updates
start_reviewreplaces prior session for same deck.