Skip to content

Capture: wire file-drop / paste / picker attachments into the quick-capture flow #124

Description

@unforced

Background

PR notes#123 unified Capture as the canonical create surface (audit §3 #12) but kept /new rendering NoteNew because NoteNew is the only path with file-drop / paste / picker attachment-on-create (per PR #8 history). Capture today supports audio-attachments-on-record only.

The unified-surface promise the audit doc made was "Capture covers 95% of cases; full editor for the 5%." Keeping /new preserves the feature while shipping the polish. This issue tracks the follow-up: wire file attachments into Capture's quick-flow so the escape hatch can eventually retire.

What to ship

Capture currently uses enqueue() (offline-friendly queue-based save). NoteNew uses useCreateNote mutation with staged-upload + defer-link. Path to attach files in Capture:

  • Add <AttachmentDropZone> + <AttachmentPicker> (already exist for NoteNew) to Capture's UI, inside the More fields panel or above the textarea.
  • Reimplement the staged-upload pattern against the enqueue path. Staged file uploads need to: (a) upload now, (b) link the note-id once the enqueue resolves.
  • Handle the offline case: queue the attachment alongside the note enqueue; on reconnect, upload+link in order.

Estimate: ~150 LOC + tests. M scope.

Acceptance

  • Capture supports file-drop, paste, and picker just like NoteNew.
  • Works offline (queued attachment + queued note, linked on reconnect).
  • Tests cover the staged-upload pattern through Capture's enqueue path.
  • /new can then be deprecated (or kept as a <Capture moreFieldsOpenDefault /> alias).

Related

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