Skip to content

Add Calendar app - #76

Closed
julieff wants to merge 5 commits into
TactilityProject:mainfrom
julieff:main
Closed

julieff wants to merge 5 commits into
TactilityProject:mainfrom
julieff:main

Conversation

@julieff

@julieff julieff commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Calendar 0.2.1

  • A for now read-only Calendar app that syncs upcoming events from a CalDAV calendar collection.

  • Settings for the calendar URL, username, and password, saved with Tactility preferences.

  • Use authenticated HTTPS CalDAV REPORT requests with certificate validation.

  • Display events for the next 30 days.

Tested only on T-DECK Plus.

Summary by CodeRabbit

  • New Features
    • Added a read-only CalDAV calendar app. Configure a calendar URL and credentials, then sync to view events for the next 30 days.
    • Calendar events are displayed in start-time order, with cancelled events excluded.
    • Added an MP3 player that scans SD-card folders, displays track information, and provides playback controls, audio-output selection, and volume adjustment.
  • Documentation
    • Added setup guidance for calendar accounts, connectivity, HTTPS certificates, and event time zones, plus music library setup and scanning.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

Adds a read-only Calendar app that stores CalDAV account settings and requests events over HTTPS. The app parses CalDAV XML and ICS data, then displays eligible events in start-time order, up to a maximum of 24. Sync requests cover the next 30 days. The app includes an agenda, sync status, and settings panel. Adds a Music Player app that scans SD-card folders for MP3 files, reads ID3 metadata, and provides playback, track selection, and audio output controls.

Merge Risk: Low · previous review 52641

The Calendar and Music Player apps are new and mostly self-contained. A failed CalDAV property response can briefly show an empty agenda. Music playback controls can occasionally ignore a Stop or pick the wrong track under rapid input. These are minor and recoverable, and worth fixing but not blocking.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add Calendar app" matches the main change. The PR adds a new read-only CalDAV Calendar app (version 0.2.1), including its CMake setup, manifest, README, settings, sync logic, and UI. The ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add Calendar app" matches the main change. The PR adds a new read-only CalDAV Calendar app (version 0.2.1), including its CMake setup, manifest, README, settings, sync logic, and UI. The title is short, specific, and free of file lists or vague terms. The PR also adds a Music Player app, which the title does not mention. That omission is expected because the title need not cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 944a1b9a-3e33-45eb-95ce-3d02d4f03e62
Commits

Reviewing files that changed from the base of the PR and between cb19c69 and f1d4475.

Files ignored due to path filters: 2

  • Apps/Calendar/icon.svg is excluded by !**/*.svg
  • Apps/Calendar/icon_mono.svg is excluded by !**/*.svg
Files selected for processing: 7

  • Apps/Calendar/CMakeLists.txt
  • Apps/Calendar/README.md
  • Apps/Calendar/main/CMakeLists.txt
  • Apps/Calendar/main/Source/CalendarApp.cpp
  • Apps/Calendar/main/Source/CalendarApp.h
  • Apps/Calendar/main/Source/main.cpp
  • Apps/Calendar/manifest.properties

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Serialize settings writes and the worker's settings reads.
Do not shift retained events a second time.
Read properties only from the VEVENT component.
Find calendar-data elements, not arbitrary text matches.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63b7ad56-c421-49a1-9f29-0ec3fb0f549d
Commits

Reviewing files that changed from the base of the PR and between f1d4475 and 526418f.

Files ignored due to path filters: 2

  • Apps/MusicPlayer/icon.svg is excluded by !**/*.svg
  • Apps/MusicPlayer/icon_mono.svg is excluded by !**/*.svg
Files selected for processing: 11

  • Apps/Calendar/main/Source/CalendarApp.cpp
  • Apps/Calendar/main/Source/CalendarApp.h
  • Apps/MusicPlayer/CMakeLists.txt
  • Apps/MusicPlayer/README.md
  • Apps/MusicPlayer/main/CMakeLists.txt
  • Apps/MusicPlayer/main/Source/MusicLibrary.cpp
  • Apps/MusicPlayer/main/Source/MusicPlayer.cpp
  • Apps/MusicPlayer/main/Source/MusicPlayer.h
  • Apps/MusicPlayer/main/Source/Playback.cpp
  • Apps/MusicPlayer/main/Source/main.cpp
  • Apps/MusicPlayer/manifest.properties

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment on lines +455 to +457
if (openEnd > nameEnd && xml[openEnd - 1] == '/') {
position = openEnd + 1;
continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Do not accept a failed property result as an empty calendar.

A 207 response can contain <c:calendar-data/> with a failed DAV:propstat status. CalDAV uses per-property status results; HTTP success alone does not establish successful data retrieval. (rfc-editor.org)

This branch skips the empty element without checking its status. The parser returns success, so calendarProcessRequests replaces the retained agenda with an empty list and reports “Synced 0 upcoming events.”

Check the enclosing status, or reject empty calendar-data for this full-calendar request. Preserve the existing agenda on failure. Keep an empty multistatus valid for a successful query with no matches.

{
std::lock_guard lock(context->outputMutex);
if (selected < context->outputNames.size()) {
context->selectedOutputName = context->outputNames[selected];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Reject output changes during active playback.

The dropdown remains enabled until the next 250 ms refresh. During that interval, this callback can select B after playback has captured A. Audio continues through A, but the volume slider controls B. Check playback activity in this callback and restore the existing selection when changes are not permitted. Allow output changes when playback is idle. (raw.githubusercontent.com)

{
std::lock_guard lock(context->tracksMutex);
if (static_cast<size_t>(currentTrack) < context->tracks.size()) {
context->selectedTrackIndex = currentTrack;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Preserve a selection until playback acknowledges it.

If Next selects B while A is stopping, this timer can replace the selection with A before the worker starts B. Another Next then requests B again instead of C. Keep the requested selection separate from the active track, or skip reconciliation while a start or stop transition remains outstanding. Continue following currentTrackIndex for automatic advancement. (raw.githubusercontent.com)

Comment on lines +296 to +297
context->stopRequested.store(false);
context->pauseRequested.store(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Synchronize command consumption with cancellation resets.

If Stop arrives after Line 283 consumes a start, these stores erase Stop and playback starts anyway. The reverse ordering also fails: musicPlayerRequestStart publishes the start before setting stopRequested, so its trailing store can cancel the newly started track.

Publish and consume the command and its cancellation state under the same controlMutex transaction. Do not clear flags that belong to a newer command.

}
}
if (nextIndex >= 0) {
musicPlayerRequestStart(context, nextIndex);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Preserve user commands when advancing automatically.

If the user presses Stop or selects another track after Line 310 checks the flags, this call replaces that action with nextIndex. Playback can restart after Stop or play the wrong track.

Queue automatic advance under controlMutex only if no newer command has arrived. Use a command generation or equivalent ownership check. Fixing the start-consumption race alone does not protect this path.

@julieff julieff closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant