Skip to content

feat(mdp): markdown preview with google-docs-style PR review - #2

Open
yumafuu wants to merge 5 commits into
mainfrom
mdp-gdocs-review
Open

feat(mdp): markdown preview with google-docs-style PR review#2
yumafuu wants to merge 5 commits into
mainfrom
mdp-gdocs-review

Conversation

@yumafuu

@yumafuu yumafuu commented Aug 5, 2026

Copy link
Copy Markdown
Owner

mdp renders GitHub-flavored markdown through the GitHub API and serves it locally. For a pull request it previews every changed markdown file and turns the page into a Google Docs-style review surface.

What it does

  • Left sidebar — changed files (common path prefixes trimmed) with the active file's outline nested beneath it, scroll-spy included; click the file name to collapse.
  • Right margin comments — review threads sit next to the text they reference. Hovering highlights the anchor, clicking scrolls to it.
  • Line-less comments grouped at the top — the PR's conversation comments, plus any thread whose text can't be located, stack under 行に紐づかないコメント.
  • Range comments — select text and comment on it. The body carries a quote plus a hidden <!-- mdp:range ... --> marker, so mdp re-highlights the exact range on the next launch while GitHub still shows an ordinary line comment. Selections outside the diff fall back to a PR comment.
  • Reply / resolve / react — click a card to reply, the blue check resolves the thread, 🙂+ adds any of GitHub's eight emoji.
  • Mermaid blocks rendered as diagrams, light/dark themes, font-size cycle, GitHub icon link back to the PR.

Verification

bun test — 152 passing; tsc --noEmit clean. Exercised end to end against real PRs: rendering, range posting (inline and PR-comment fallback), reply, resolve, reactions, and re-highlighting after restart.

Review note

Design docs for each iteration are under docs/superpowers/. This PR is also a convenient way to dogfood the tool: mdp <this PR url>.

🤖 Generated with Claude Code

yumafuu and others added 5 commits August 5, 2026 17:15
mdp renders GitHub-flavored markdown through the GitHub API and serves it
locally. For a pull request it previews every changed markdown file and
turns the page into a Google Docs-style review surface:

- left sidebar with the changed files (common path prefixes trimmed) and
  the active file's outline nested beneath it, with scroll-spy
- review comments in a right margin column, aligned to the text they
  reference; PR conversation comments and unanchorable threads group at
  the top under 行に紐づかないコメント
- select text to comment on a range: the quote plus a hidden mdp:range
  marker go into the comment body, so mdp can re-highlight the exact
  range later while GitHub still shows a normal line comment
- reply by clicking a card, resolve with the blue check, and react with
  GitHub's eight emoji
- mermaid blocks rendered as diagrams, light/dark themes, font-size cycle

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant