Commit Graph

20 Commits

Author SHA1 Message Date
Dries Peeters d52266370f fix(desktop): use modern Node for Vite builds
Run desktop packaging workflows on Node 24 and load Vite through an ESM config so macOS, Linux, and Windows builds use a runtime compatible with Vite 7.
2026-04-25 17:56:33 +02:00
Dries Peeters 053dff1a01 Update 2026-04-25 17:37:24 +02:00
Dries Peeters f9fc427d80 chore(desktop): normalize renderer file modes
Keep the new React renderer sources as regular tracked files so packaging changes do not include accidental executable bits.
2026-04-25 17:34:31 +02:00
Dries Peeters e6e49dedd7 feat(desktop): rebuild renderer with React and Vite
Move the desktop app onto a Vite-powered React shell with username/password setup, diagnostics, themed core views, offline sync queueing, and tighter Electron runtime boundaries.
2026-04-25 17:34:20 +02:00
Dries Peeters bd5d4d0cc7 fix: client portal projects layout and desktop app refresh
Client portal: add min-w-0, break-words, and flex gap/shrink utilities on
the projects grid cards so long project names no longer force horizontal
overflow and clip against the viewport edge.

Desktop: add app and tray icons, adjust Electron main process (window,
tray, lifecycle), renderer connection and API client updates, build script
and package metadata, and regenerate the bundled renderer script.
2026-04-25 08:07:16 +02:00
Dries Peeters 4c427c92c0 feat(desktop): centralize connection lifecycle and expand login flow
Introduce a connection manager (state machine, listeners, offline handling,
token/server binding) with timer start/stop reconciliation helpers. Refactor
app.js to use it and extend the first-run wizard (welcome + server + token).

Add node:test coverage for the manager, timer operations, and an /api/v1/info
integration harness. Rebuild renderer bundle for packaging.

Bump desktop toolchain (electron, electron-builder, esbuild) and Python
package version to 5.3.2 in setup.py.
2026-04-24 16:17:56 +02:00
Dries Peeters eb2f5c6afa fix(apps): harden desktop and mobile server connectivity
Desktop (Electron):
- Add two-step first-run wizard: test TimeTracker via GET /api/v1/info, then log in with API token
- Replace bogus token check with validateSession (users/me, fallback to timer/status for narrow scopes)
- Normalize base URLs; classify TLS/DNS/timeout errors; periodic 401 forces re-login
- Settings save/test use public + authenticated checks; prebuild/prestart and npm test

Server:
- Exempt /api/v1/info, /api/v1/health, and POST /api/v1/auth/login from HTML setup redirect
- Include setup_required on GET /api/v1/info for unfinished installs

Mobile (Flutter):
- Validate saved token against new server URL before persisting settings change
- Remove unused lib/core/config.dart; point BUILD_CONFIGURATION at app_config.dart

Docs: DESKTOP_SETTINGS, desktop README, mobile-desktop-apps README, REST_API /info
2026-04-16 19:59:20 +02:00
Dries Peeters 19bac393b0 fix(desktop): Windows load hang and renderer helpers (#587)
The will-navigate guard compared file URL origins to the literal string
file://, but the URL API reports an opaque origin for file pages, so
legitimate file navigations were blocked and the window could fail to
load reliably on Windows.

Import utils/helpers from the renderer entry so esbuild includes
window.Helpers in the bundle, restoring formatters and isValidUrl after
build:renderer.

Documentation: desktop README explains the renderer bundle workflow;
Windows desktop troubleshooting covers stuck loading; frontend quality
gates table notes the app.js entry and rebuild step.
2026-04-15 07:56:12 +02:00
Dries Peeters daf3236c37 feat(workforce): add delete for periods, time-off, leave types, and holidays (fixes #562)
- Backend: WorkforceGovernanceService.delete_period, delete_leave_request,
  delete_leave_type, delete_holiday with permission and state checks
- Web: POST delete routes in workforce blueprint; delete buttons in dashboard
  for periods (draft/rejected), time-off (draft/submitted/cancelled), leave
  types list, and company holidays (admin only)
- API v1: DELETE endpoints for timesheet-periods, time-off/requests,
  time-off/leave-types, time-off/holidays (scopes and admin where required)
- Desktop: deleteTimesheetPeriod/deleteTimeOffRequest in API client; Delete
  buttons and handlers in workforce view with confirmation and refresh
- Mobile: deleteTimesheetPeriod/deleteTimeOffRequest in API client; Delete
  in popup menus for periods and time-off requests
- Docs: WORKFORCE_DELETE.md, PROJECT_STRUCTURE and API_TOKEN_SCOPES updates
2026-03-11 18:44:53 +01:00
Dries Peeters 3641b277f5 Update tests 2026-03-08 06:50:42 +01:00
Dries Peeters 80fde2f0c9 feat(desktop): add state module, notifications UI, and esbuild bundle
- Add state.js and ui/notifications.js; update app.js and api client
- Bundle with esbuild; update package.json dependencies
- Improve connection status and accessible notifications (aria-live/role)
2026-03-06 15:44:45 +01:00
Dries Peeters ab14e4352a feat: time entry requirements in API and timer; import skips requirements
- API: include time_entry_requirements in GET /users/me (require_task, require_description, min length)
- Timer: validate task/description requirements when starting timer; pass time_approvals_enabled and can_request_approval to view_timer; pass entry_ids_with_pending_approval to time_entries_overview
- Import: pass skip_entry_requirements=True when creating entries from CSV import
2026-02-13 20:57:54 +01:00
Dries Peeters ef19bfae7e feat(desktop): add auto-sync and sync interval settings
Persist and load auto_sync and sync_interval in settings. Disable sync interval input when auto-sync is off. Add styling for disabled inputs in settings. Preserve project filter when loading filter projects and add selectProject helper for dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-04 22:10:34 +01:00
Dries Peeters df70ac0835 Docs: update READMEs and desktop renderer
- desktop/README and docs/mobile-desktop-apps: minor updates
- desktop renderer index.html: small adjustments

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:51:21 +01:00
Dries Peeters 785f09057b build: Improve desktop Windows build script
- Inline asset preparation logic in PowerShell script
- Add better error handling and diagnostics for missing assets
- Improve icon file detection and generation guidance
- Add ASSETS_PREPARED environment variable to prevent duplicate work
- Fix path handling and output messages
- Bump desktop package version to 4.10.6
- Remove .assets_prepared build artifact from version control
2026-01-14 21:15:30 +01:00
Dries Peeters 681a4b0ec2 feat: enhance desktop app with timer status in system tray
- Add real-time timer status display in system tray tooltip
- Show elapsed time for active timers in tray
- Improve system tray menu with timer status updates
- Add IPC communication for timer status updates
- Enhance API client with better error handling
- Update desktop app styling and UI improvements
- Update README with detailed API token setup instructions
2026-01-12 20:09:04 +01:00
Dries Peeters 7195a4e43e Enhance desktop app with improved branding and features
- Update package.json version to 4.10.1 with enhanced metadata
- Add splash screen with branding
- Improve window management and preload security
- Enhance renderer styles with brand colors
- Add asset preparation tracking
- Update desktop README with comprehensive documentation
2026-01-11 20:51:07 +01:00
Dries Peeters 79200f0760 Add branding assets: logo SVGs and brand color stylesheets
- Add TimeTracker logo variants (dark, light, horizontal, icon)
- Add brand-colors.css for consistent color theming
- Include desktop app logo assets
2026-01-11 20:50:59 +01:00
Dries Peeters 7332928958 fix: add boundary checking for PDF elements and page numbers
- Add page dimension validation in PDF generators to prevent content
  from being drawn outside page boundaries
- Fix page number positioning in fallback PDF generator to ensure
  they stay within page margins
- Add boundary constraints for absolutely positioned elements in
  ReportLab template renderer
- Prevent rendering errors when elements exceed page dimensions
2026-01-11 12:15:34 +01:00
Dries Peeters 1419712a60 feat: Add mobile (Flutter) and desktop (Electron) applications
- Add Flutter mobile app with authentication, timer, projects, and time entries
- Add Electron desktop app with system tray integration and offline support
- Implement offline storage with sync queue for both platforms
- Add comprehensive build scripts for cross-platform builds
- Include documentation and README files for both apps
- Add test suites for mobile and desktop applications
2026-01-11 08:37:28 +01:00