Drop .cursor rules and npm lockfile; standardize on Bun; remove v1 migration code

- Delete .cursor/rules/boardui.mdc (rules live in AGENTS.md) and
  package-lock.json; README now uses bun install/dev/test/build
- Remove migrateV1Slots, the v1 localStorage key, the legacy "asian"
  cuisine expansion, the ownsPantryStaples fallback, and the pre-BoardUI
  theme-key carryover in the layout init script; drop their tests

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Cayden Schwechten 2026-11-06 20:41:36 -06:00
parent df5dd3a70e
commit 2cd683e64a
7 changed files with 14 additions and 6904 deletions

View file

@ -3,7 +3,7 @@
import { useEffect, useReducer, useState } from "react";
import type { Appliance, CookingStyle, Cuisine, ItemId, ItemPreference, MealPlanState } from "@/app/types";
import { toggle, withoutVisibleSlots } from "./plan";
import { DEFAULT_STATE, migrateV1Slots, sanitizeState } from "./sanitize";
import { DEFAULT_STATE, sanitizeState } from "./sanitize";
// ---------------------------------------------------------------------------
// All plan state lives in one reducer, persisted to localStorage.
@ -13,10 +13,7 @@ import { DEFAULT_STATE, migrateV1Slots, sanitizeState } from "./sanitize";
// than a dozen useStates.
// ---------------------------------------------------------------------------
// v2: meal numbers became fixed (1 = Breakfast, 2 = Lunch, 3 = Dinner).
// v1 numbered meals from the first VISIBLE one, so it's converted once on load.
const STORAGE_KEY = "budget-meal-planner:v2";
const LEGACY_STORAGE_KEY = "budget-meal-planner:v1";
export type PlanAction =
| { type: "setBudget"; value: number }
@ -90,12 +87,6 @@ function loadSavedState(): MealPlanState {
try {
const raw = window.localStorage.getItem(STORAGE_KEY);
if (raw) return sanitizeState(JSON.parse(raw));
const legacy = window.localStorage.getItem(LEGACY_STORAGE_KEY);
if (legacy) {
window.localStorage.removeItem(LEGACY_STORAGE_KEY); // the v2 copy is written on first render
return sanitizeState(migrateV1Slots(JSON.parse(legacy)));
}
return DEFAULT_STATE;
} catch {
return DEFAULT_STATE; // corrupt JSON or blocked storage