feat: add copyable message citation links - #128
Conversation
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs changes before merge. Reviewed August 1, 2026, 1:34 PM ET / 17:34 UTC. ClawSweeper reviewWhat this changesThis PR gives channel-root messages stable public route IDs, adds copyable citation links and clipboard fallback in the web app, and backfills existing SQLite and PostgreSQL stores. Merge readinessKeep this PR open: the visible citation behavior has strong real-browser proof, but the changed legacy backfill now runs synchronously during store migration and can perform unbounded per-row work before the service is ready. The linked request remains open at #127, and this PR is its active implementation candidate rather than work already present on current Priority: P2 Review scores
Verification
How this fits togetherClickClack assigns public route IDs to workspace content and resolves those IDs through existing permission checks into the web client. This feature makes channel-root messages addressable before replies exist so users can copy one durable URL that later opens the same root or its thread. flowchart LR
Root[Channel-root message] --> ID[Public M route ID]
ID --> Store[SQLite or PostgreSQL store]
Store --> Resolver[Authorized route resolution]
Resolver --> Web[ClickClack web client]
Web --> Copy[Copy-link actions]
Copy --> URL[Stable citation URL]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Use a bounded, resumable cross-store route-ID backfill that records progress only after safely completing batches, then prove a large existing-store upgrade and restart/resume path without changing the durable citation URL contract. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: start either store against a legacy database containing many channel-root rows without route IDs, then observe migration scan every matching row and update each synchronously before readiness. This review did not execute a large-store run because the checkout is read-only. Is this the best way to solve the issue? No: the UI and normal upgrade behavior are well proven, but the current all-at-once startup backfill is not the safest implementation for legacy installations. A bounded, restart-safe migration keeps the requested citation behavior while avoiding an unbounded readiness delay. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4843afe2e8eb. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (26 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Exact head: The persistent-route finding was traced to a source-path misread rather than a
This head adds equivalent real-PostgreSQL regression coverage for eager channel The durable PR body now embeds commit-pinned raw screenshots directly and links |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@codex review |
31e7c72 to
a990518
Compare
|
To use Codex here, create a Codex account and connect to github. |
|
@clawsweeper re-review Final head is |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Closes #127
What Problem This Solves
Users and agents can find messages inside ClickClack, but cannot copy a stable, permission-checked link back to a channel message. Decisions and evidence therefore have to be referenced with copied text or vague navigation instructions.
Why This Change Was Made
Channel root messages now receive immutable public
M...route IDs at creation or migration, while replies and new DM citation actions remain out of scope. Desktop and touch action surfaces copy one canonical absolute URL using the configured public frontend origin. Before a first reply the route highlights the root in its channel; afterward the same URL opens the thread pane.Clipboard denial exposes a focused, selected, read-only URL rather than losing the citation. Existing route authorization remains authoritative, so possession of a link grants no access.
Channel and DM roots retain separate persistence paths:
CreateMessageis channel-only and assigns the eager citation identity, whileCreateDirectMessagepreserves the existing lazy DM-thread identity behavior.The upgrade backfill respects the stores’ actual schema histories: SQLite keys off
0011_public_route_ids.sql, while PostgreSQL keys off its initial0001_schema.sql. This makes the citation backfill run on existing PostgreSQL installations instead of silently skipping them.User Impact
People and integrations can cite a durable ClickClack discussion with a copyable link that remains stable as the message becomes a thread. Links use public route IDs only and preserve current workspace, channel, guest, and message permissions. Existing SQLite and PostgreSQL stores receive the same channel-root citation behavior during migration.
Evidence
Exact reviewed head:
98044b55ba89a6fe2f49a928eb3ec8a7ea8ea2f6, based onmainat4843afe2e8eb6bcfeba947496feae3db72e6f659.Built-server browser proof
The production web bundle was built into the Go server and exercised against a fresh real SQLite store:
The exact-head scenario proves desktop and touch copy actions, configured-origin handling, direct-route highlight before replies, the same route opening the thread after its first reply, replies remaining without independent route IDs, and the accessible selected-URL fallback after clipboard denial.
All refreshed screenshots were visually inspected for rendered state, readable controls, stable URL, and layout integrity.
Existing-store upgrade proof
Focused real-store tests passed:
They prove that legacy workspace, channel, direct-conversation, and channel-root rows receive the expected routes; direct-message roots and replies remain uncited; and the one-time completion marker is recorded.
Broader validation
pnpm generate:sqlc— passed with no generated drift.umask 0027; pnpm check— passed.git diff --check origin/main...HEAD— passed.AI-assisted development: yes (Codex); all generated changes were reviewed and validated against the exact head above.