Connect the attachment cable end-to-end and harden it (fase 2b) #145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fase-2b-kabel-v2"
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?
Fase 2b van "nieuw bericht opstellen + plannen". Base: main (fase 2a / #140 is gemerged).
Sluit de bijlage-kabel end-to-end aan. Bijlagen reizen nu als geparkeerde refs (owned uuids) door concept, direct antwoord en gepland bericht, en uploaden pas naar Mattermost op verzendmoment (ontwijkt MMs 7-daagse vervaltermijn voor niet-gekoppelde bestanden). De oude
POST /cards/{id}/files-route (MM file_id-currency) is geschrapt ten gunste van de kaartlozePOST /outgoing-files(ref-currency). Een dagelijkse orphan-sweep ruimt geparkeerde bestanden op die na 7 dagen door geen enkele rij meer worden gerefereerd, gewired in de lifespan en gerapporteerd in get_task_statuses.Uit de adversariele review-pass (security / correctness / WCAG)
useFileUpload.seedDone+useServerDraftSyncseeden de opgeslagen refs, zodat er nooit een lege lijst wordt verstuurd.scheduled_runner._settle_sentverwijdert geparkeerde bestanden pas nadat STATE_SENT is vastgelegd; een crash in het oude venster maakte van een echte verzending een FAILED-rij waarvan de bytes al weg waren._delete_orphan_refsis per-eigenaar gescoped (expliciete tenant-invariant i.p.v. een gok op uuid-uniciteit).outgoing_filesstat_ref/delete_ref falen dicht op een eigenaarloze sidecar.Poorten
Backend 1392 tests, 100% coverage; frontend tsc + 513 vitest + build + eslint (0 errors); pre-commit schoon. Postgres-parity via CI.
Herbouw-context
Herbouwd uit de oude gestapelde branch (#113) op de nieuwe main-basis. Conflicten opgelost:
cards.py(oude upload-route + de size-limit-helper daar verdwijnen met de route), CHANGELOG (kabel-entry in Unreleased, release-drift vermeden),ReplyComposer.vue(de nieuwe Hint-wrapper behouden + de errored/uploading schedule-disabled-logica overgenomen). De per-ongeluk-gecommitte spec-docs zitten niet in deze keten.Attachments now travel as parked refs (owned uuids) through draft, immediate reply and scheduled send, and upload to Mattermost only at send-time, dodging MM's 7-day unattached-file expiry. The old POST /cards/{id}/files route is retired in favour of the card-less POST /outgoing-files; the reply route validates refs at request-time and again at send-time. A daily orphan sweep reaps parked files no row references after a 7-day TTL, wired into the lifespan and reported in get_task_statuses. Fixes from the adversarial review pass (security / correctness / WCAG): - Draft attachments now rehydrate on load. The save side was wired but not the load side, so reopening a draft showed no chips and the first keystroke PUT an empty file_refs list, detaching and reaping the bytes. useFileUpload.seedDone restores parked files as done entries and useServerDraftSync seeds lastSavedRefs from the server so no empty list is ever sent. - A file removed mid-upload no longer leaks: the finished upload's ref is deleted instead of lingering to the sweep and eating the user's quota. - A pending draft-save is flushed on unmount, so closing the card modal inside the 500ms debounce no longer drops an edit (notably an attachment removal). - An immediate reply now drops the server draft, so its content and now-sent refs do not linger and reload later. - Upload failures are announced in an aria-live region and marked with text, not colour alone; a failed attachment gives an actionable reason instead of the misleading "wait until uploads finish". - An upload response without a usable ref is treated as a failure. - scheduled_runner._settle_sent deletes parked files only after STATE_SENT has committed; a crash in the old window turned a real send into a FAILED row whose bytes were already gone. - _delete_orphan_refs is scoped to the owner: refs are per-user-unique, so the tenant filter is now an explicit invariant, not a bet on uuid uniqueness. - outgoing_files stat_ref/delete_ref fail closed on an ownerless sidecar (no `None != None` fall-through). - The new sweep symbols are exported from cleanup_runner.__all__. Backend stays at 100% coverage; parity verified on Postgres.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.