Skip to content

feat: comment on a block of a page - #85

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/block-comments
Oct 9, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/block-comments

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 9, 2026

Copy link
Copy Markdown
Member

Notes step N6. Contains a migration — waiting for Amr's approval before merging.

Migration 20261009000000_comment_blocks:

ALTER TABLE "note_comments" ADD COLUMN "block_id" TEXT;

A nullable column with no default, so existing comments are unchanged (they stay page comments).

What it does

  • Every block in a page gets a stable id (@tiptap/extension-unique-id, approved; ids are not generated for remote changes, so collaborators don't race).
  • The block handle menu gains Comment: the comments box opens quoting that block, and the comment is saved with blockId. Replies stay in the thread and never carry a block id.
  • Blocks with open comments get a gold mark in the margin. A block comment shows the block's text; clicking it scrolls to the block and flashes it. If the block was deleted it says so.
  • The page format goes to 4, so older tabs reload before ids are added.

Tests: new block comment case in test/notes.spec.tsx, test/block-menu.spec.tsx, lint and type check. test/integration/note-comments.spec.ts covers saving block ids and keeping replies in the thread (CI). Not checked in the browser: that needs the migration applied to the local database, which also waits for approval.

@github-actions github-actions Bot added the size/l 201-600 changed lines, excluding lockfiles label Oct 9, 2026
@AmrMsCLL
AmrMsCLL force-pushed the feat/block-comments branch from a5c8c0f to 570acbb Compare October 9, 2026 11:29
@AmrMsCLL
AmrMsCLL merged commit 98b9f79 into main Oct 9, 2026
7 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/block-comments branch October 9, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l 201-600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant