Repository navigation
Closed
Labels
Milestone
Description
Follow-ups left open on purpose by the Pad URL work (#646, #647, #648). The final industry-standard review granted the flag on 2026-10-31; these are the items it, or the maintainer, kept for later.
After the backend deploys
- Stop sending
document_slugin the immediate email payload.process_email_queue(packages/supabase/scripts/07-5-email-notifications-pgmq.sql) still readschannels.slugand sends it, so a server that has not deployed yet keeps working. The new server no longer reads it. Remove the key and thechannels.slugread in a new migration, once the backend from Build every sent pad link from one shared pad-url package #648 is live.
Maintainer decision
- Retire
POST /api/email/send-digest, or give it its own document type. Nothing in the repo calls it (apps/hocuspocus.server/src/api/email.ts), butAPI.mdand the OpenAPI spec document it. While it exists,DigestDocument.workspace_id(packages/email-templates/src/types.ts) must stay optional, which keeps two unreachable guards (digestContentChanges.tsenrichDigestDocuments,digestDocuments.ts). Recommended: retire the route, then make the field required.
Polish (safe today)
- The digest consumer reads the grouping setting before it plans (
apps/hocuspocus.server/src/lib/email/pgmqConsumer.ts), so the defer and skip paths also touch Redis. It is bounded byREDIS_COMMAND_TIMEOUT, and a defer is redelivered. Fix: split the pure plan into an outcome step and a grouping step, so defer and skip never read Redis; read the two settings with onePromise.all. - The digest catch arm marks every queue id
failed, including mails already queued and left-over rows. A latersentsettle repairs queued mails, and redelivery re-marks left-over rowsskipped. Fix: settle onlyplan.leftOverplus the mails that were not queued.
Record: Notes/local-docs/2026-10-30-pad-url-engine/architecture-review/final-flag.md (local).
Done in 60c4262a0 (not pushed yet): the digest outcome split, the catch fix, and the send-digest retirement. Only the document_slug removal is left, and it waits for the backend deploy.
Activity
refactor(hocuspocus): finish the digest follow-ups and retire send-di…
HMarzban commentedon Nov 3, 2026
Status, 2026-11-03. The digest split, the catch fix and the
send-digestretirement are pushed and deployed on 2026-11-03, in60c4262a0. The backend from #648 is live. Left:20261031120000to production (see Build every sent pad link from one shared pad-url package #648).document_slugand thechannels.slugread fromprocess_email_queue.fix(supabase): stop sending document_slug in the email payload
HMarzban commentedon Nov 3, 2026
Done.
81aca5c9fadds migration20261103120000, pushed and applied to production on 2026-11-03.process_email_queueno longer readschannels.slugor sendsdocument_slug; the server builds the pad link fromworkspace_idsince #648. The other items on this issue shipped earlier in60c4262a0. On 2026-11-03 the maintainer pushed every pending Supabase migration to production withsupabase db push, andpackages/supabase/scripts/check-grants.sqlthen returned 0 rows.docs(changelog): correct the migration order and package versions