Comments UI #92
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#92
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The reading/writing surface for page discussions.
Scope
Comments panel on the page (read mode; toggleable): threaded display with relative times and author names, composer with Markdown hints, edit/delete own, resolve with collapsed-resolved section, unread indication per page (since last visit, localStorage-based), pond setting UI for 'who may comment'.
Acceptance criteria
Technical notes
Dependencies
Depends on #91.
Size: ~1.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Implemented in
e54aaf7+ fixesc7d3b20/30992a2(pipeline green, 8/8).Comments panel (
apps/web/src/comments/, toggle next to the attachments button on every page): threaded display with author names and relative times (Intl.RelativeTimeFormatin the UI language), a Markdown composer with a hint line, per-thread reply composers, inline edit with an "(edited)" marker, delete for authors, and resolve moving the thread into a collapsed<details>"Resolved (n)" section with a reopen action — native disclosure/form semantics keep the whole panel keyboard-accessible; texts live in the newcommentsnamespace (de+en).Unread badge — the toggle shows "n new" counting comments newer than the last panel visit and not authored by the viewer; purely localStorage-based per page, opening the panel marks it seen.
Permission-aware composer —
readerspolicy: everyone who can see the page composes;editors: only when the collab token explicitly grantedrw(conservative while it resolves). Barred viewers get a hint instead of the composer; reading always works.Pond setting UI — "Who may comment" select in the pond settings (pond admins), riding the pond PATCH. This surfaced a real bug:
PondsService.updatesilently droppedcommentPolicyfrom the settings merge (the #91 DB test had set the policy via Prisma directly). Fixed; the DB test now goes through the real PATCH.Acceptance criteria — Playwright pack
comments.spec.ts(own CI step):editorspolicy: hint visible, composer absent for the reader.CI lessons (two red runs): the pack must not share the fixture pond — earlier packs in the same job leave grants there, so it provisions its own pond (via the seeded additional-pond headroom; never lower that override — CI's accumulated fixture ponds count against it).