Commit Graph

29 Commits

Author SHA1 Message Date
d2191094b8 docs: update README for 0.1 features and CalDAV support 2026-07-23 20:07:59 +01:00
1a69950f93 feat: CalDAV sync adapter with calendar discovery and delta sync
Add CalDAV protocol implementation: principal discovery, calendar-home-set
lookup, calendar listing, and sync-collection delta sync. CalDAVSync parses
iCalendar events from CalDAV resources and populates the sync cache.
CalDAVSyncProvider implements SyncProvider for account-level orchestration.
2026-07-23 20:01:28 +01:00
2dab5b97b6 feat: CalDAV foundation — HTTP methods and XML parser
Add PROPFIND and REPORT to HttpMethod enum for CalDAV protocol support.
Implement minimal XML parser (caldav_xml.hpp) for CalDAV response parsing:
namespaced tags, attributes, CDATA, entity references, self-closing elements.
Bounded by max depth and size to prevent allocation bombs.
2026-07-23 19:48:38 +01:00
3b73badf5d feat: RECURRENCE-ID parsing, serialization, and round-trip support
Add recurrence_id field to Event domain model. Parse and serialize
RECURRENCE-ID from/to iCalendar files. Override events (with
RECURRENCE-ID but no RRULE) are safe to rewrite. Save validation
rejects events with both RECURRENCE-ID and RRULE.
2026-07-23 18:55:31 +01:00
6c1f58ffb0 feat: recurrence rule editing in EventEditor and ordinal BYDAY support
Add recurrence_frequency, recurrence_interval, recurrence_count, and
recurrence_by_weekday editor fields. Frequency cycles with Space.
BYDAY input accepts comma-separated names and ordinal prefixes (1MO).

Extend RecurrenceRule::by_weekday from std::chrono::weekday to ByWeekday
{ordinal, day} struct. Parser accepts ordinal BYDAY (+1MO, -1FR).
Remove strict BY*/FREQ pairing constraint to match RFC 5545.
2026-07-23 18:45:50 +01:00
40fc4651cb feat: screen-reader-friendly linear view (L key)
Plain-text appointment list with numbered indicators, no box-drawing
characters, and explicit labels. Reuses agenda data and navigation.
Binds to uppercase L to preserve vim-style hjkl grid navigation.
2026-07-23 18:24:06 +01:00
a159933baa refactor: shared Unicode display-width utility with grapheme cluster support
Consolidate two inconsistent codepoint_width implementations from
Screen.cpp and EventEditor.cpp into nocal/tui/unicode.hpp. The unified
table covers all CJK, Hangul, emoji, symbol, and combining mark ranges.
display_width and fit_text handle grapheme clusters (ZWJ sequences,
skin-tone/hair modifiers, regional indicator pairs, variation selectors)
so calendar text with emoji or East Asian characters renders correctly.
2026-07-23 18:03:33 +01:00
Bernardo Magri
673a2c66c9 feat: embedded VTIMEZONE parsing, round-trip serialization 2026-07-23 16:37:22 +01:00
725e48569e feat(sync): wire TUI account orchestration, SyncProvider integration, and Ctrl+S keybinding
- MicrosoftAccountSyncProvider: implements SyncProvider interface with
  connect_account(), sync_account(), disconnect_account(), provider_id()
- TuiApp: inherits SyncObserver, implements thread-safe sync progress
  rendering, background sync thread, and Action::sync dispatch
- CLI: add "account disconnect <id>" and "account list" commands
- Main wiring: initialize sync infrastructure when connected accounts
  exist and a valid client ID is configured
- Screen: add sync_stage and sync_is_error fields to ScreenState,
  map Ctrl+S to Action::sync keybinding
- Fix ScreenState aggregate initializers in all construction sites
- Tests: new microsoft_sync_provider_tests.cpp, all 22 tests pass
2026-07-22 21:49:26 +01:00
74c798e7aa feat(sync): add Microsoft account connect CLI
nocal account connect microsoft runs the PKCE browser flow, reads /me,
upserts the deterministic account row, and persists tokens to Secret
Service as the final connected-state gate. Account IDs are hashed from
the remote subject so reconnect is idempotent, and a secret-store
failure leaves the same coherent state as a disconnect. Ships a
placeholder client ID with NOCAL_MICROSOFT_CLIENT_ID override until a
real Entra registration exists.
2026-07-21 18:44:47 +01:00
feec691535 docs: switch coder subagent to deepseek-v4-flash 2026-07-20 23:00:03 +01:00
5affa4d0cd docs: document coder subagent delegation setup 2026-07-20 22:51:28 +01:00
6d9e7b0e3e feat(tui): redesign chrome with unified key hints and help overlay
Introduce one key-hint grammar across every view: bold key, dim label,
priority-ordered hints that drop from the end instead of ellipsizing.
The month footer becomes a single split status bar with a friendly
selected date, the '?' mega-line becomes a real keyboard shortcut
panel, and the editor, agenda, search, picker, detail, and delete
frames share the same chips. Notifications carry check/warning marks.
Adds a live PTY smoke test covering view interaction and terminal
state restoration on q and Ctrl-C exits.
2026-07-20 22:51:28 +01:00
23bcb20ab5 feat(sync): add provider contracts and OAuth token broker
Draft the generic SyncProvider/SyncObserver contracts and implement
OAuthTokenBroker: valid access tokens with a five-minute refresh skew,
rotation persisted before use so a new refresh token is never lost,
400/401 refresh rejections erase the secret and surface
AccountDisconnected, and no credential material in error messages.
2026-07-20 22:50:54 +01:00
98e07e287e feat(sync): reconcile secondary Graph calendars
Read documented Graph v1 calendarView pages for secondary calendars and publish each finite window only after the complete bounded listing validates.

