Commit Graph

32 Commits

Author SHA1 Message Date
230a4034e8 feat: rate limiting, token hashing, remove mock login route
Some checks are pending
Playwright Tests / test (push) Waiting to run
Test and SonarQube / quality (push) Waiting to run
Erste Abarbeitung des Repository-Audits (siehe TODO.md).

Sicherheit:
- Rate-Limiting für alle vier Auth-Endpunkte. Sie waren unbegrenzt aufrufbar,
  also beliebig viele Mails über den eigenen SMTP-Zugang und beliebig viele
  Rateversuche auf Verifizierungscodes.
- Passwort-Reset-Token nur noch als SHA-256-Hash in der Datenbank. Bisher
  Klartext: Lesezugriff auf die DB genuegte zur Kontouebernahme.
- Tote Mock-Login-Route entfernt. Sie verglich gegen ein hartcodiertes
  Fake-Passwort und war ueber die Middleware-Ausnahme fuer /api/auth/*
  ohne Anmeldung erreichbar.
- Passwort-Reset auf bcrypt-Kosten 12, wie beim Signup.

Reparaturen:
- npm test rief jest auf, obwohl es weder Jest-Config noch Jest-Tests gibt.
  Zeigt jetzt auf Playwright; jest/ts-jest/@types/jest entfernt.
- Falscher sonar.projectKey im Workflow.

Verifiziert per tsc gegen die geaenderten Bereiche: keine neuen Typfehler.

v1.117.0

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 20:01:30 +02:00
5a6ef90e31 fix: make app update script executable
Some checks failed
Playwright Tests / test (push) Has been cancelled
Test and SonarQube / quality (push) Has been cancelled
2026-09-05 13:21:01 +02:00
6f4fe219dc fix: make update-app.sh the single update path and run it at boot
Some checks are pending
Playwright Tests / test (push) Waiting to run
There were two near-identical update scripts and they drifted: the npm ci fix
from 1.114.1 only ever landed in update-app.sh, so the boot path kept running
npm install. my-weekly-todo-update.service now runs update-app.sh, and
boot-update.sh is a shim kept only so a not-yet-recopied unit still works.

To be usable at boot the script needed three things it did not have:

- Skip the rebuild when HEAD already matches origin/main and a standalone
  build exists, so a reboot is not a full rebuild every time (--force
  overrides).
- Do not restart PM2 when its daemon is not up yet. At boot this unit runs
  before pm2-root.service, and probing with `pm2 describe` would spawn a
  stray daemon that races the real service, so it checks the pid file.
- A flock single-instance lock, so a boot run and a manual run cannot install
  into the same tree at once.

It also picks up prisma migrate deploy / generate and the .env copy that only
the boot script had. The log moved to /var/log/my-weekly-todo-update.log.

v1.115.2

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 13:46:18 +02:00
9d4e40e4e3 fix: make the boot update actually fail loudly and survive long builds
Some checks are pending
Playwright Tests / test (push) Waiting to run
The "update on reboot" unit silently did nothing useful. boot-update.sh piped
every command into tee, so `set -e` only saw tee's exit status: a failed
npm install or build left a half-built tree and still logged "Boot update
finished". It also used npm install (rewrites package-lock.json, so the next
git pull aborts), had no GIT_TERMINAL_PROMPT=0, and was not wrapped in a
function even though git pull rewrites it mid-run.

The unit's TimeoutStartSec=300 was the other half: npm ci + prisma generate +
next build takes far longer than 5 minutes in the container, so systemd
SIGTERMed the oneshot mid-install and left a node_modules tree npm could no
longer remove (ENOTEMPTY on rmdir node_modules/date-fns/isEqual).

Also resyncs package-lock.json with package.json, missed in the 1.115.0 commit.

v1.115.1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 13:27:11 +02:00
2028ba80e0 fix: copy public/ and .next/static/ into standalone output on deploy
Some checks are pending
Playwright Tests / test (push) Waiting to run
next.config.js sets output: 'standalone', but Next.js does not copy public/
or .next/static/ into .next/standalone — that is a documented manual step.
Skipping it shipped new server code referencing new chunk hashes while the
old chunks stayed in the standalone tree, so those requests 404'd, React
never hydrated, and pages hung on "Loading session..." while the API kept
returning 200.

v1.114.2

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-02 13:13:42 +02:00
3338978163 chore: version-control the production deploy script
Moves the deploy script off the server and into the repo as
scripts/update-app.sh, with the two fixes made during the v1.114.0 deploy:

- set -euo pipefail, so a failed git pull aborts instead of rebuilding and
  restarting PM2 on unchanged code while printing "Update Complete"
- npm ci instead of npm install, which rewrote package-lock.json and left the
  tree dirty so the next git pull aborted

The body is wrapped in a main() function because the script lives inside the
checkout it updates, and git pull rewriting it mid-run would leave bash
reading from a stale file offset.

v1.114.1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 19:03:08 +02:00
eebc8eb9b6 feat: drag-to-provider sync, recurring task editing, resizable areas, search improvements
- Sync tasks to external provider when dragged to a synced Someday list (Google/Outlook/Synology)
- Add Synology support to POST /api/tasks/sync endpoint
- Edit recurring task series (title, interval, unit, time) all at once via new API
- Make Someday and all-day areas vertically resizable with drag handles (height persisted in cookies)
- Include Someday tasks in search results with list name display
- Instant calendar event appearance after creation (improved optimistic update + immediate cache refresh)
- Fix project color not updating on tasks when project color changes
- Add database backup script for Supabase LXC

v1.39.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 00:50:42 +01:00
a32e5601d0 fix: push scheduler handles all-day events and adds debug logging
- Query both timed (startDateTime) and all-day (startDate) events
- All-day events treated as starting at 07:00 UTC (~09:00 CET)
- Log number of events found per user for debugging
- Skip already-passed events to avoid unnecessary checks

v1.37.2
2026-03-16 22:22:58 +01:00
f9c7893341 feat: add push notifications for calendar event reminders
- Service worker + Web Push API for browser/mobile notifications
- PWA manifest with icons for home screen install (iOS 16.4+)
- Push subscription management (subscribe/unsubscribe API routes)
- Notification toggle in Settings > General
- Push scheduler script (cron) checks cached events and sends
  notifications at reminder times, with dedup tracking
- Test notification endpoint at /api/push/test
- Persists reminders in calendar event cache for scheduler access
- New DB models: PushSubscription, SentNotification
- New user field: notificationsEnabled

Setup: generate VAPID keys with `npx tsx scripts/generate-vapid-keys.ts`
and add to .env, then run scheduler via cron every minute.

v1.37.0
2026-03-16 21:38:15 +01:00
4b0b23c024 Fix potential LXC MODULE_NOT_FOUND by pinning next/prisma and cleanup 2026-03-13 12:42:24 +01:00
704738777a fix: add missing migrations and fix deploy script failures
- Fix setval(0) error in accountNumber migration (use GREATEST(..., 1))
- Add migration for dateVerticalAlign, dayHeaderGap, weekday settings, quoteLanguages
- Deploy scripts now fall back to db push if migrate deploy fails

v1.22.3
2026-03-10 15:59:37 +01:00
ef61ec3c20 fix: remove .next/server copy that breaks standalone middleware-manifest
The standalone build already includes the correct server files.
Copying .next/server on top was overwriting middleware-manifest.json,
causing MODULE_NOT_FOUND errors at runtime.

v1.22.1
2026-03-10 15:27:41 +01:00
e3c9f56608 chore: add systemd service for auto-update on LXC boot
Runs boot-update.sh before PM2 starts to ensure the app is
always up-to-date with main branch after container reboot.

v1.22.0
2026-03-10 15:22:11 +01:00
76445bffc7 fix: copy .next/server to standalone dir in deploy scripts
Both boot-update.sh and update-server.sh were missing the
cp -r .next/server step, causing middleware-manifest.json
not found errors after deployment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

v1.14.1
2026-03-07 19:23:45 +01:00
fc1222d5e8 fix: update-server.sh uses git reset --hard to avoid pull conflicts 2026-03-06 12:28:44 +01:00
aff9222f5f fix(lxc): copy .env file to standalone directory for env vars 2026-03-02 21:04:03 +01:00
58a35a0c44 fix(lxc): copy static and public folders to standalone directory for asset serving 2026-03-02 18:00:53 +01:00
d4a08f236d fix(lxc): Revert PORT to 3000 to fix Nginx gateway connection 2026-03-02 17:29:37 +01:00
6103ecc417 fix(lxc): explicitly pass NEXTAUTH_URL to standalone pm2 start 2026-03-02 13:58:46 +01:00
667b3f3b37 fix(lxc): explicitly start standalone server on PORT 3002 2026-03-02 09:21:17 +01:00
f70a235c57 fix(lxc): refactor boot and update scripts for safe migrations and standalone mode
chore(release): bump version to 1.8.6
2026-03-01 15:59:18 +01:00
dea7c387ea v1.7.0: Responsive mobile layout + boot update script
- Add responsive CSS breakpoints (480px/768px/1024px)
- Auto-adjust viewDays based on screen width
- Keep time column visible on mobile (compact)
- Add boot-update.sh for auto-update on reboot
- Fix Suspense boundary in verify-email page
- Bump version to 1.7.0
2026-02-27 13:03:25 +01:00
f4ae9f85aa chore: make update-server.sh safe for crontab (reboot) usage 2026-02-27 09:32:41 +01:00
8d2134b83d chore: add pm2 save to update-server.sh 2026-02-27 09:29:53 +01:00
2c81b348aa feat: add LXC deployment automation scripts 2026-02-27 09:21:10 +01:00
2133364e3d feat: email verification, auto-save settings, calendar UX improvements
- Email verification: 6-digit code + one-click link on signup
- SMTP integration with nodemailer (lazy-init, auto-detect TLS)
- Verify-email page with 6 input boxes, paste support, auto-submit
- Resend verification with 60s rate limiting
- Block login for unverified email accounts

- Auto-save settings: debounced 800ms save on all profile changes
- Redirect to calendar settings after OAuth connection
- Fix Google Calendar connection display after connecting
- Task actions hover toolbar: fix z-index/overflow clipping on first row
- Make day header sticky with proper stacking context
2026-02-27 08:57:15 +01:00
f0672e5c68 feat: fix Docker deployment, OAuth redirects, event editing, and UI improvements
- Fix Docker build: resolve hooks-rules-of-hooks in GridTaskBlock, add Suspense
  boundary for useSearchParams, fix non-root user home dir and prisma binary path
- Add comprehensive DB migrations for missing columns/tables (WeeklyGoal,
  CachedCalendarEvent, User settings, SomedayList sync fields, Task subtasks)
- Fix Outlook OAuth redirect using NEXTAUTH_URL instead of request.url
- Fix CalendarEventModal preserving existing event dates (support flat format)
- Fix header z-index layering so goal text doesn't block hover controls
- Convert font size selects to free-form text inputs, add dayHeaderGap setting
- Add goal 2-line clamping with 500px max width
- Fix weekend colors not applying to date elements

v1.6.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:18:13 +01:00
ccb34d12d5 feat: Add soft delete, remove Apple Reminders, improve Google Tasks sync
Add soft-delete support for tasks with deletedAt field and migration.
Remove Apple Reminders iCloud integration entirely (API routes, lib,
UI modal, and Python script) in favor of CalDAV approach. Add periodic
pull-sync from Google Tasks every 2 minutes with deletion detection.
Fix orphaned someday task rescue and cross-list task toggle/edit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:04:49 +01:00
7f76774258 fix: Google OAuth redirect, Tasks Account creation, Apple Reminders CalDAV removal
- Fix Google OAuth callback to redirect using NEXTAUTH_URL (prevents session loss behind reverse proxy)
- Create/update Account record during Google OAuth callback so Google Tasks API has access tokens
- Remove legacy CalDAV fallback from Apple Reminders - only use CloudKit (iOS 13+ Reminders app)
- Add debug command to icloud-reminders.py for diagnosing CloudKit connectivity
- Improve profile save error messages to show details
- Add better error logging throughout CloudKit reminders flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:26:43 +01:00
798bcfe44a feat: Add Google Tasks, Apple Reminders, task import/sync, holidays, and UI enhancements
- Add Google Tasks integration and Apple Reminders support
- Add task import/export with list management APIs
- Add goal API for weekly goals
- Add German holidays library
- Add ImportListModal component
- Enhance WeeklyView with major UI improvements
- Enhance CalendarSettings with new connection options
- Add external task fields to database schema
- Add Playwright test suites for auth and tasks
- Add iCloud reminders Python scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:56:14 +01:00
d054144939 feat: localize app to German and add configurable day hours 2026-02-09 12:11:52 +01:00
d92a8c7210 feat: add task actions (notes/delete) and refine animation logic
- Added 'onDelete' and 'onNotes' support to TaskItem.
- Implemented hover actions (Delete and Notes icons) for tasks.
- Added Notes Modal for editing task markdown content.
- Simplified navigation animation to remove blank flash (single-phase slide-in).
- Fixed syntax error in updateTask function.
- Updated styles for modal and task actions.
2026-02-01 12:25:53 +01:00