Commit Graph
100 Commits
Author SHA1 Message Date
Linus Rath 29a222eef4 feat: add plugin/theme disable gates and move policy controls to their admin pages
- Add `pluginsEnabled` and `themesEnabled` master feature gates to FeatureGates
- Move theme policy UI (default theme, built-in/admin theme toggles, user uploads toggle) from policy page to themes admin page
- Add plugin policy UI (plugins enabled toggle) to plugins admin page
- Remove theme policy section and plugin/theme gates from policy page (with note directing to respective pages)
- Hide Themes and Plugins settings tabs when their feature gate is disabled
- Fix dark mode visibility of all admin toggle switches (bg-white → bg-background, increase off-state track opacity)
2026-03-25 00:44:04 +01:00
Linus Rath 76b21147e4 feat: add plugin/theme harness and admin dashboard
Plugin & Theme System:
- Add plugin type definitions, permissions (30+), and validation constants
- Add IndexedDB storage layer for plugin code, theme CSS, and previews
- Add theme CSS sanitization, injection, and safety validation
- Add HookBus event system with 130+ hooks across 20 domains
- Add plugin ZIP extraction and manifest validation with JS security checks
- Add sandboxed PluginAPI factory with scoped storage, logging, and permission gating
- Add plugin loader with blob URL dynamic import and auto-disable circuit breaker
- Add 3 built-in themes (Nord, Catppuccin, Solarized)
- Add Zustand plugin store with install/uninstall/enable/disable lifecycle
- Add PluginSlot, PluginSlotRenderer, and PluginErrorBoundary components
- Add plugins and themes settings UI panels
- Integrate plugin slots into email viewer, composer, navigation rail, sidebar, and context menu
- Extend theme store with custom theme installation and activation

Admin Dashboard:
- Add admin authentication with scrypt password hashing and AES-256-GCM sessions
- Add rate-limited login (5 attempts/15min per IP)
- Add config manager with admin override > env var > default priority
- Add settings policy system with feature gates and per-setting restrictions
- Add audit logging with rotation
- Add admin API routes (login, logout, config, policy, audit, password change)
- Add admin UI pages (login, dashboard, config, policy, audit)
- Add policy store for client-side feature gate enforcement
- Wire admin password initialization into server instrumentation

Tests:
- Add 139 tests across 10 test files covering all plugin/theme modules
2026-03-25 00:44:03 +01:00
Linus Rath 2baf5e84a5 fix: enhance mailbox handling with path mapping and add tests for sieve generator #91 2026-03-23 18:04:07 +01:00
Linus Rath 0effb97691 refactor: fix bugs in calendar logic across duration parsing, RFC compliance, and event handling
- Fix buildDuration() trailing "T" producing invalid ISO 8601 durations
- Fix DURATION_RE missing week (W) support in alerts and invitation parsing
- Fix computeFireTime() end fallback when utcEnd is missing
- Fix recurrenceOverrides patch escaping per RFC 6901 (updateEvent/rsvpEvent)
- Fix layoutOverlappingEvents endMin overflow past 1440
- Fix addDurationToDate() to support weeks and use UTC methods for UTC inputs
- Fix getEffectiveAlerts() null guard on calendarIds
- Fix buildAllDayDuration() DST-safe day calculation using differenceInCalendarDays
- Fix participant matching to check calendarAddress and sendTo (not just email)
- Fix buildParticipantMap() using crypto.randomUUID() instead of hardcoded IDs
- Fix overnight preview negative endMin in week view
- Fix sendImipInvitation() to emit DURATION when utcEnd is absent
- Fix sendImipCancellation() to validate status before sending
- Fix createEvent() to remap all calendarIds for shared calendars
- Fix getCalendarTasks() to clone before mutating @type
- Fix importEvents() error matching to include 'duplicate' and 'conflict'
- Fix looksLikeReply() false positive by requiring organizer + responded attendee
- Fix alert offset regex to require T before minutes
- Fix handleDuplicate() to generate new UID
- Fix formatSnapTime() input clamping
- Replace console.log/error with debug.log/error/warn in iMIP functions
2026-03-23 16:22:15 +01:00
Linus Rath f7ee204262 feat: add support for marking emails as answered or forwarded and update UI accordingly 2026-03-23 15:45:37 +01:00
Linus Rath 0c1f182b6b fix: detect tasks created by external CalDAV clients (Thunderbird)
Tasks created in Thunderbird via CalDAV were not visible because
getCalendarTasks() used a strict @type === 'Task' check. Stalwart
may not set @type when converting VTODO from CalDAV to JMAP.

