Commit Graph

13 Commits

Author SHA1 Message Date
Gemini Agent
8c9ae06360 Implement Edit Medication feature, refactor medication form, and fix build issues 2026-01-25 02:20:16 +00:00
Gemini Agent
7fa95c058e Fix medication scheduling bugs and add delete dose feature 2026-01-25 02:13:51 +00:00
Gemini Agent
f598f6138e Add test notification feature for push notification debugging
- Add POST /api/notifications/test endpoint to send test notifications
- Add "Send Test Notification" button to notifications settings page
- Shows success/failure feedback and removes expired subscriptions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 22:44:05 +00:00
Gemini Agent
66cb1ea095 Add admin panel with member management and password reset
Features:
- Admin panel at /settings/members for workspace owners
- View all workspace members with roles and last login
- Create new users directly (with temporary password)
- Change member roles (Owner/Editor/Viewer)
- Reset user passwords (forces change on next login)
- Remove members from workspace
- Force password reset flow on login
- Track last login timestamp for users

API Routes:
- GET/POST /api/workspaces/[id]/members
- GET/PATCH/DELETE /api/workspaces/[id]/members/[memberId]
- POST /api/workspaces/[id]/members/[memberId]/reset-password
- POST /api/auth/change-password

Schema changes:
- Added lastLoginAt DateTime? to User model
- Added forcePasswordReset Boolean to User model

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:22:10 +00:00
Gemini Agent
f9a7b68a99 Fix service worker install failure due to missing icon files
The service worker was failing to install because it tried to cache
icon files that don't exist (icon-192.png, icon-512.png).

Simplified the service worker to focus only on push notifications:
- Removed caching during install (was causing "redundant" state)
- Removed fetch handler caching
- Removed references to non-existent icon files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:26:40 +00:00
Gemini Agent
4753216b56 Fix service worker registration for push notifications
Instead of waiting on navigator.serviceWorker.ready (which may never
resolve if registration hasn't completed), explicitly register the
service worker and wait for it to activate.

This fixes the "service worker not ready" error on iOS Safari PWAs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:00:39 +00:00
Gemini Agent
54900b65c8 Add timeouts and better error handling for push notifications
- Add 10s timeout for service worker ready state
- Add 15s timeout for push subscription
- Check for PushManager support early (shows unsupported on incompatible devices)
- Provide specific error messages for different failure modes

This prevents the enable button from spinning forever on iOS devices
where push subscription may hang silently.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:54:40 +00:00
Gemini Agent
c9f3402e48 Configure VAPID keys for push notifications
Added VAPID key configuration to enable PWA push notifications:
- Generated VAPID public/private key pair
- Added build arg for NEXT_PUBLIC_VAPID_PUBLIC_KEY (needed at Next.js build time)
- Added runtime env vars for VAPID keys in docker-compose.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:45:38 +00:00
Gemini Agent
e5db48f82b Fix iCal endpoint crash from non-ASCII characters in workspace name
The Content-Disposition header was including the workspace name directly,
causing a "Cannot convert argument to ByteString" error when workspace
names contained smart apostrophes or other non-ASCII characters (e.g.,
"Grace's Plan" with curly apostrophe U+2019).

Sanitize filename by removing non-ASCII characters before using in header.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:34:00 +00:00
Gemini Agent
3034d52884 Fix appointment edit page and iCal timezone issues
- Create appointment edit page at /appointments/[id]/edit
- Fix iCal calendar timezone handling:
  - Add VTIMEZONE block for Australia/Perth
  - Use TZID parameter for DTSTART/DTEND
  - Properly format local times without Z suffix
- Appointments now appear correctly in Google Calendar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:22:23 +00:00
Gemini Agent
dd4ef2c4cd Add 11 major features for caregiver health management
Features added:
- Emergency Info Card: Full-screen emergency view with patient info
- Refill Tracker: Track pill counts with auto-decrement on dose
- Activity Feed: View caregiver activity with filtering
- Symptom Tracker: Log symptoms with severity and offline sync
- Print Views: Daily meds, appointments, doctor visit summaries
- iCal Export: Calendar subscription for appointments
- PDF Export: Medical summary for doctor visits
- Calendar View: Monthly calendar for appointments
- Appointment Preparation: Checklist for upcoming appointments
- Medication Reminders: PWA push notifications with quiet hours

Bug fixes:
- Fix invite workflow: Register/login now properly redirect back
- Add undo for doctor questions (can unmark "asked" questions)
- Fix API route type annotations for Next.js 14 compatibility
- Add Suspense boundary for useSearchParams in login/register

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:42:46 +00:00
Gemini Agent
515376e126 Fix Docker deployment and add Tailscale Funnel support
- Fix argon2 native module build in Docker (add build-essential, python3)
- Switch Docker base image from Alpine to Debian-slim for OpenSSL compatibility
- Fix session cookies for HTTP access (COOKIE_SECURE env var)
- Fix TypeScript type errors in sync routes and middleware
- Fix CSS circular dependency in globals.css
- Fix Map iteration in rate-limit cleanup
- Add createdAt field to LocalNote interface
- Configure Tailscale Funnel on port 10000
- Update NEXT_PUBLIC_APP_URL for public funnel access
- Add initial Prisma migration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 09:00:19 +00:00
Gemini Agent
a32c609830 Initial commit: Next Step health management app
A calm, reliable app to help manage appointments, medications, and notes
for chemo patients and their families.

Features:
- Today dashboard with next appointment and medications due
- Medication tracking with multiple schedule types (fixed times, interval, weekdays, PRN)
- One-tap dose logging with 5-minute undo window
- Questions for doctor tracking
- Family sharing with workspace model and invite links
- Offline-first with IndexedDB and sync
- Docker Compose deployment with Tailscale Funnel support

Tech stack:
- Next.js 14 (App Router) + TypeScript + Tailwind CSS
- PostgreSQL + Prisma
- Argon2 password hashing + session cookies
- Dexie.js for IndexedDB

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:16:45 +00:00