---
id: SEED-002
status: dormant
planted: 2026-03-26
planted_during: v1.1 Phase 17 — GH Issues Client and Product Catalog
trigger_when: any phase touching product lifecycle management, data cleanup, or archive/delete features
scope: Medium
---

# SEED-002: Product archive lifecycle — GH Issue close, SQLite soft-delete, UI filtering

## Why This Matters

The "Archive product" button exists in the product detail sidecar but prints "not yet implemented" to the console. Users who create test products or retire hardware have no way to remove them from the catalog view. Without archive, the product grid will accumulate stale entries over time.

## When to Surface

**Trigger:** Any phase that touches product lifecycle management, data cleanup, or archive/delete features.

This seed should be presented during `/gsd:new-milestone` when the milestone scope matches any of these conditions:
- Product catalog management or cleanup features
- Archive/soft-delete patterns (extending the existing card archive model)
- GH Issue state management (close/reopen)
- Data lifecycle or retention policies

## Scope Estimate

**Medium** — Needs: SQLite `archived` column on products table, `archive_product`/`unarchive_product` methods on SqliteStore, GH Issue close via GhIssuesClient, UI filtering to hide archived products from the grid (with "Show archived" toggle), and undo/toast pattern matching the card archive flow.

## Breadcrumbs

Related code and decisions found in the current codebase:

- `crates/app/ui/product-detail.slint` — `archive-clicked(string)` callback, archive button with hover/active styles
- `crates/app/ui/dashboard.slint` — `on-product-sidecar-archive` callback wired
- `crates/app/src/main.rs` — `on_on_product_sidecar_archive` handler prints "not yet implemented"
- `crates/service/src/db/sqlite.rs` — `delete_product()` exists for hard delete (stale cleanup); needs soft-delete variant
- `crates/integrations/src/github/issues_client.rs` — No `close_issue` method yet; would need to add one
- Card archive pattern in `main.rs` (toast + undo + timer) is the UX model to follow

## Notes

The existing card archive system (`archive_records` table, toast-undo pattern, show-archived toggle) is a proven UX model. Product archive should follow the same pattern but with additional GH Issue state management (close the `ww-product` issue when archived, reopen on unarchive).
