Skip to content

feat: drop a Drive folder to import and match faces (no review step) - #99

Merged
wailbentafat merged 3 commits into
developfrom
feat/drive-folder-drop
Nov 27, 2026
Merged

wailbentafat merged 3 commits into
developfrom
feat/drive-folder-drop

Conversation

@wailbentafat

Copy link
Copy Markdown
Collaborator

Why

The events already happened and the multi team's review workflow isn't validated yet. Admins need one place to drop a Drive folder and have every photo run through the normal pipeline (single face → match + notify, multi-face → group approval), without the team-lead review.

What

  • Backend
    • list_folder_files(recursive=True) walks subfolders (cycle-safe). Default stays non-recursive.
    • Upload-group import event gains recursive and auto_approve; the worker approves the group right after a successful import, so photos are promoted to final storage and queued for face matching. Both default off.
    • POST /staff/drive/drop (admin only): folder link + existing event_id or new_event + visibility. Returns group_id; progress via the existing GET /staff/uploads/groups/{id}.
    • EventService.create_event, and a Drive folder-link parser (folder links, ?id=, bare ids; file links rejected).
  • Frontend: /multi/drop page with the form and a polling progress view.

Notes

  • The folder must be shared with the Google account connected in Drive settings.
  • No nav link yet: the sidebar files have uncommitted edits in progress elsewhere, so I left them alone. Open /multi/drop directly, or add a nav item once those land.
  • This supersedes the intent of Add event creation and Drive URL import features #95 (individual file URLs, per-import events, any-staff auto-approve).

Test

  • Backend: 234 unit tests pass, ruff and mypy clean. New tests for the folder parser and recursive listing.
  • Frontend: tsc and eslint clean for the new files.
  • Not yet run end to end against a real Drive folder.

Folder imports can now walk subfolders (recursive) and, when auto_approve
is set, the upload-group worker approves the group right after the import
completes so photos are promoted and queued for face matching. Both
default to off, so the existing flow is unchanged.
Admin-only endpoint that takes a Drive folder link, picks or creates an
event, and starts a recursive, auto-approved folder import. Progress is
read from the existing /staff/uploads/groups/{id} endpoint.
New /multi/drop page: paste a Drive folder link, pick or create an event,
choose visibility, and watch the import progress until the photos are
queued for face matching.
@wailbentafat
wailbentafat merged commit 5422d3f into develop Nov 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant