Commit graph

12456 commits

Author SHA1 Message Date
Johannes Millan
2c740aaddf fix(sync): queue immediate upload triggers before initialization
Adds pending trigger counter to handle operations that occur before
ImmediateUploadService initialization. When triggers are called before
the service is ready, they are queued and replayed when initialization
completes. This prevents race conditions during app startup.

Changes:
- Add _pendingTriggerCount to track triggers before initialization
- Update trigger() to increment counter when not initialized
- Update initialize() to replay queued triggers after setup
- Add unit test for queue replay behavior
- Fix docker-compose.yaml to use NODE_ENV=development for tests

Fixes E2E test: 'handles server storage quota exceeded gracefully'
Also addresses production edge case where fast users might create
tasks during app load before sync service is ready.
2026-01-23 16:52:21 +01:00
Johannes Millan
0dac410c4c refactor(plugins): simplify language display in plugin overview
- Remove "only" from "English only" text
- Remove language checkmark icon
- Remove special color styling for language section
- Hide minimum version field
2026-01-23 15:52:30 +01:00
Johannes Millan
91ba8f50fa test: remove useless unit tests
Remove trivial "should create" tests and .toBeDefined() assertions
that provide no value. Preserve all meaningful tests including those
with specific value assertions and behavioral tests.

Changes:
- Remove 69 "should create/be created" tests with only toBeTruthy()
- Remove 7 trivial .toBeDefined() tests
- Remove 3 empty describe blocks
- Delete 1 empty test file
- Preserve all skipped tests (xit/xdescribe)
- Preserve tests with toBe(), toEqual(), or multiple assertions

Total: 68 files modified, 1 file deleted, ~317 lines removed
Tests reduced from 6,592 to 6,552 (40 tests removed)
All tests passing 
2026-01-23 15:39:09 +01:00
Johannes Millan
dafa04b660 fix(ui): restore 20px icon sizing in main header except sync button
- Add child combinator (>) to sync-btn selector to prevent 28px from
  affecting other icons
- Set 20px sizing for all action-nav-right icons except sync button
- Sync button main icon remains at 28px (intentionally larger)
- All other header icons (counters, add, panels) now 20px as before

Fixes #6119
2026-01-23 15:30:39 +01:00
Johannes Millan
67527373c1 feat(supersync): add beta badge to login/register screens
Add a "BETA" badge inline with the SuperSync heading to indicate
the service is in beta testing. Badge includes:
- Orange/amber styling for visibility in light mode
- Lighter orange with dark background for dark mode
- Compact, pill-shaped design consistent with existing badges
2026-01-23 15:23:16 +01:00
Johannes Millan
f7bf3e554a fix(supersync): use npx tsx instead of global install in docker monitor
Replace slow/hanging global tsx installation with npx tsx which is faster
and doesn't require installation. Falls back to npx if tsx not found.
2026-01-23 14:58:59 +01:00
Johannes Millan
d8f9b736a6 fix(sync): persist PKCE error notification until dismissed
Set snackbar duration to 0 for critical Dropbox sync setup errors,
ensuring users have adequate time to read and understand the HTTPS
requirement message (62 words) before it disappears.

This prevents users from missing important actionable guidance about
why sync setup failed, especially on mobile devices where 8-second
auto-dismiss can be easily overlooked.
2026-01-23 14:31:25 +01:00
Johannes Millan
301a8abdd7 fix(sync): improve Dropbox PKCE error handling and messaging
Dropbox Sync Improvements:
- Change PKCE alerts to thrown errors for better error handling
- Add provider ID to sync auth error logs for debugging
- Improve PKCE error message to guide users to HTTPS requirement
- Add unit tests for PKCE code generation

Testing Improvements:
- Enhance wait-for-supersync.sh to check both health and test endpoints
- Match E2E fixture behavior for more reliable test startup detection