Add schema-v2 per-window event membership so moved-out occurrences are evicted without being mislabeled as remote tombstones, while overlapping windows retain shared instances.

Verified: 18/18 fresh normal, 18/18 -Werror, and 18/18 ASan/UBSan tests.
2026-07-18 13:05:21 +01:00
0582444c61 feat(sync): add Microsoft Graph read adapter
Add strict /me identity, atomic paged calendar discovery, and resumable primary-calendar v1 delta synchronization through the durable provider cache. Keep opaque continuations on trusted Graph URLs and retain credentials only per operation.

Document that stable Graph v1 delta covers only the primary calendar; secondary calendars still require a v1 reconciliation or beta dependency decision.

Verified: 18/18 normal, 18/18 -Werror, and 18/18 ASan/UBSan tests.
2026-07-18 12:34:21 +01:00
3560a7d23d feat: store OAuth tokens securely
Add bounded token response parsing with refresh-token retention and a cancellable worker-thread libsecret adapter using versioned credential payloads.

Verify CRUD, isolation, cancellation, corruption, unavailable service, redaction, and cleanup against an isolated D-Bus and gnome-keyring Secret Service in normal, warning-as-error, and sanitizer profiles.
2026-07-18 11:56:04 +01:00
295acbc125 feat: add Linux OAuth adapters
Add a bounded libcurl transport with verified TLS, no redirects or retries, sanitized failures, binary-safe requests, and resolved-address enforcement for cleartext loopback traffic.

Add shell-free xdg-open launching and a one-shot IPv4 loopback callback receiver with strict HTTP/query parsing, deadlines, fixed callback path, and RAII cleanup. Token parsing, Secret Service, and Graph remain follow-up phases.
2026-07-18 11:33:06 +01:00
dd6e02cb55 feat: add PKCE OAuth boundary
Introduce provider-neutral HTTP contracts and public-client authorization-code orchestration with PKCE S256, strict HTTPS and loopback validation, constant-time state checks, secure OpenSSL entropy, and single-send token exchange semantics.

Add independent protocol and adversarial suites covering RFC 7636, RFC3986 encoding, callback failures, response redaction, and no-retry behavior. Concrete networking, browser/listener, token parsing, Secret Service, and Graph integration remain separate follow-up slices.
2026-07-18 11:11:28 +01:00
787daf00dd feat: add durable provider cache
Add a private provider-neutral SQLite WAL cache with transactional migrations, retained raw payloads and tombstones, per-window opaque checkpoints, and reserved outbox/conflict tables.

Verify migrations, permissions, identity invariants, concurrent access, atomic pull-page rollback, and future-schema rejection with deterministic tests. No OAuth, networking, secrets, or Graph synchronization is included yet.
2026-07-18 10:53:41 +01:00
cfca6ab6d0 feat: support safe recurrence additions
Parse, persist, expand, and round-trip compatible RDATE values while preserving whole-series TUI behavior and conservative rewrite guards.

Verified: normal, warning-as-error, and ASan/UBSan builds pass all 9 suites; storage failure paths preserve calendar and backup bytes; live PTY restores terminal state.
2026-07-18 10:14:53 +01:00
989332ef9a feat: make month week start configurable
Add a Monday-default --week-start option for every weekday and carry it through domain layout, full and compact rendering, event query windows, print mode, and the interactive TUI.

Preserve byte-compatible Monday output and cover rotated headers, spill dates, invalid input, sanitizer behavior, and live terminal restoration.
2026-07-18 09:58:27 +01:00
b524e6e33d feat: add safe calendar import and export
Add explicit noninteractive CLI transfer modes with full event validation, idempotent duplicate handling, collision refusal, atomic import backups, and no-overwrite export creation.

Cover pure merge semantics and end-to-end rollback paths for unsupported content, invalid identities, conflicts, option combinations, and existing destinations.
2026-07-18 09:32:54 +01:00
8b6cf2e877 feat: add bounded agenda view
Add a read-only 42-day occurrence agenda with keyboard navigation, six-week paging, exact return-to-grid focus, search and calendar overlays, and bounded recurrence expansion.

Keep agenda state outside persistence, document month-only mutations, and cover empty windows, filtering, overlays, navigation, rendering, and terminal restoration.
2026-07-18 09:19:01 +01:00
590db2f488 docs(agent): require frontier-led delegation workflow
Make bounded lower-cost implementation delegation the default for feature work, while keeping architecture, integration, review, and final verification with the frontier lead.

Require explicit disclosure when cheaper-model selection is unavailable and prohibit presenting generic agents as Luna.
2026-07-18 09:04:17 +01:00
88d370bf99 feat: add calendar visibility picker
Derive session calendars from event metadata and apply one visibility contract to month rendering, appointment focus, and search without filtering persistence writes.

Add keyboard picker coverage, full-model save regression tests, documentation, warning-clean builds, sanitizer verification, and live PTY terminal restoration checks.
2026-07-18 09:01:27 +01:00
2774087d14 feat: add occurrence-aware appointment search 2026-07-18 08:31:09 +01:00
c19098004e feat: add recurrence and time zone support 2026-07-17 21:52:02 +01:00
22c6399056 feat: initialize Nocal terminal calendar 2026-07-17 21:24:06 +01:00