Daniel Volz
088a6c1a05
chore: fix all Biome lint warnings and MedDetail intake bell icons ( #265 )
...
- Backend: refactor nested ternaries, remove unused imports/any types
- Frontend: fix exhaustive deps, a11y label associations, array index keys,
empty CSS blocks, unused vars, type annotations
- MedDetail modal: fix intake schedule bell icons not rendering (use unified
intake source with fallback), place bell inline after person name
- MedDetail modal: revert schedule rows from grid to flexbox layout
Closes #264
2026-02-22 08:52:03 +01:00
Daniel Volz
943148fb49
feat: close modals with browser back button on mobile ( #257 )
...
* feat: close modals with browser back button on mobile
Create reusable useModalHistory hook that pushes history state when a
modal opens and listens for popstate to close it. Apply to ReportModal,
ClearMissedConfirm, ExportModal, ImportConfirm, and all modals using
ConfirmModal/ShareDialog/Auth/ExportModal base components. Escape key
handling was already in place for desktop.
Closes #253
* fix: update tests for renamed button labels and missing useModalHistory mock
2026-02-21 18:00:12 +01:00
Daniel Volz
052751b2ba
feat: reports, timeline toggles, and stock correction improvements ( #236 )
...
* refactor(frontend): modularize styles and polish modal/ui interactions
* feat: add report workflow and timeline/settings improvements
* fix: resolve CI failures for backend typing, lint, and playwright config
2026-02-20 18:52:59 +01:00
Daniel Volz
89d565bc9d
chore: fix lint errors and reduce warnings across codebase ( #234 )
...
* chore: fix lint errors and reduce warnings across codebase
- Fix noExplicitAny catches in backend routes and plugins
- Fix noNestedTernary issues in backend services
- Add keyboard event handlers for useKeyWithClickEvents in frontend
- Disable noImportantStyles rule in biome.json
- Fix formatting errors across all changed files
- Fix test file lint issues
Closes #233
* fix: restore any types in test files for TS compatibility
* fix: revert Auth.tsx dependency array changes that caused infinite re-render
* fix: null-safe user.username access in AppContext dependency array
2026-02-17 05:21:47 +01:00
Daniel Volz
8718311876
refactor(frontend): modularize App.tsx into components, pages, hooks, and context ( #60 )
...
- Extract App.tsx from 764 lines to ~404 lines
- Create reusable components: MedDetailModal, MobileEditModal, ShareDialog, etc.
- Add AppContext for global state management
- Split pages: DashboardPage, MedicationsPage, SchedulePage, SettingsPage, PlannerPage
- Create custom hooks: useAuth, useMedications, useSettings, useDoses, useSchedule
- Add utility functions in separate modules
- Fix stock status logic (>30 days = green/normal)
- Fix reminder threshold calculation (use reminderDaysBefore not lowStockDays)
- Fix takenBy validation (send [] instead of null)
- Fix datetime format for blister start times (add Z suffix)
- Style 'All OK' status as green/bold
BREAKING: None - all existing functionality preserved
2026-01-22 05:38:34 +01:00