These changes improve error diagnostics and provide clearer guidance
when WebCrypto APIs are unavailable (HTTP contexts).
2026-01-23 14:31:24 +01:00
Johannes Millan
d77acc355f feat(planner): limit initial days to 5 on mobile for better performance
- Add platform-specific initial day counts (5 mobile, 15 desktop)
- Use LayoutService.isXs() to detect mobile breakpoint
- Add responsive behavior that resets count on resize (before scroll)
- Preserve user's loaded day count after manual scroll
- Add AUTO_LOAD_INCREMENT constant for +7 days on scroll
- Add unit tests for mobile-specific behavior
2026-01-23 14:31:24 +01:00
Johannes Millan
7f8c4e0002 feat(mobile): add swipe-to-close gesture for side navigation
Adds left-to-right swipe gesture support to close the mobile side
navigation using the SwipeDirective.
2026-01-23 11:42:04 +01:00
Johannes Millan
2f29b53580 fix(mobile): account for safe area insets in dialog max-height
Update dialog max-height calculations to subtract safe area insets on
notched devices (iPhone X+, Android with notches). This prevents dialog
content from being clipped under the notch or home indicator area.

Changes:
- Standard dialogs: 90vh → calc(90vh - insets)
- Big dialogs: 95vh → calc(95vh - insets)

The env() function gracefully degrades on devices without safe areas
(returns 0px), so there's no visual change on non-notched devices.
2026-01-23 11:33:53 +01:00
Johannes Millan
7c1869da4f fix(sync): show alert for storage quota errors in immediate upload
When storage quota is exceeded during immediate upload, the error was
silently logged but no alert was shown to the user. This caused the
E2E test "handles server storage quota exceeded gracefully" to fail.

Changes:
- Import handleStorageQuotaError in ImmediateUploadService
- Call handleStorageQuotaError() in catch block before logging
- Preserves silent failure for other transient errors

The fix ensures users are immediately notified of critical storage
quota issues that require action, while maintaining retry behavior
for transient errors.

Fixes failing E2E test in supersync-network-failure.spec.ts
2026-01-23 10:22:53 +01:00
Johannes Millan
1c06b64add feat(navigation): reorder scheduler route addition in main routes 2026-01-22 22:22:17 +01:00
Johannes Millan
2c1a443bc8 test(sync): update ImmediateUploadService tests for deferred initialization
Add DataInitStateService mock and tests for constructor-based initialization.
Ensures tests verify the new timing behavior.
2026-01-22 17:35:14 +01:00
Johannes Millan
70aae24449 fix(sync): defer ImmediateUploadService initialization until data loads
Prevents race condition where upload attempts happen before sync config
is loaded from IndexedDB, eliminating 404 errors to default baseUrl
during app startup and E2E tests.
2026-01-22 17:33:17 +01:00
Johannes Millan
a8da38d840 style: enhance sync button icon visibility and positioning 2026-01-22 17:30:27 +01:00
Johannes Millan
a9b969f2f1 fix(mobile): increase dialog content max-height to 90vh on mobile
Increases max-height of mat-mdc-dialog-content from default to 90vh on
mobile viewports (≤599px) to better utilize available screen space and
reduce unnecessary scrolling in dialogs like the schedule task dialog.
2026-01-22 15:36:57 +01:00
Johannes Millan
78802af0ff feat: update wording 2026-01-22 15:36:57 +01:00
Johannes Millan
b073b482a8
Merge pull request #6106 from zzoyu/master
fix(i18n): correct mistranslation in Korean
2026-01-22 14:56:38 +01:00
Johannes Millan
e93760dfb8 refactor(tasks): simplify template conditionals with @if/@else patterns
- Convert sequential @if blocks to @if/@else for mutually exclusive conditions
- Remove redundant nested repeatCfgId check (parent already guarantees condition)
- Remove redundant nested subTasks?.length checks (parent already guarantees condition)

Improves template readability without changing behavior.
2026-01-22 13:34:54 +01:00
Johannes Millan
b46688c553 feat: update icons 2026-01-22 13:34:54 +01:00
Johannes Millan
e5ca294680 refactor(schedule): extract magic numbers to named constants
Create schedule.constants.ts and schedule-constants.scss with named
constants for viewport thresholds, breakpoints, column widths, and
scrollbar dimensions. Update components to use constants for better
maintainability and documentation.
2026-01-22 13:34:54 +01:00
Johannes Millan
527bb229ac test(sync): add integration test for entity extraction from DELETE payload
Add integration test verifying that when a remote DELETE is applied first
but a local UPDATE wins LWW conflict resolution, the entity can be
extracted from the DELETE payload and the UPDATE applied on top of it.
2026-01-22 13:34:54 +01:00
Johannes Millan
13d3f5e96b feat(mobile-bottom-nav): add active route styling for Today and Planner buttons
- Add active state CSS reusing magic side nav theme variables
- Switch to routerLinkActive directive for declarative route matching
- Remove manual currentRoute signal tracking
2026-01-22 13:34:54 +01:00
zzoyu
d46a198b1a
fix(i18n): correct mistranslation in Korean 2026-01-22 17:23:02 +09:00
Ivan Kalashnikov
ea5eb6be7d fix: import TranslatePipe in dialog share component 2026-01-22 08:35:59 +07:00
Ivan Kalashnikov
5b070a395c fix: import translation constants in dialog share component 2026-01-22 08:23:55 +07:00
Ivan Kalashnikov
0c73198a71 fix: translate close button text in share and productivity breakdown dialogs 2026-01-22 08:10:03 +07:00
Johannes Millan
0775650e6e 17.0.0-RC.13 2026-01-21 22:12:01 +01:00
Johannes Millan
86850c711a fix(sync): restore entity from DELETE payload when UPDATE wins LWW conflict
When a remote DELETE is applied before LWW resolution and the local UPDATE
wins (newer timestamp), extract the entity from the DELETE operation payload
to recreate it, preventing data loss from the race condition.
2026-01-21 21:36:26 +01:00
Johannes Millan
cfb1c656dd feat: change bottom nav order again 2026-01-21 21:19:56 +01:00
Johannes Millan
d13701e071 test(performance): add stress tests for bulk hydration and adjust timeout values 2026-01-21 21:06:19 +01:00
Johannes Millan
ff0acbdd37 fix(gitignore): correct screenshots directory path in .gitignore 2026-01-21 21:05:29 +01:00
Johannes Millan
a35331f4ff feat(schedule): restore always 7 days with horizontal scroll for week view 2026-01-21 21:00:37 +01:00
Johannes Millan
dee9faad4f fix(icons): add missing calendar icon for ICAL provider
- Created calendar.svg icon for ICAL issue provider
- Registered calendar icon in global theme service
- Updated ISSUE_PROVIDER_ICON_MAP to use 'calendar' instead of 'calendar_month'
- Fixes error: "Unable to find icon with the name :calendar_month"
2026-01-21 20:50:15 +01:00
Johannes Millan
94e1550227 fix(tasks): hide close button in bottom panel on mobile
Prevents the task close button from appearing on mobile screens (≤600px) where task details are shown in the bottom panel, improving UX by avoiding redundant UI elements.
2026-01-21 20:10:38 +01:00
Johannes Millan
054acbdf63 fix(e2e): resolve test failures and improve encryption UX
- Fix snackbar selector in supersync edge cases test
- Add polling for plugin navigation stability
- Show error snackbar and status icon on decryption failure
- All 5 failing tests now passing consistently
2026-01-21 19:53:00 +01:00
Johannes Millan
337afed482 fix(task-view-customizer): persist sort, group, and filter settings to localStorage
Resolves issue #6095 where Task View Customizer settings (sort, group, filter)
were being reset on app restart or day change.

Changes:
- Add localStorage keys for sort/group/filter settings
- Initialize signals from localStorage with default fallbacks
- Add effects to auto-persist signal changes to localStorage
- Add 7 comprehensive unit tests for persistence behavior

Settings now persist across app restarts, work context changes, and day boundaries.
Invalid localStorage data gracefully falls back to defaults.
2026-01-21 19:41:43 +01:00
Johannes Millan
4661b19f7a style(icons): change Material Icons to outlined style
Changes FILL variation setting from 1 (filled) to 0 (outlined) to render all Material Symbol icons in outlined style throughout the app.
2026-01-21 19:18:40 +01:00
johannesjo
1421151724 fix(ios): prevent keyboard from overlapping inputs
Use Capacitor's native WebView resize mode on iOS instead of CSS-based
workarounds. When keyboard appears, the WebView itself shrinks so 100vh
automatically fits above the keyboard.

- Configure iOS to use `resize: 'native'` (Android keeps `resize: 'body'`)
- Add scrollIntoViewIfNeeded() to scroll focused inputs into view
- Add proper cleanup for keyboard event listeners
- Improve flexbox shrinking in fullscreen markdown dialog
2026-01-21 17:45:14 +01:00
johannesjo
806dbc2dc3 fix(share): prevent iOS share sheet from reopening on dismiss
On iOS, dismissing the native share sheet by tapping the background
would cause it to reopen immediately. Two issues were fixed:

1. The Capacitor Share plugin on iOS throws {errorMessage: "Share canceled"}
   but the code only checked for error.name === 'AbortError'. This caused
   the cancellation to not be detected, falling through to try the Web
   Share API as a fallback, opening a second share dialog.