- Use case-insensitive @type matching for server variations
- Add fallback heuristic: detect tasks by presence of 'progress'
  property (exclusive to JSCalendar Task, never on Event objects)
- Normalize @type to 'Task' on detected tasks for consistent
  downstream handling
- Refresh task store on CalendarEvent state changes so tasks
  created externally appear without manual page refresh

Fixes #84
2026-03-24 14:54:37 +01:00
Linus Rath 13010c158d feat: implement path prefix handling for OAuth and login redirects 2026-03-24 14:44:42 +01:00
Linus Rath 8eff9fdfab feat: add notification settings with sound picker and preview 2026-03-22 01:55:21 +01:00
Linus Rath 30284859c7 feat: add task management features to calendar 2026-03-21 20:45:22 +01:00
Linus Rath 64c3d7e384 fix: update getContacts test to use mockFetchOnce 2026-03-21 20:45:20 +01:00
Linus Rath e6d09546b1 fix: extend CryptoEngine to support legacy algorithms and integrate with LinerEngine for decryption 2026-03-21 20:45:20 +01:00
Linus Rath 83a0a1e235 feat: add non-interactive SSO login flow for embedded/iframe deployments (closes #69) 2026-03-21 20:45:19 +01:00
Linus Rath 0d28d811a8 feat: support uploading folders via drag-and-drop and toolbar button 2026-03-21 20:45:14 +01:00
Linus Rath 2d834213ee feat: enhance certificate extraction and legacy PBE support in crypto engine 2026-03-21 02:48:12 +01:00
Linus Rath 2d56cc9be9 feat: implement keyword migration functionality and update related components 2026-03-21 01:58:48 +01:00
Linus Rath 2547c10060 feat: add demo data for emails, files, filters, identities, mailboxes, vacation responses, and JMAP client interface
- Created demo emails with various states (inbox, sent, drafts, trash, etc.) in `emails.ts`.
- Added demo file nodes representing directories and files in `files.ts`.
- Implemented demo Sieve capabilities and scripts in `filters.ts`.
- Defined demo identities for users in `identities.ts`.
- Established demo mailboxes with permissions and counts in `mailboxes.ts`.
- Created a demo vacation response in `vacation.ts`.
- Introduced a comprehensive JMAP client interface in `client-interface.ts` to standardize interactions with the JMAP API.
2026-03-21 01:38:42 +01:00
Linus Rath 616e4d018d fix: expand recurring events in CalendarEvent/query (closes #65)
Add expandRecurrences: true to CalendarEvent/query when a date range
filter is provided, so the JMAP server returns individual occurrences
of recurring events instead of only the master event.
2026-03-20 17:53:30 +01:00
Linus Rath 6cff98ddb8 feat: implement pagination for fetching contacts and add maxObjectsInGet capability 2026-03-20 16:47:27 +01:00
Linus Rath e26654a005 fix: enhance account switching logic and clear stores on account change 2026-03-20 16:29:32 +01:00
Linus Rath a009e5ae32 fix: enhance health check functionality with detailed memory diagnostics and stable liveness probe 2026-03-19 18:50:59 +01:00
Linus Rath a5c5fa6669 fix: improve mailbox role management by ensuring roles are cleared from all mailboxes when reassigning 2026-03-19 18:00:09 +01:00
Linus Rath 34e495dde3 Fix email signature rendering 2026-03-19 17:20:39 +01:00
Linus Rath 0b721661e9 Fix logout redirects and unauthenticated home rendering 2026-03-19 17:01:27 +01:00
Linus Rath 9fa851a674 feat: implement CalDAV discovery API and enhance calendar ID handling 2026-03-19 16:56:00 +01:00
Linus Rath 77514bd054 fix: RFC 9553 compliance for contacts (birthday, addresses) 2026-03-19 13:33:53 +01:00
Linus Rath d493bb17dc feat: implement account switcher component and state management
- Add AccountSwitcher component for managing user accounts with UI for switching, adding, and logging out.
- Create account state manager to handle snapshots of account-specific states for efficient switching.
- Introduce utility functions for account management, including ID generation and avatar color assignment.
- Implement Zustand store for account management, supporting addition, removal, and state retrieval of accounts.
2026-03-19 10:08:57 +01:00
Linus Rath 234129397d feat: improve error logging and enhance settings sync functionality 2026-03-19 08:54:33 +01:00
Linus Rath 9b3a47f9be feat: enhance contact management with import functionality and keyword filtering 2026-03-19 08:38:59 +01:00
Linus Rath fb8c9db716 chore: bump version to 1.4.2 2026-03-19 01:38:23 +01:00
Linus Rath af115e3245 feat: add address book directories with drag-and-drop and editor picker
- Show address books in sidebar organized by personal directories and
  shared accounts, replacing the flat shared accounts list
- Make contact list items draggable with multi-select support using
  native HTML5 drag-and-drop (application/x-contact-ids MIME type)
- Add drop targets on sidebar address book items with visual feedback
- Add moveContactToAddressBook store method supporting same-account
  updates and cross-account create+delete moves
- Add address book picker dropdown in contact create/edit form
- Update ContactCategory type from sharedAccountId to addressBookId
- Add address_books translations to all 8 locales
- Fix contact-list-item tests for new selectedContactIds prop
2026-03-19 01:13:34 +01:00
Linus Rath fc79bf4f9b fix: resolve default sender to canonical identity on local-part login
When authenticating with a local-part username (e.g. 'user' instead of
'user@domain.tld') on Stalwart 0.15.x, the default sender could resolve
to an alias identity instead of the canonical mailbox address.

- Add emailMatchesUsername() helper that matches local-part usernames
  against full email addresses (e.g. 'user' matches 'user@domain.tld')
- Prefer canonical identities (mayDelete=false) over aliases as tiebreaker
- Add preferredPrimaryId to identity store (persisted to localStorage)
  so users can explicitly set their default sender
- Add 'Set as Primary' star button in identity manager modal
- Fix sendEmail() fallback identity resolution for local-part usernames
- Add i18n strings for all 8 supported locales

Fixes #43
2026-03-18 20:05:35 +01:00
Linus Rath b844b88733 fix: enhance calendar event handling with IMIP invitation and cancellation support 2026-03-18 19:59:47 +01:00
Linus Rath bcdde9f454 fix: add support for email attachments in sendEmail functionality and update related components 2026-03-18 18:51:20 +01:00
Linus Rath ef562bcaad fix: add email export/import localization keys for multiple languages 2026-03-18 18:00:51 +01:00
Linus Rath 9fdbb62205 fix: update gender handling to use speakToAs structure and adjust localization keys 2026-03-18 17:55:29 +01:00
Linus Rath cdc521b693 fix: add time-based sorting for events in buildWeekSegments function 2026-03-18 17:02:37 +01:00
Linus Rath ff97d8bc4c feat: enhance TNEF parsing with detailed debug logging for better traceability 2026-03-18 15:00:53 +01:00
Linus Rath b1db100c3a feat: enhance email body handling by prioritizing textBody for minimal HTML and expanding JMAPClient properties 2026-03-18 14:53:08 +01:00
Linus Rath 8a2ef5a6c5 feat: integrate webcrypto-liner for legacy algorithm support in S/MIME handling 2026-03-18 14:29:29 +01:00
Linus Rath 5c933a595f feat: implement time format preference across calendar and email components 2026-03-17 21:39:59 +01:00
Linus Rath f720cb3ef8 feat: add TNEF (winmail.dat) support for email attachments and parsing 2026-03-17 21:22:43 +01:00
Linus Rath 818a02428b Merge branch 'dev' of https://github.com/bulwarkmail/webmail into dev 2026-03-17 20:54:02 +01:00
Linus Rath 6ed30059e5 Merge branch 'dev' of https://github.com/bulwarkmail/webmail into dev 2026-03-17 20:53:53 +01:00
Linus Rath a2cb2b2c86 fix: proper support for all-day events 2026-03-17 20:51:47 +01:00
Linus Rath 1f7cd61fc7 feat: implement email archiving options and reorganize functionality 2026-03-17 20:37:57 +01:00
Linus Rath 070eeeecee feat: add translation key collection utility and update test for completeness 2026-03-17 20:20:44 +01:00
Linus Rath de35d1d8e8 feat: add S/MIME store for managing key records and public certificates
- Implemented Zustand store for S/MIME functionality, including state management for key records and public certificates.
- Added methods for importing PKCS#12 files and public certificates, binding identities to keys, and managing unlocked keys.
- Introduced session storage for remembering unlocked keys across sessions.
- Enhanced error handling and loading states during data operations.
2026-03-17 20:14:01 +01:00
Linus Rath 7c5785e9e8 feat: enhance branding options with custom favicon and logos in configuration 2026-03-17 15:25:06 +01:00
Linus Rath 0f5d030d5f feat: calendar invitations RSVP, trust assessment, file preview 2026-03-16 22:00:11 +01:00
Linus Rath cde1d61d02 fix: correct all-day multi-day event rendering 2026-03-16 17:57:56 +01:00