feat(fase-5.10.0): drop shopping_items.unit column

The unit field had no edit path under the redesign (only name + qty
remain in the row; the double-tap overlay is name-only). Users can encode
the unit inside the name when it matters — e.g. "Milk 1L", "Eggs 1 doz".

Changes
  supabase/migrations/011_drop_shopping_items_unit.sql — DROP COLUMN
  supabase/seed.sql — unit values folded into names where relevant
  supabase/tests/002_item_frequency_trigger.sql — remove unit from INSERT
  packages/types — remove unit from ShoppingItem Row/Insert/Update
  apps/web/src/lib/stores/lists.ts — addItem/updateItem signatures
  apps/web/src/routes/(app)/lists/[id]/+page.svelte — purge newUnit /
    editUnit state + inputs + display
  apps/web/src/routes/(app)/lists/[id]/session/+page.svelte — simplify
    quantity-only render
  apps/web/messages/{en,es}.json — remove list_unit_label

Verification
  just test-db  → 34 pgTAP green
  just test-integration → 140 + 2 skipped
  just test-unit → 11 green
  just test-e2e → 39 + 2 skipped

The generated search tsvector on shopping_items.search already indexes
only `name`, so full-text search coverage is unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 19:00:08 +02:00
parent 5a63e5fc4a
commit d6cea5146f
11 changed files with 363 additions and 58 deletions

View File

@@ -202,7 +202,6 @@ export interface Database {
list_id: string;
name: string;
quantity: number | null;
unit: string | null;
is_checked: boolean;
checked_by: string | null;
checked_at: string | null;
@@ -215,7 +214,6 @@ export interface Database {
list_id: string;
name: string;
quantity?: number | null;
unit?: string | null;
is_checked?: boolean;
checked_by?: string | null;
checked_at?: string | null;
@@ -228,7 +226,6 @@ export interface Database {
list_id?: string;
name?: string;
quantity?: number | null;
unit?: string | null;
is_checked?: boolean;
checked_by?: string | null;
checked_at?: string | null;

View File

@@ -64,7 +64,6 @@ export interface ShoppingItem {
list_id: string;
name: string;
quantity: number | null;
unit: string | null;
is_checked: boolean;
checked_by: string | null;
checked_at: string | null;