2. Moved the iOS share guard from component level to ShareService. The
   component-level guard didn't work because WorkContextMenuComponent is
   inside ng-template matMenuContent, so it gets destroyed when the menu
   closes, losing the guard state.
2026-01-21 17:09:57 +01:00
johannesjo
09d86d8afb fix(electron): resolve macOS app quit not responding
- Replace deprecated `selector:` properties with proper Electron `role:` in macOS menu
- Add standard macOS menu items (hide, hideOthers, unhide)
- Ensure before-close handlers always call setDone() to prevent app hanging
- Change sync error dialog from confirm() to alert() since result was ignored
2026-01-21 16:54:11 +01:00
Johannes Millan
4317e6575d perf(icons): implement lazy loading for Material Icons to reduce bundle size
Implement lazy loading for material-icons.const.ts (69.5KB, 3800+ icons) to reduce initial bundle size by ~68KB.

Changes:
- Create MaterialIconsLoaderService with promise caching to prevent concurrent loads
- Update DialogCreateTagComponent to use lazy loader service
- Update IconInputComponent to use lazy loader service
- Add comprehensive unit tests for MaterialIconsLoaderService
- Convert icon input methods to async for lazy loading support

Expected impact: Main bundle reduced by ~69KB, icons loaded on-demand when user focuses icon input fields.
2026-01-21 15:52:00 +01:00
Johannes Millan
9e1116555c refactor(icons): use drag_indicator instead of drag_handle for better visual 2026-01-21 15:51:29 +01:00
Johannes Millan
c0fbf5ddd8 fix(icons): update schedule nav icon from early_on SVG to schedule Material Symbol 2026-01-21 15:47:59 +01:00
Johannes Millan
7329c1cf1e refactor(icons): replace SVG icons with Material Symbols
Replace custom SVG icons with Material Symbols equivalents:
- play.svg → play_arrow icon
- drag-handle.svg → drag_handle icon
- early-on.svg → schedule icon
- estimate-remaining.svg → hourglass_empty icon
- calendar.svg → (unused, removed)
- keep.svg → bookmark_add icon (unpinned state)
- keep-filled.svg → bookmark icon (pinned state)
- bottom-panel-open.svg → (unused, removed)

This reduces custom SVG assets and leverages the Material Symbols font
for consistent icon rendering across the application.
2026-01-21 15:37:59 +01:00
Johannes Millan
709e688d6d feat(icons): upgrade from Material Icons to Material Symbols
- Replace legacy Material Icons (2,008 icons) with Material Symbols (3,798 icons)
- Adds missing icons reported in issue #6079: robot_2, manufacturing, cognition, cognition_2, neurology
- Update font: MaterialIcons-Regular.ttf (349KB) -> material-symbols-outlined.woff2 (456KB)
- Update icon names constant with 1,790 additional icons (+89% increase)
- Create extraction script for future icon updates
- Configure filled style to match previous appearance

Resolves #6079
2026-01-21 15:30:19 +01:00
Johannes Millan
2392ecb091 feat(schedule): make week view navigation responsive to viewport width
- Replace hardcoded 7-day navigation with responsive day counts
- Desktop (≥1200px): 7 days (full week)
- Tablet (768-1199px): 5 days
- Mobile (480-767px): 3 days
- Small mobile (<480px): 2 days
- Navigation now moves by the number of days currently shown
- Remove horizontal scroll (no longer needed with responsive day count)

This fixes the mobile navigation bug where users saw 3 days but
navigation skipped by 7 days, causing 4 days to be hidden between
each navigation action.
2026-01-21 15:30:18 +01:00
Johannes Millan
702f768784 docs: clarify test commit message convention 2026-01-21 14:34:45 +01:00
Johannes Millan
d2ab8e6482 refactor(schedule): consolidate scrollbars onto single parent element
- Move horizontal scroll control to parent .scroll-wrapper element
- Both vertical and horizontal scrollbars now on same container
- Pass isHorizontalScrollMode as input to schedule-week component
- Remove duplicate scroll wrapper from schedule-week
- Maintain responsive column widths based on scroll mode
- Fixes scrollbar positioning and coordination issues

This ensures both scrollbars are managed by the same element, providing
better UX and preventing scrollbar positioning conflicts.
2026-01-21 14:33:31 +01:00