Commit graph

65 commits

Author SHA1 Message Date
2f2a48f644 Merge pull request 'feat: add WebSocket server with ticket auth and heartbeat (#38)' (#45) from issue-38-websocket into issue-35-web-setup 2026-04-06 16:07:00 +00:00
le king fu
6d2e7449f3 feat: add WebSocket server with ticket auth and heartbeat (#38)
- Custom server (server.ts) wrapping Next.js + ws on same port
- Ticket-based auth: validates ephemeral nonce from /api/ws-ticket
- Origin validation against allowlist
- Session revalidation every 15 min (sends auth_expired, closes)
- Heartbeat every 30s (ping/pong, terminates dead connections)
- broadcastToUser() for API routes to notify connected clients
- Shared ticket store between API route and WS server via globalThis
- Health endpoint now reports active WS connections
- Dockerfile updated to use custom server

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:55:28 -04:00
46ead345b4 Merge pull request 'feat: implement REST API backend with full CRUD and sync (#37)' (#44) from issue-37-api-rest into issue-35-web-setup 2026-04-06 15:52:30 +00:00
le king fu
be9ba65337 feat: implement REST API backend with full CRUD and sync (#37)
- Lists, Tasks, Tags CRUD endpoints with soft-delete
- Sync endpoints (GET since + POST batch with idempotency keys)
- WS ticket endpoint (ephemeral nonce, 30s TTL, single use)
- Auth middleware on all endpoints via getAuthenticatedUser()
- BOLA prevention: userId check on every entity operation
- Zod strict schemas for input validation
- Filters and sorting on task listing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:47:53 -04:00
0369597eb6 Merge pull request 'feat: integrate Logto auth with middleware and login page (#36)' (#43) from issue-36-auth-logto into issue-35-web-setup 2026-04-06 15:38:45 +00:00
le king fu
42c39907cd feat: integrate Logto auth with middleware and login page (#36)
- Logto config matching la-compagnie-maximus pattern
- API routes: sign-in, callback, sign-out
- Next.js middleware protecting all routes except /auth and /api
- Auth helper to extract userId (sub) from Logto context
- Login page with Compte Maximus branding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:37:20 -04:00
le king fu
022fe53b92 feat: setup Next.js web project with Drizzle + PostgreSQL schema (#35)
- Init Next.js App Router with TypeScript, Tailwind, standalone output
- Drizzle ORM pg-core schema (sl_lists, sl_tasks, sl_tags, sl_task_tags)
- Database client, seed script, drizzle.config
- Health endpoint (/api/health) with DB latency check
- Dockerfile for Coolify deployment
- .env.example with DATABASE_URL and Logto config placeholders

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:03:34 -04:00
le king fu
7f8a0832d4 chore: bump version to 1.4.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:14:47 -04:00
244fbee405 Merge pull request 'fix: consolidate widget AsyncStorage and debounce expand (#29)' (#31) from issue-29-widget-expand-perf into master 2026-03-31 00:13:13 +00:00
9b1f7e79c9 Merge pull request 'feat: inline edit and delete for subtasks (#25)' (#30) from issue-25-edit-delete-subtasks into master 2026-03-31 00:13:04 +00:00
723f5d6501 Merge pull request 'fix: update vulnerable dependencies' (#28) from fix/simpl-liste-26-vulnerable-deps into master 2026-03-31 00:02:07 +00:00
le king fu
992c983026 chore: remove unused isWidgetTask function (#29)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:00:19 -04:00
le king fu
810bf2e939 fix: consolidate widget AsyncStorage keys and debounce expand (#29)
Merge widget:tasks, widget:isDark, and widget:expandedTaskIds into a
single widget:state key to reduce AsyncStorage I/O from 3 reads to 1.
Add 2s debounce on TOGGLE_EXPAND to prevent double-tap from collapsing
the subtask list. Legacy keys are migrated on first read.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:45:02 -04:00
le king fu
19706fa4a3 feat: add inline edit and delete for subtasks (#25)
Long-press a subtask to edit its title inline. Tap X to delete
with confirmation. Tap still toggles completion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:36:24 -04:00
escouade-bot
aa7ca20731 fix: use npm audit fix instead of broad overrides for vulnerable deps (#26)
Replace aggressive >=major overrides (picomatch>=4, brace-expansion>=2, etc.)
with npm audit fix which patches each dependency within its compatible semver
range: picomatch 2.3.2/3.0.2/4.0.4, brace-expansion 1.1.13/2.0.3/5.0.5,
undici 6.24.1, node-forge 1.4.0, tar 7.5.13, yaml 1.10.3/2.8.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 02:03:32 -04:00
escouade-bot
36e138ec55 fix: override vulnerable transitive dependencies with patched versions (#26)
Add npm overrides for picomatch, node-forge, tar, undici, brace-expansion,
and yaml to resolve 6 security vulnerabilities (4 high, 2 moderate).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 00:01:26 -04:00
le king fu
704ca9f693 fix: bump versionCode to 6 for APK upgrade compatibility
Previous preview build (v1.2.5) used versionCode 5 via production
autoIncrement, but app.json was still at 4. Android refuses to install
an APK with a lower versionCode than the currently installed one.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 21:10:29 -04:00
le king fu
72ace1db4a chore: bump version to 1.3.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:26:10 -04:00
3cecf9ba26 Merge pull request 'fix: show all tasks in widget (#23)' (#24) from fix/simpl-liste-23-widget-task-count into master 2026-03-13 00:25:21 +00:00
le king fu
9a8bb13e97 fix: cap widget task list at 30 items to prevent memory issues
Add safety limit of 30 rendered tasks in the widget to avoid Android
memory constraints. Also add cross-reference comment for the implicit
AsyncStorage coupling with useSettingsStore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:20:47 -04:00
le king fu
2e13528c6b fix: default widget period to all tasks (#23)
Change default widgetPeriodWeeks from 2 to 0 (all tasks) so that the
issue is resolved out of the box without requiring the user to discover
the new setting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:10:45 -04:00
le king fu
f040ec7902 feat: add configurable widget display period setting (#23)
Instead of removing the time filter entirely, let users choose the
widget display period (1 week, 2 weeks, 4 weeks, or all tasks) from
Settings. Default remains 2 weeks for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:04:35 -04:00
dde33acdf2 fix: show all tasks in widget without date or count limits
Remove the 2-week date filter from widget task query so tasks with
distant due dates are included. Remove the maxItems truncation from
the scrollable ListWidget so the displayed list matches the counter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:48:14 -04:00
b5e722c1f0 Merge pull request 'fix: save and back buttons not navigating away from task screen (#21)' (#22) from fix/simpl-liste-21-save-button-navigation into master 2026-03-10 01:26:05 +00:00
4c73a16302 fix: restore error handling and deduplicate goBack helper (#21)
- Replace `finally` with `catch` in [id].tsx handleSave so goBack is
  not called when updateTask/setTagsForTask fails
- Extract shared goBack helper into src/lib/navigation.ts
- Both [id].tsx and new.tsx now import goBack from the shared module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 21:06:05 -04:00
2296126ba4 fix: use goBack helper with canGoBack fallback and reset saving state (#21)
Replace all router.back() calls with a goBack() helper that checks
router.canGoBack() first and falls back to router.replace('/') when
there is no screen to return to. In the task edit screen, change
catch to finally so the save button always resets its disabled state
even if updateTask/setTagsForTask throws.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:47:22 -04:00
d6a69d849b Merge pull request 'fix: restore add button in medium/large widget (#19)' (#20) from fix/simpl-liste-19-widget-add-button into master 2026-03-09 23:52:11 +00:00
594896a909 Restore add button in medium/large widget by moving it to header
The ListWidget (Android ListView) introduced for scrolling takes all
available vertical space, pushing the footer add button off-screen.
Move the + button into the header row where it remains always visible
regardless of the task list scroll state.

Related to #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:01:52 -04:00
8d34ae5267 chore: bump version to 1.2.5 (versionCode 4)
Includes widget scroll support, completed tasks sorting, and
esbuild vulnerability fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:27:13 -04:00
0462b5a50b Merge pull request 'fix: sort completed main tasks to bottom of list (#15)' (#18) from fix/simpl-liste-15-sort-completed-tasks into master 2026-03-08 15:26:01 +00:00
2a7b70c65c Merge pull request 'fix: add scroll support in medium/large widgets (#11)' (#14) from fix/simpl-liste-11-widget-scroll into master 2026-03-08 15:25:16 +00:00
6c1bd043e6 Merge pull request 'fix: resolve esbuild vulnerability via npm override (#16)' (#17) from fix/simpl-liste-16-esbuild-vulnerability into master 2026-03-08 15:25:15 +00:00
2d9440b05c Sort completed main tasks to the bottom of the list
Add asc(tasks.completed) as the primary sort key in getOrderClauses()
so completed tasks always appear after active ones regardless of the
chosen sort mode (position, priority, dueDate, title, createdAt).

Also apply the same completed-first ordering to:
- getSubtasks() in tasks.ts
- noDateTasks query in widgetSync.ts
- subtasks query in widgetSync.ts

Ref: simpl-liste#15

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:04:32 -04:00
ce21337042 Add npm override to force esbuild ^0.25.0 across all dependencies
The transitive dependency chain drizzle-kit -> @esbuild-kit/esm-loader ->
@esbuild-kit/core-utils pulled in esbuild@0.18.20 which is vulnerable to
GHSA-67mh-4wv8-2f99. Adding an npm override forces all nested esbuild
instances to use ^0.25.0, resolving all 4 moderate audit findings.

Ref: simpl-liste#16

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:02:46 -04:00
le king fu
661ac0aa33 Add scrollable task list in medium/large widgets
Replace FlexWidget with ListWidget for the task list in medium and
large home screen widgets, enabling scroll when items exceed the
widget display area.

Fixes #11

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:56:13 -05:00
le king fu
fa037e9eef fix: increase touch targets for header buttons (#10)
Buttons (X, back, save, delete, export) had ~28px hit areas,
causing missed taps. Increased padding to p-2.5 + hitSlop for
~44px touch targets. Bump version to 1.2.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:22:54 -05:00
le king fu
a8efb82b3a Add missing .gitignore patterns (.env, .env.*)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:48:06 -05:00
le king fu
bf7c954528 Fix HIGH vulnerability (minimatch ReDoS)
npm audit fix to resolve ReDoS in minimatch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:27:04 -05:00
le king fu
64cd7bc896 chore: bump version to 1.2.3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:28:09 -05:00
le king fu
f2fe141737 fix: use react-native-keyboard-controller for reliable keyboard handling (#6)
Replace manual keyboard listeners and RN KeyboardAvoidingView with
react-native-keyboard-controller which handles edge-to-edge correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:18:45 -05:00
le king fu
360310e99f fix: replace KeyboardAvoidingView with manual keyboard padding (#6)
KeyboardAvoidingView does not work with edgeToEdgeEnabled on Android.
New approach: listen to Keyboard events, dynamically set spacer height
to actual keyboard height, and scrollToEnd when subtask input is focused.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:40:58 -05:00
le king fu
9835f9ef18 fix: use KeyboardAvoidingView behavior="padding" on Android (#6)
edge-to-edge mode disables classic adjustResize, so behavior must be
"padding" on both platforms to push content above the keyboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:25:30 -05:00
le king fu
fe7bda4747 fix: disable KeyboardAvoidingView on Android, sync widget on app start (#6, #9)
- Set KeyboardAvoidingView behavior to undefined on Android to avoid
  conflict with native adjustResize (was causing double-resize)
- Call syncWidgetData() at app startup to populate subtasks in widget cache
- Keyboard.addListener + adjustResize handles scroll correctly on Android

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:07:34 -05:00
le king fu
3efb7a1cb0 chore: bump version to 1.2.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:29:48 -05:00
le king fu
a03085c768 fix: keyboard scroll via Keyboard listener, bigger widget expand button (#6, #9)
- Replace unreliable setTimeout scroll with Keyboard.addListener('keyboardDidShow')
- Track subtask input focus state to scroll only when relevant
- Increase bottom spacer from h-32 to h-80 for more scroll room
- Enlarge expand/collapse button (32px with background) and arrow (fontSize 18)
- Ensure subtasks array is always initialized in widget handler

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:04:38 -05:00
le king fu
55e02e1b3a chore: bump version to 1.2.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:43:44 -05:00
le king fu
117de533d7 fix: subtask input scroll + widget expand/collapse subtasks (#6, #9)
- Fix keyboard hiding subtask input: use precise scrollTo with onLayout position instead of unreliable scrollToEnd (#6)
- Add expand/collapse button in widget for tasks with subtasks (#9)
- Subtasks are now toggleable directly from the widget
- Widget state (expanded tasks) persisted via AsyncStorage
- Update CLAUDE.md with widget docs, build/deploy process, and release workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:27:21 -05:00
le king fu
2412d368ac chore: bump version to 1.1.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:18:09 -05:00
le king fu
f61ce64b50 feat: show subtask progress in Android widget (#9)
- Add subtaskCount/subtaskDoneCount to WidgetTask with correlated SQL subqueries
- Display subtask indicator (✓ done/total) below task title in widget rows
- Update type guard for new fields in headless handler

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 16:47:47 -05:00
le king fu
72eafbd9d9 fix: prevent double-tap save, add subtasks at creation, fix keyboard overlap (#7, #8, #6)
- Add saving guard to prevent duplicate task creation on rapid taps
- Add pending subtasks UI to new task screen with local add/remove
- Wrap both task screens in KeyboardAvoidingView with scrollToEnd on subtask focus

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 16:27:03 -05:00