Add: Remark Mode — inline annotation for AI-assisted document review#76
Conversation
|
目前不支持图表批注,悬浮在图表或者图片上的时候,可以不显示焦点边框。 |
|
最后,复制批注之后,是不是可以发送给别人,导入到批注面板?这样就可以协同工作了。 |
|
总体而言这个功能太赞了,我迫不及待想要用了哈哈哈。 |
|
感谢详细的 review!已在最新 commit 中修复所有问题,逐一回复: ✅ 已修复(本次 commit)
📋 已知待做(后续迭代)
再次感谢,这个项目太棒了!🎉 |
f018603 to
4b966c4
Compare
|
更新一下进展:刚刚 force push 了最新版本,在上次修复的基础上又做了几件事: 🧪 代码质量
✨ UX 微交互
⌨️ 键盘支持
♿ 无障碍
关于后续:复用文件树面板和**导入批注(协同)**计划在 MVP 合并后单独 PR 实现。 |
4b966c4 to
fb0ac7f
Compare
Remark Mode enables reviewers and AI agents to annotate rendered Markdown documents at the block level. Designed for the Remarker human-AI review loop. Core features: - Block-level selection & annotation with color coding (🟡🟢🔵🩷❓) - Persistent storage via chrome.storage.local (keyed by origin+pathname) - Right sidebar panel with TOC-style positioning (auto-switches to left when TOC is on right) - Smooth slide-in/out animation with content margin transition - Hover tooltips showing annotation content on highlighted blocks - Inline note editing with auto-expanding textarea (max 5 lines) - Export to clipboard in structured format with filename from URL - Undo-on-delete with 5-second soft-delete toast - Auto-activate via ?remarker=true URL parameter - Badge count on toolbar button (gray, non-intrusive) - i18n support for 8 locales (en/de/es/fr/ja/ko/zh_CN/zh_TW) - Media block skip (img/svg/canvas/figure/video) - MutationObserver for async-rendered DOM Technical notes: - Badge uses inline styles to avoid timing dependency on CSS injection - URL normalization strips hash/query for consistent storage key - scheduleHighlightsAfterRender watches document.body first when container is not yet in DOM, then watches container for [data-line] elements - onModeChange callback uses inline logic (not hoisted function reference) due to TypeScript block-scoped function declaration semantics - Context menu duplicate ID guard in background.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fb0ac7f to
8641924
Compare
|
Update: removed keyboard shortcut ( Kept:
Also submitted a remark skill PR to |






Overview
This PR adds Remark Mode — an inline annotation feature designed to support AI-assisted document review workflows.
Closes #74
What is Remark Mode?
Remark Mode lets you select text in any rendered Markdown document, annotate it with a category tag and optional note, then copy the structured feedback to clipboard for use with AI assistants (Claude, GPT, etc.).
The exported format is:
This allows an AI agent to receive precise, line-referenced feedback and apply changes.
Implementation
New file:
src/ui/remark-mode.tsdata-line/data-line-countattributes on rendered blockschrome.storage.local(keyed by page URL)localStoragefor non-extension contextsModified files
chrome/src/webview/ui/toolbar.ts— ✏️ toggle button with annotation count badgechrome/src/webview/viewer-main.ts— wires Remark Mode container + raw markdownsrc/types/toolbar.ts— new optional fields onToolbarManagerOptionschrome/src/host/background.ts— fix pre-existing duplicate context menu ID bugScreenshot
Features
chrome.storage.localDesign decisions
data-lineattrs, survives re-renders, no fragile DOM range serializationTesting
dist/chrome/afternpm run build:chrome.mdfile in Chrome