From aa8b1c13e28c646237ffeefd311588b516fe83c5 Mon Sep 17 00:00:00 2001 From: archae0pteryx Date: Mon, 4 May 2026 17:20:48 -0700 Subject: [PATCH] chore: archive merged issue files Remove pre-merge drafts of 013/016/018/019/020 from issues/ root (authoritative copies already in issues/done/). Move 032 to done/ since fd9c4cc shipped it. --- issues/013-tray-icon-focus-list.md | 56 ------------------- issues/016-real-sprite-sheet.md | 59 --------------------- issues/018-larger-pig-hitbox.md | 27 ---------- issues/019-pigdetail-redesign.md | 44 --------------- issues/020-drag-and-toss.md | 47 ---------------- issues/{ => done}/032-preferences-window.md | 0 6 files changed, 233 deletions(-) delete mode 100644 issues/013-tray-icon-focus-list.md delete mode 100644 issues/016-real-sprite-sheet.md delete mode 100644 issues/018-larger-pig-hitbox.md delete mode 100644 issues/019-pigdetail-redesign.md delete mode 100644 issues/020-drag-and-toss.md rename issues/{ => done}/032-preferences-window.md (100%) diff --git a/issues/013-tray-icon-focus-list.md b/issues/013-tray-icon-focus-list.md deleted file mode 100644 index 9d214f8..0000000 --- a/issues/013-tray-icon-focus-list.md +++ /dev/null @@ -1,56 +0,0 @@ -# 013 — Tray icon + live focus list - -## Parent PRD - -`PRD.md` §FR4 (Menu bar item) - -## What to build - -Reinstate a macOS menu bar tray icon (removed in v1.1 per D1, now repurposed as the ranch control panel). The icon opens a native NSMenu that lists current Focuses and provides a Quit item. The menu rebuilds live whenever focuses change. - -- **Tray icon** (`src-tauri/src/app/tray.rs`, new): - - Install via `TrayIconBuilder` in `app::run()` setup. - - Left- or right-click opens the NSMenu (standard macOS tray behavior). - - Normal icon: the app's pig icon (or a placeholder until real assets exist). - - Over-cap icon: swapped to a red-badged variant via `TrayIcon::set_icon` on the `focuses-changed` + cap-check path. -- **NSMenu contents** (built with `tauri::menu::MenuBuilder`): - - ```text - [Focus title 1] ← MenuItemBuilder, disabled (no action yet — submenu comes in 014) - [Focus title 2] - … - ─ - Quit ← calls app.exit(0) - ``` - - Empty-state: show a single greyed-out "No focuses yet" item. -- **Live rebuild**: - - Subscribe to the existing `FOCUSES_CHANGED_EVENT` from within setup. - - On each event, re-read the focus store and call `tray.set_menu(Some(new_menu))`. - - Over-cap check runs the existing `CapEvaluator` to decide whether to swap the icon. -- **No tray popover window** — the overlay window launched at startup is the pig canvas; the tray is menu-only. - -## Completion promise - -On `main`, clicking the macOS menu bar pig icon shows a native dropdown listing all current Focus titles (updating live within 1s of any focus file change), with a Quit item at the bottom; the icon shows a red badge while any cap is exceeded. - -## Acceptance criteria - -- [ ] Tray icon appears in menu bar at app launch. -- [ ] Clicking the icon opens a native macOS menu. -- [ ] Menu lists one item per Focus using `focus.title`. -- [ ] Empty state: single greyed-out "No focuses yet" item. -- [ ] After adding or deleting a focus (via file or HTTP), the menu updates within 1s without restarting the app. -- [ ] When over-cap, tray icon swaps to a red-badged variant. -- [ ] "Quit" item exits the app cleanly. -- [ ] No static mut, no global singletons, no module-level mutable state. TrayIcon handle managed via `app.manage()` or passed through setup closure. -- [ ] `task check` green. - -## Blocked by - -None — can start immediately. - -## User stories addressed - -- US3 (list of focuses accessible without opening anything else) -- US6 (over-cap badge) diff --git a/issues/016-real-sprite-sheet.md b/issues/016-real-sprite-sheet.md deleted file mode 100644 index fbf7527..0000000 --- a/issues/016-real-sprite-sheet.md +++ /dev/null @@ -1,59 +0,0 @@ -# 016 — Real pig sprite sheet - -## Parent PRD - -`PRD.md` §FR3 (Pig UI — sprite animation) - -## What to build - -Swap the placeholder 🐷 emoji in `PigSprite.tsx` for the real 4-direction × 4-frame pixel-art sprite sheet PNG. Wire CSS `background-position` to the current `direction` and `frame` props so pigs animate correctly as they walk. - -**HITL gate**: the user must supply the sprite sheet PNG and confirm the frame layout (dimensions per frame, row order for directions) before code changes begin. - -- **Asset placement**: drop the sprite sheet at `src/assets/pig-spritesheet.png`. Vite will bundle it and expose it as a hashed URL via `import pigSheet from '../assets/pig-spritesheet.png'`. -- **Frame layout** (confirm with user before coding): - - Expected default: 4 rows × 4 columns. Row order: `down=0, left=1, right=2, up=3` (common RPG convention). Adjust if different. - - Frame width = `sheet_width / 4`, frame height = `sheet_height / 4`. -- **`PigSprite.tsx` change** (the swap comment at lines 16–26 marks the exact location): - - Remove the `` element. - - Replace with: - - ```tsx -
- ``` - - - `row` derived from `direction`: `left=1, right=2` (up/down unused in v1.2 — pigs only move in 2D horizontal plane for now). - - Remove `scaleX(-1)` transform from the button (direction handled by row selection instead). -- **CSS**: add `.pig-sprite-frame { display: block; }`. Remove `.pig-emoji` rule. -- **`PIG_SIZE`** in `usePigMovement.ts`: update to match `FRAME_H` (the sprite's actual pixel height × scale factor if rendering at 2×). - -## Completion promise - -On `main`, pigs render as pixel-art sprites from the real sprite sheet, walking left or right with correct frame animation, at the same hitbox size as the placeholder. - -## Acceptance criteria - -- [ ] User has provided the sprite sheet PNG and confirmed frame dimensions + row order. (HITL gate — must happen before code starts.) -- [ ] Pigs display the sprite sheet frames instead of the emoji. -- [ ] Walking right uses the correct sprite row; walking left uses a different row (not a CSS flip of right). -- [ ] Animation cycles through 4 frames at ~150ms per frame. -- [ ] `PIG_SIZE` in `usePigMovement.ts` matches the rendered sprite height so the Rust hit-test box aligns with the visible pig. -- [ ] `imageRendering: pixelated` applied so sprites don't blur at display scale. -- [ ] `task check` green. - -## Blocked by - -None (code-side). Requires user to supply sprite sheet asset before implementation begins. - -## User stories addressed - -- US1 (pigs are visually recognisable pixel-art animals, not emoji) diff --git a/issues/018-larger-pig-hitbox.md b/issues/018-larger-pig-hitbox.md deleted file mode 100644 index 6221d2f..0000000 --- a/issues/018-larger-pig-hitbox.md +++ /dev/null @@ -1,27 +0,0 @@ -# 018 — Larger pig hitbox - -## Parent PRD - -PRD.md §FR2 + Phase 3 polish - -## Problem - -The pig sprite is 48×48 CSS px. Clicking it precisely is fiddly — especially on pixel-art tails, ears, and corners where the sprite is mostly transparent. Users miss the click and interact with the desktop instead. - -## What to build - -Add a separate `HITBOX_PADDING` constant in \`usePigMovement.ts\` (e.g. 16 px) and use \`PIG_SIZE + HITBOX_PADDING\` when computing the rects sent to Rust via \`update_pig_rects\`. The visual sprite size stays unchanged; only the hit-detection footprint grows. - -- **\`src/hooks/usePigMovement.ts\`**: add \`export const HITBOX_PADDING = 16\`; in \`syncRects\` use \`size: (PIG_SIZE + HITBOX_PADDING) * dpr\` and offset \`x\`/\`y\` by \`-(HITBOX_PADDING / 2) * dpr\` so the hitbox is centred on the sprite. -- No Rust changes needed — \`PigHitTester::is_hit\` already works on whatever rects it receives. -- \`PigSprite\` click handler already fires on the \`