API and export support for comments and reactions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- git, github
- Lĩnh vực
- api, backend-api-design, cli, documentation
Hướng nghiên cứu
Issue không xác định tệp triển khai hoặc bài kiểm thử nào. Trước tiên, hãy xem xét các điểm vào của API v1, hackmd-cli export và GitHub sync, sau đó xác định cách các bình luận, phản hồi, phản ứng và phạm vi được biểu diễn. Công việc được coi là hoàn tất khi có phạm vi đã được thống nhất và một bản triển khai bao quát API được đề xuất cùng hành vi xuất hoặc đồng bộ hóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Comments and reactions are first-class collaboration features in HackMD — the new commenting system introduced in 2024 added emoji reactions, a dedicated side panel, and expanded character limits. However, none of this data is accessible through the API, CLI, GitHub sync, or any export format.
Teams that use HackMD as part of a GitHub-centered documentation workflow lose all review context (feedback, questions, decisions captured in comment threads) when syncing notes to their repository. The comments are effectively trapped on the HackMD platform with no way to extract them.
Use Case
Our team recently migrated from Google Docs to a stack of HackMD + GitHub + Obsidian for collaborative documentation. HackMD replaced Google Docs as the real-time collaboration layer, with GitHub as the source of truth.
On Google Docs, comments traveled with the document — they could be exported, and the full discussion history was preserved. On HackMD, comments and reactions are silently dropped the moment a note is synced to GitHub. This is the single biggest gap in our workflow, and the main reason we can't fully move off Google Docs.
Current State
- API v1: No endpoints for retrieving comment or reaction data. The only comment-related field is
commentPermission(who can comment), but actual comment content is inaccessible. - CLI (
hackmd-cli export): Outputsnote.contentonly — raw markdown, no comments. - GitHub sync: Pushes markdown content as commits. Comments and reactions are not included.
- All export formats (PDF, Dropbox, Google Drive, Arweave): Omit comments entirely.
Proposed Solution
Tier 1: API endpoints (highest priority)
New REST endpoints to retrieve comment and reaction data:
GET /v1/notes/:noteId/comments
GET /v1/notes/:noteId/reactions
Suggested comment response schema:
[
{
"id": "comment-id",
"author": {
"id": "user-id",
"name": "Display Name"
},
"body": "Comment text content",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"resolved": false,
"range": {
"startLine": 42,
"endLine": 44
},
"replies": [
{
"id": "reply-id",
"author": { "id": "user-id", "name": "Display Name" },
"body": "Reply text",
"createdAt": "2025-01-15T11:00:00Z"
}
],
"reactions": [
{
"emoji": "👍",
"users": ["user-id-1", "user-id-2"]
}
]
}
]
Tier 2: CLI export flag
hackmd-cli export --noteId=<id> --include-comments
This would output a sidecar .comments.json file alongside the markdown content, enabling scripted workflows and backups.
Tier 3: GitHub sync enrichment
Option to sync comments alongside note content, either as:
- A sidecar
.comments.jsoncommitted to the repo, or - Mapped to GitHub PR review comments (for notes synced via PR workflow)
Prior Art
- Google Docs: Export includes comments; Google Docs API provides full comment/reply access
- Notion API:
GET /v1/commentsendpoint exposes all comments on a page - GitHub: Issues and PR APIs expose all comments and reactions
Impact
This is a blocker for teams that want to use HackMD's collaboration features while maintaining durable records of discussion. Without it, the collaboration context that makes HackMD valuable over a plain text editor is ephemeral and lost.
Related: #207
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 40
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hackmdio/hackmd-io-issues
-
bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
hackmdio/hackmd-io-issues#121 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
hackmdio/hackmd-io-issues#448 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
hackmdio/hackmd-io-issues#447 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
hackmdio/hackmd-io-issues#446 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
hackmdio/hackmd-io-issues#445 · 3 bình luận ·
Tất cả issue của hackmdio/hackmd-io-issues
Issue tương tự
-
Send-Document has no job-state check, resurrects canceled jobs and re-prints processing jobsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OpenPrinting/cups#1833 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingCó thể đã có người làm @chaitanya0305 đã nhận hôm nay. Đang mởbug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
BaaRai/ARTEX#652 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort:S P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
nightscout/nocturne#4563 ·
Maintainer thường phản hồi trong vòng 1 ngày