Skip to content

RoomsPanel drag-drop: no rollback on partial upload failure #921

Description

@PythonFZ

Context

In `frontend/src/panels/RoomsPanel.tsx:62-69`, the drag-drop flow performs two dependent operations:

  1. Create a new room (`POST /v1/rooms`).
  2. Upload the dropped file into that room.

If step 2 fails, the room created in step 1 stays behind as an orphan — no rollback, no retry affordance. User ends up with an empty room they did not intend to create, and the file they actually wanted to upload is not attached anywhere.

Repro

  1. Drag a file onto RoomsPanel while the server is reachable for `POST /v1/rooms` but the upload endpoint times out / is rejected (e.g. file too large, network blip mid-transfer, auth drops between the two requests).
  2. Observe: new empty room appears in the list, file never lands.

Acceptance

Pick one:

  • Compensating delete — on upload failure, `DELETE` the just-created room and surface the original upload error.
  • Retry / discard UX — keep the room on the client, show an inline error with "Retry upload" and "Discard room" actions.
  • Server-side atomic endpoint — introduce `POST /v1/rooms?seed=` so creation and seeding are a single request (probably the cleanest long-term answer).

No preference; whichever fits the broader room-creation UX story.

Related

Flagged during PR #920 review (Minor, deferred).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions