Skip to content

refactor(web): split phase 26 bulk UI into focused modules - #13

Merged
danielrpof merged 7 commits into
gsd/phase-26-bulk-edit-removefrom
refactor/phase-26-bulk-cleanup
Oct 19, 2026
Merged

danielrpof merged 7 commits into
gsd/phase-26-bulk-edit-removefrom
refactor/phase-26-bulk-cleanup

Conversation

@danielrpof

Copy link
Copy Markdown
Owner

Summary

Stacked on #12. Behavior-preserving cleanup of the phase 26 bulk UI: the route and the action bar each did too many jobs.

web/app/
├── routes/watchlist.tsx                 1065 -> 711 lines, wiring only
├── components/watchlist/
│   ├── BulkActionBar.tsx                585 -> 330, tag modes + button row
│   └── BulkPreferencesPopover.tsx       new, owns tri-state, delta, Apply focus
└── lib/
    ├── useBulkSelection.ts              new, selection, remove confirm, handlers, Undo, focus
    ├── bulkOutcomeMessages.ts           new, pure toast data
    ├── preferenceOptions.ts             new, option lists shared with the card
    └── useBarClearance.ts               new, publishes --bulk-bar-clearance
 Watchlist (route)
-  selectedIds, anchorRef, removeConfirm, 4 handlers, toast copy, Undo, focus refs
+  useBulkSelection({ entries, visible, ... }) -> { effective, bar, confirmDialog, selectAll, refs }
  • preferenceOptions.ts replaces the bar's hand-synced copy of the card's option lists; PreferencesDelta is defined once in api.ts.
  • Toast copy is returned as data ({ level, title, description?, duration? }); only the hook calls sonner.
  • Opaque comment tags (U1, T-26-45, grill Q9) removed from touched files.
  • CONTEXT.md gains Bulk selection, Effective selection, Bulk outcome.
  • .graphifyignore now excludes tests, sqlc output, web/package.json and per-plan logs; graph rebuilt (4313 -> 1784 nodes, hubs are source, not testing.T).

Evidence

  • Before: 782 web tests pass.
    After: 793 pass (11 new table tests for bulkOutcomeMessages). watchlist.bulk.test.tsx and BulkActionBar.test.tsx pass unedited.
addTagToast(add([], [cap Kid, gone 3]), ...)
  -> { level: "warning",
       title: "Couldn't add “trap” — every selected artist already has 10 tags.",
       description: "Kid. 1 artist was already removed from your watchlist.",
       duration: 8000 }

prettier --check and tsc --noEmit clean. Go gates not run (no Go changes).

Merge Danger

Door: two-way

Blast Radius: watchlist bulk actions

Frontend-only module moves. The embedded SPA bundle under internal/webassets is not rebuilt here, so the shipped bundle still matches #12 until the next build.

@github-actions

Copy link
Copy Markdown

Coverage

Area Coverage Δ vs main Gate Status
Backend 90.64% +0.45pp 80% ✅
Frontend 97.65% +0.49pp 70% ✅

head 48e977e · 2026-10-19T19:38:30Z
baseline: main@5c0d214

@danielrpof
danielrpof merged commit e8ec5b8 into gsd/phase-26-bulk-edit-remove Oct 19, 2026
26 checks passed
@danielrpof
danielrpof deleted the refactor/phase-26-bulk-cleanup branch October 19, 2026 19:41
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