Skip to content

feat: auto-recompute UMAP on author add/remove + delete UI - #133

Merged
Davisuco28 merged 2 commits into
mainfrom
feat/auto-umap-recompute
Jul 30, 2026
Merged

feat: auto-recompute UMAP on author add/remove + delete UI#133
Davisuco28 merged 2 commits into
mainfrom
feat/auto-umap-recompute

Conversation

@PabloVc-77

@PabloVc-77 PabloVc-77 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What

Automatically recompute global UMAP 2D after StyleProfile insert or author delete, expose DELETE /api/authors/{id}, and add a gallery remove control for live-added authors. Austen / Dickens / Poe are protected (no UI button; API returns 403).

Why

Related: #88 (WO-07 noted that upload/recompute should trigger reprojection), #16 (UMAP precompute).

No dedicated open issue for auto-recompute / delete — this closes the gap left after WO-07: new uploads left scatter centroids at [0,0], and there was no safe way to remove demo-uploaded authors without wiping the three pitch voices.

Closes #

How IBM Bob helped

  • Custom Mode used: none
  • Bob session export: n/a

Screenshots / output

DELETE live-added author

DELETE /api/authors/grunon → 204

Protected preloaded voice

DELETE /api/authors/austen → 403
{"detail":{"error":"forbidden","message":"Author 'austen' is a preloaded demo voice and cannot be deleted"}}

UI: trash button only on non-preloaded author cards (home gallery); confirm dialog before delete; router.refresh() after success.

Checklist

  • Tests pass locally (make test) — backend/tests/test_delete_author.py (3 passed); UMAP projector tests added earlier on this branch
  • Lint passes (make lint)
  • If schema changed (StyleProfile / Passport) → bumped version + updated docs/
  • If new env var → added to .env.example
  • If new/changed endpoint → updated docs/api_contract.yaml
  • Documentation in the relevant README.md updated
  • At least one teammate reviewed

Extract umap_projector.recompute_umap for shared use, refresh scatter
centroids after StyleProfile insert, and add DELETE /api/authors/{id}.
Hide remove control for Austen/Dickens/Poe and return 403 from DELETE so the gallery can drop custom authors without wiping the pitch seeds.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
author-ai Ready Ready Preview Jul 30, 2026 7:05pm

@Davisuco28
Davisuco28 merged commit b2c5c71 into main Jul 30, 2026
8 checks passed
@Davisuco28
Davisuco28 deleted the feat/auto-umap-recompute branch July 30, 2026 20:54
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.

2 participants