Commit Graph

60 Commits

Author SHA1 Message Date
fegger de9a8606ab Add Google Calendar integration and improve station selection
Implement full OAuth 2.0 flow for Google Calendar, including token
exchange, refresh, and status checks. Add UI for connecting, syncing,
and disconnecting Google accounts in the Calendar panel.

Additionally:
- Make mobile station selection async with error handling and alerts
- Add HAFAS LocMatch method to API client for finding nearest station
- Expose Google OAuth env vars in Next.js config
2026-05-13 09:02:58 +02:00
fegger 672d053ece Add core app features for event management and notifications
- Add new hook files for departure time, destination station, geocode, theme, walk route, and WienerLinien
- Add navigation types for centralized route definitions
- Update App.tsx to use ref for initialization logic
- Update notification service to use stable exports from expo-notifications
- Remove legacy notifications.ts and rename to expoNotifications.ts
- Add ScrollView to several screens for better layout
- Replace duplicated type definitions with imports from shared navigation types
- Add useTheme to relevant screens
- Remove notification handler duplication in App.tsx
v1.0.2
2026-05-13 08:37:52 +02:00
fegger 316e5def72 Refactor mobile to fix dependency resolution and add polyfills
Update Expo and React dependencies to compatible versions. Create a
custom Metro config to resolve module conflicts in the workspace and
map Jest modules to local node_modules.

Add a SharedArrayBuffer polyfill for older runtimes and introduce an
adapter for expo-notifications to abstract direct imports.
2026-05-12 22:29:38 +02:00
fegger 3c6df95a86 Refactor monorepo structure and replace hardcoded colors
Add TypeScript project references, update ESLint configs to support
ESM modules, and introduce brand semantic color tokens across the web
app. Add comprehensive documentation for architecture, API reference,
development setup, and user guide.
v1.0.1
2026-05-12 21:22:40 +02:00
fegger 98e74ee48d Update lint and typecheck scripts for all packages
Add linting to the mobile app and include core and api-client
packages in the root lint, typecheck, and test scripts. Ignore
node_modules in all subdirectories and clean up stale test results.
Update lint and typecheck scripts for all packages

Add ESLint configuration for mobile app and shared packages.
Rename mobile jest config to .cjs and enable ESM. Include
packages/core and packages/api-client in monorepo lint,
typecheck, and test scripts.
2026-05-12 17:47:47 +02:00
fegger 2eeae9a27b Add arrival buffer and transport options to notification settings
Update notification calculation to use arrival buffer
Add advanced settings toggle for arrival buffer and transport options
Fix reverse geocode call in SettingsScreen
2026-05-12 15:05:23 +02:00
fegger 35971596b3 Add API security guards, rate limiter, and manual test checklist
Implement strict CORS enforcement and per-IP rate limiting in the Next.js middleware. Add input validation helpers for
coordinates and request body size limits. Introduce SSRF protection for calendar URL fetching. Update mobile settings to
support new transport options and arrival buffers. Include a comprehensive manual testing checklist for integration
verification.
2026-05-12 14:42:11 +02:00
fegger 863996f06c Update BikeSection and EventCard with arrival buffer and walk options 2026-05-12 13:52:35 +02:00
fegger 1851d2ed47 Add TimeToLeave feature checklist and plan (50)
Add TimeToLeave feature checklist and plan
2026-05-12 13:17:17 +02:00
fegger eac4f6e216 Revamp branding, UI styling, and HAFAS integration
- Update BRAND_GUIDELINES.md with new melting clock logo concept
- Rebrand UI components with new violet-to-pink gradient color scheme
- Implement HAFAS authentication headers and GET support in route
- Update logo SVGs to match new brand guidelines
- Fix HAFAS time format to exclude millisecond padding
- Update default station to Mödling Bahnhof
- Bump workspace package versions to 1.0.0
2026-05-12 09:44:37 +02:00
fegger 2c65dc1d5a Update README.md 2026-05-11 23:02:58 +02:00
fegger b87acfd0e1 Update README to reflect logo and feature scope
Removes mention of bike route calculation from the main
description as this functionality is not implemented in
the current scope.
2026-05-11 23:01:06 +02:00
fegger 08794eae05 Update branding guidelines and assets
Adds a comprehensive `BRAND_GUIDELINES.md` file detailing brand assets, color palettes, and typography.

This commit also introduces multiple SVG assets for various logo usages (icon, horizontal, dark mode), updates the main
`layout.tsx` metadata, and adds the necessary component files (`LogoIcon.tsx`, `LogoHorizontal.tsx`, etc.) to support
these new assets.
2026-05-11 22:59:03 +02:00
fegger dc5b40ff6e Update .gitignore 2026-05-11 21:10:42 +02:00
fegger 4366f781d3 chore: remove agent config files from git tracking 2026-05-11 21:08:02 +02:00
fegger ea88e9d34a chore: remove IDE and agent_loop dirs from git tracking 2026-05-11 21:05:27 +02:00
fegger b541c809b2 Update .gitignore 2026-05-11 21:02:31 +02:00
fegger 014fe789f8 chore: bump to v1.0.0 and add CHANGELOG v1.0.0 2026-05-11 20:28:59 +02:00
fegger ef36d227e9 chore: remove accidentally tracked Next.js build artifacts from .next/ 2026-05-11 19:52:36 +02:00
fegger 6fb7941d56 Update README.md 2026-05-11 19:09:24 +02:00
fegger 55c77c7572 Update README.md 2026-05-11 19:00:02 +02:00
fegger fff5700132 Add README for TimeToLeave project
Adds comprehensive setup and structure documentation to the root README file. This outlines the monorepo structure,
prerequisites, and development workflow for new contributors.
2026-05-11 18:55:01 +02:00
fegger 5bcfafcbaf Add mobile services, web proxy, and Gemma4 agent loop
- Mobile: add push notification and calendar sync services with full test suite (calendar, eventStore, notifications,
  screens)
- Mobile: add EAS build config and Jest setup
- Web: add API proxy, update useDestinationStation/useJourneys hooks, add middleware tests
- Web: update next.config and rebuild
- Agent: add Gemma4-based agent loop (agent_base, ttl_agent, ts_agent)
- Docs: add privacy policy, post-MVP plan, and aider rules
2026-05-11 18:32:54 +02:00
fegger 20159262c1 Add getLeaveStatus utility and update project status
- Introduce `getLeaveStatus` function in `packages/core/src/status-utils.ts` to determine leave-by status based on
  journey data
- Mark Phase 1 mobile app tasks as complete in `CHECKLIST.md`
- Add mobile workspace configurations and npm scripts
2026-05-10 22:14:41 +02:00
fegger d08afc1dcb mobile app phase 1 2026-05-10 21:19:39 +02:00
fegger 442a00dbbe Add Wiener Linien integration with API routes and client 2026-05-10 19:20:19 +02:00
fegger 330cbb6b37 Refactor EventCard tests to verify hook arguments 2026-05-10 19:11:04 +02:00
fegger de9c16430b Support repeated stopIds and update WienerLinien API URL 2026-05-10 18:06:41 +02:00
fegger b2608a4a60 Fix ApiClient mock implementation and update constructor tests 2026-05-10 17:53:19 +02:00
fegger 7901368971 Add Wiener Linien API integration and departures monitoring 2026-05-10 17:19:24 +02:00
fegger 48e6f5c7fd Add leave reminder feature with browser notifications 2026-05-10 10:32:55 +02:00
fegger c0f34b9e2a Update CHECKLIST.md 2026-05-10 09:49:22 +02:00
fegger ce2a900545 Add correlation IDs and tests for monitoring
Generate short UUIDs in API route catch blocks to aid debugging.
Update existing API tests to assert the correlation ID. Add unit
tests for `useJourneys` and `useBikeRoute` hooks, and component
tests for `EventCard` and `CalendarView`.
2026-05-10 08:59:17 +02:00
fegger 7abfddd607 Add debounce, theme toggle, and calendar optimization
Implement 400ms debounce with AbortController in useGeocode and
useDestinationStation to prevent excessive API calls. Add dark mode
toggle via new useTheme hook, persisting preference to localStorage
and applying to document root.

