Commit Graph
17 Commits
Author SHA1 Message Date
nh9961 767967f25d fix: unify day boundaries on device-local time, JSON import preview parity
- Limits/streaks/greeting now use device-local days (was hardcoded Europe/London),
  matching dashboard metrics; label copy updated
- JSON imports now go through the same preview/duplicate-detection modal as Excel
2026-07-19 21:12:02 +00:00
nh9961 9e8f3c55d6 perf: logbook memoization and pagination, debounced realtime, lazy exceljs
- Precompute per-entry spend/caffeine/sugar map; paginate ledger at 50 rows
- Debounce realtime refetches (500ms trailing) and suppress during bulk import
- Show import progress (Importing X of N)
- Dynamic-import exceljs: entry chunk 1640 -> 700 kB
- Skeleton placeholders for initial load on Overview/Trends/Logbook
2026-07-19 21:00:51 +00:00
nh9961 bb5750e928 feat(ui): unified motion language and interaction states
- Shared transition constants (view/modal/toast/tile) with standard ease-out
- MotionConfig reducedMotion=user plus CSS reduced-motion neutralizer
- Consistent hover/press/focus-visible states across all interactive classes
2026-07-19 20:45:47 +00:00
nh9961 3706021326 feat(ui): view-by-view UX redesign and accessibility pass
- Overview: limits hero with progress states, spend pill, primary quick-add, mobile FAB
- Logbook: day-grouped entries with subtotals, unified filter bar, Log again,
  human source labels
- Trends: unified chart cards, tick thinning, chart aria summaries, radiogroup
  forecast control
- Settings: sectioned layout with separated danger zone, ThemePicker aria fix
- EntryModal: fieldset grouping, Field primitive, safe date validation
- AuthView: autoComplete, password visibility toggle
- StatHint popover replacing title-only tooltips; mobile stacked import preview
- Remaining inline hex styles converted to theme tokens
2026-07-19 20:34:10 +00:00
nh9961 733c6cbae8 feat(ux): toast system, accessible modal wrapper, safer dialogs
- Global toast stack (success/error/info) replacing hidden notice/syncError
- Shared Modal: focus trap, Escape, focus restore, scroll lock; all dialogs migrated
- ConfirmDialog tone prop; limit-override now warning-styled
- Single-entry delete now requires confirmation, per-row busy spinner
- Onboarding no longer closes on failed save; inline error + skip option
2026-07-19 20:08:14 +00:00
nh9961 f8d06cbafb feat(ui): dark-mode token sweep, mobile nav safe-area and a11y polish
- Convert hardcoded light surfaces/borders/text in index.css to theme tokens
- Token-driven status cards, semantic colors, elevation shadows
- Mobile bottom nav: 20px icons, aria-current, safe-area inset padding
- Neutral dark pre-mount canvas fallback
2026-07-19 19:46:56 +00:00
nh9961 50c729eae7 refactor: decompose monolithic App.tsx into per-component files
- Extract views to src/components/views/ (Overview, Logbook, Trends, Settings, Auth)
- Extract standalone components (EntryModal, ImportPreviewModal, ConfirmDialog,
  Sidebar, TopBar, MobileNav, EntryLedger, FiltersPanel, QuickAddPanel, etc.)
- Move shared helpers to src/lib (dashboard, filters, userDisplay) and static
  data to src/data (accents, quickAdds)
- App.tsx now orchestration-only (2971 -> 777 lines); no behavior change
2026-07-19 19:31:40 +00:00
nh9961 2cd8dd5130 feat(ui): extend design tokens, add dark mode, add UI primitives
- Add warning/success token roles across light and dark themes
- Add Light/Dark/System theme mode (localStorage + Appwrite prefs)
- Derive dark token stacks from existing theme seeds
- Remove forced light app-shell background; dynamic color-scheme
- Add Button/Card/Field/Badge/EmptyState primitives under src/components/ui
2026-07-19 18:07:42 +00:00
Cursor Agentandnh9961 7a461af9ee Couple daily can and spend limits via usual can size
Link daily caps through the user's chosen standard can size (250/355/473ml)
and built-in prices. Onboarding asks for size and can ceiling with derived
spend preview. Settings syncs cans and spend bidirectionally. Forecast lock
button sets both limits together.

Co-authored-by: nh9961 <hello@nedhalksworth.com>
2026-07-01 14:45:45 +00:00
Cursor AgentandNed Halksworth 64584315e5 Fix barcode scanner on iOS Safari
iOS WebKit does not provide a reliable native Barcode Detection API, and
ZXing often failed due to strict camera constraints and video startup timing.

- Install @undecaf/barcode-detector-polyfill (ZBar WASM) on Apple devices
- Fall back through progressively looser getUserMedia constraints
- Wait for video metadata/playback before decoding frames
- Throttle native scans on iOS and tune ZXing retry intervals
- Defer scanner startup until the modal video element is mounted

Co-authored-by: Ned Halksworth <hello@nedhalksworth.com>
2026-05-27 19:51:08 +00:00
Ned Halksworth 4e5fa5d42e fix: fix fact the app stopped working for goodness sake 2026-05-27 19:10:57 +01:00
Ned HalksworthandNed add2586cb1 rebuild theme system and restyle ui
flatten themes to 3 colors without categories, rewrite css in vanilla layers,
simplify onboarding flow, tighten greeting punctuation, adjust viewport meta
2026-05-27 16:40:06 +00:00
Ned HalksworthandNed ea8b10a81f wire up barcode scanning with zxing
scanner modal, product preview, verified catalog with 12 red bull barcodes,
appwrite-backed user mappings, lookup pipeline with known/user/partial/unknown result
2026-05-27 16:40:06 +00:00
Ned HalksworthandNed 4c7d719e02 rm coach chat and ollama proxy
drop coach panel, session, chat store, and the limitsSummaryForCoach helper
2026-05-27 16:40:06 +00:00
Ned Halksworth ec9ea9d1f9 feat: integrate barcode scanning functionality and enhance Appwrite setup
- Added a new `barcode_products` collection to the Appwrite setup for managing barcode data.
- Implemented barcode scanning feature with a dedicated modal for scanning and adding products.
- Introduced new components for barcode product preview and management.
- Updated the setup script to seed verified barcode products from a JSON file.
- Enhanced the application state management to handle barcode-related actions and user interactions.
2026-05-27 14:29:22 +01:00
Ned Halksworth 0db81bddd5 feat: implement user limits and onboarding features
- Added user limits management with daily can and spend limits.
- Integrated onboarding flow to guide users through setting limits.
- Enhanced greeting messages to reflect user limits and violations.
- Updated CSS for new limit-related components and improved UI consistency.
- Refactored coach session to utilize user limits in interactions.
2026-05-23 21:17:36 +01:00
Ned HalksworthandCursor dc9fbf496d Refactor coach to plain Appwrite storage with integrated overview UI.
Remove client-side encryption, migrate coach_chats schema, fix the Ollama proxy, and embed coach on overview alongside the dedicated tab.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 20:25:21 +01:00