feat(web): move stash action from card to instance-detail overflow menu #1229

Merged
chris merged 1 commit from feat/stash-action-to-menu into main 2026-10-14 23:59:52 +02:00
Owner

Owner redesign of PR #1226 (stash-away for named people): the eye-off icon on the people grid card is gone — "Stash away" now lives in the instance-detail ⋮ menu, next to Dissolve, in the menu's existing danger styling.

Behavior

  • New danger entry in the instance-detail ⋮ menu (pageMenu store), gated to people domain + named + active + non-stashed instances. Unnamed instances are already shadows and stashed ones live in the list's Stashed section (Curate/Unstash/Disband), so neither gets the entry.
  • Confirm via the existing globalThis.confirm pattern with ddiStashNamedConfirm — the text names the cost explicitly: the name is lost.
  • Success: existing stashClassInstance API client (unchanged), then the dissolve navigation pattern (back to the people list) plus a ddiStashedPerson success toast. The person shows up in the Stashed section as unnamed.
  • Failure: describeApiError as an error toast (role=alert) — never silent, page stays put for a retry. Menu entry disables while in flight (stashBusy).

Changes

  • DiscoveryDomainInstances.svelte: removed the stash card action + stashNamedPerson + its import (Stashed section untouched)
  • DiscoveryInstanceDetail.svelte: handleStashAway + menu entry
  • i18n: no changes — ddiStashPersonAction / ddiStashNamedConfirm / ddiStashedPerson reused as-is

Tests (discovery-stashed-people.spec.ts, 4 card-icon tests replaced by 5 menu tests)

  • menu → Stash away → confirm text mentions lost name → POST → back on list, toast, person in Stashed as unnamed (+ regression: no stash-person on grid cards)
  • declined confirm: no API call, still on the person's page
  • unnamed person: no "Stash away" entry (menu still offers Rename)
  • stashed person (detail reached via the stashed-list fallback): no entry
  • failed stash: error toast surfaces the API detail, page stays

Validation (local)

  • npm run check: 0 errors (18 pre-existing warnings)
  • npm run build: ok
  • Playwright discovery-stashed-people.spec.ts: 20/20 (desktop + mobile)
  • Regression: discovery-domain-instances, -instance-detail, -rename, -selection, discovery-instance-tentative, share-target-autocomplete → 206/206; instance-remove-mode, instance-split-move, instance-detail-face-crop, explore-people → 48 passed / 4 pre-existing skips
Owner redesign of PR #1226 (stash-away for named people): the eye-off icon on the people grid card is gone — **"Stash away" now lives in the instance-detail ⋮ menu**, next to Dissolve, in the menu's existing danger styling. **Behavior** - New danger entry in the instance-detail ⋮ menu (pageMenu store), gated to **people domain + named + active + non-stashed** instances. Unnamed instances are already shadows and stashed ones live in the list's Stashed section (Curate/Unstash/Disband), so neither gets the entry. - Confirm via the existing `globalThis.confirm` pattern with `ddiStashNamedConfirm` — the text names the cost explicitly: the name is lost. - Success: existing `stashClassInstance` API client (unchanged), then the dissolve navigation pattern (back to the people list) plus a `ddiStashedPerson` success toast. The person shows up in the Stashed section as unnamed. - Failure: `describeApiError` as an error toast (role=alert) — never silent, page stays put for a retry. Menu entry disables while in flight (`stashBusy`). **Changes** - `DiscoveryDomainInstances.svelte`: removed the stash card action + `stashNamedPerson` + its import (Stashed section untouched) - `DiscoveryInstanceDetail.svelte`: `handleStashAway` + menu entry - i18n: no changes — `ddiStashPersonAction` / `ddiStashNamedConfirm` / `ddiStashedPerson` reused as-is **Tests** (`discovery-stashed-people.spec.ts`, 4 card-icon tests replaced by 5 menu tests) - menu → Stash away → confirm text mentions lost name → POST → back on list, toast, person in Stashed as unnamed (+ regression: no `stash-person` on grid cards) - declined confirm: no API call, still on the person's page - unnamed person: no "Stash away" entry (menu still offers Rename) - stashed person (detail reached via the stashed-list fallback): no entry - failed stash: error toast surfaces the API detail, page stays **Validation (local)** - `npm run check`: 0 errors (18 pre-existing warnings) - `npm run build`: ok - Playwright `discovery-stashed-people.spec.ts`: 20/20 (desktop + mobile) - Regression: `discovery-domain-instances`, `-instance-detail`, `-rename`, `-selection`, `discovery-instance-tentative`, `share-target-autocomplete` → 206/206; `instance-remove-mode`, `instance-split-move`, `instance-detail-face-crop`, `explore-people` → 48 passed / 4 pre-existing skips
feat(web): move stash action from card to instance-detail overflow menu
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 11m10s
028290e115
Owner redesign of PR #1226: the eye-off icon on the people grid card is
gone; "Stash away" now lives in the instance-detail ⋮ menu next to
Dissolve, using the menu's danger styling.

- DiscoveryDomainInstances: drop the stash card action and
  stashNamedPerson (the Stashed section with Curate/Unstash/Disband is
  untouched).
- DiscoveryInstanceDetail: new danger menu entry, gated to the people
  domain and to named, active, non-stashed instances. Confirms the lost
  name via ddiStashNamedConfirm, calls the existing stashClassInstance
  client, then follows the dissolve navigation (back to the list) with
  the ddiStashedPerson success toast; failures surface describeApiError
  as an error toast and stay on the page.
- Tests: replace the 4 card-icon tests with detail-menu coverage —
  happy path (confirm text → POST → list with the person in Stashed),
  declined confirm, no entry for unnamed instances, no entry for
  stashed instances (stashed-lookup fallback), API failure.
chris merged commit 3ea30907e3 into main 2026-10-14 23:59:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1229
No description provided.