Pre-group calendar events by date using a Map in CalendarView to
replace O(n) filter operations with O(1) lookups.
2026-05-10 03:39:30 +02:00
fegger 28c25c32ab Refactor API routes and hooks to use library clients
- Wire `api/geocode` and `api/bike-route` to use `GeocodingClient`
  and `BikeRoutingClient` instead of raw fetch calls
- Move `parseHafasJourneys` from `useJourneys` to `hafas-client`
- Remove dead code `src/lib/live-status-utils.ts`
- Update test setup to import `@testing-library/jest-dom/vitest`
2026-05-10 03:23:07 +02:00
fegger 77b8c6db98 Rewrite implementation checklist and fix runtime bugs
Update CHECKLIST.md and REWRITE_PLAN.md to reflect the current
post-rewrite status and remaining tasks.

- Add input validation to /api/hafas route to enforce request shape
  and cap results
- Fix SSR crash in useBikeRoute by using relative fetch URLs
- Wire CalendarPanel to fetch calendar events and merge them into the
  global events store
2026-05-10 03:09:38 +02:00
fegger c869d4958e Upgrade Next.js to v16 and refactor API client
Bump Next.js from v9 to v16.2.6 and add node-ical to
serverExternalPackages. Remove Geist font dependencies in favor
of system fonts. Fix state updates in geocode hooks to prevent
stale closures. Expose ApiClient methods as public and improve
error handling in fetchWithRetry.
2026-05-10 02:07:47 +02:00
fegger a7fcbd811e Refactor API clients and update project structure for TimeToLeave 2026-05-10 01:47:22 +02:00
fegger 7c345785a7 Add Docker support with multi-stage build and standalone output 2026-05-10 00:42:39 +02:00
fegger 6af44b5c13 Simplify hafas time midnight test 2026-05-10 00:14:14 +02:00
fegger 85dfeb3526 Fix midnight hour format to ensure "00" instead of "24" 2026-05-10 00:08:56 +02:00
fegger 0e451bf51e Refactor hafasDateTime to use Intl.DateTimeFormat for Vienna TZ 2026-05-09 23:57:41 +02:00
fegger 2737bac3a9 Document limitation of getTimezoneOffsetMinutes helper 2026-05-09 23:47:37 +02:00
fegger bbc0f312d8 Document ambiguous time resolution during DST fallback 2026-05-09 23:43:59 +02:00
fegger b27dd10470 Refactor HAFAS time parsing to handle DST transitions
Replace naive timezone offset calculation with a verification loop.
Try plausible offsets (CET/CEST), verify against actual offset at
candidate timestamp, and return the first match. This correctly
handles daylight saving time transitions in Vienna.
2026-05-09 23:38:13 +02:00
fegger 9d2ced4eb6 rewrite phase 10 2026-05-09 22:47:17 +02:00
fegger 3b6bb9d108 rewrite phase 9 2026-05-09 22:17:16 +02:00
fegger 556f96836c feat: Complete Phase 9 - Fix Broken Tests for geocoding, bike route, and calendar utils. Includes robust date parsing in calendar-utils and cache bypass logic for geocoding API failure. 2026-05-09 21:14:37 +02:00
fegger 2b509f58dc Complete migration checklist and update tests
Mark completed items in CHECKLIST.md. Update API tests to use
NextRequest instead of Request and fix type assertions. Add missing
imports in unit tests for calendar and countdown utils.
2026-05-09 19:26:37 +02:00
fegger 548190bc81 rewrite phase 7 2026-05-09 16:46:39 +02:00