Skip to content

Feature: Notification Window with JavaFX - #4069

Merged
infeo merged 29 commits into
feature/files-in-usefrom
feature/notify-fallback
Dec 12, 2025
Merged

infeo merged 29 commits into
feature/files-in-usefrom
feature/notify-fallback

Conversation

@infeo

@infeo infeo commented Dec 5, 2025 •

Copy link
Copy Markdown
Member

This PR adds a Notification window (and mechanism) to Cryptomator.

The mechanism currently only supports events inside the cryptographic filesystem of a vault.

General logic

After vault unlock, events can be received. For every event, the NotificationManager tries to add the event to its internal queue. The event is added, if

  • the event triggers a notification
  • it is not already added within the last 5 seconds

In a regular interval, the internal queue of the NotificationManager is added to an ObservableList inside the FxNotificationRadar. If the observable list is not empty, the notification window is opened, displaying all available notifications in a seperate window.

Notification window

The notification window is an always-on-top, undecorated, not movable or resizable window with 4 main elements:

  • a notification title
  • a notification message
  • an optional action button: On click removes the current notification and performs an action
  • a pager-element to switch the notification

Current images:
image
image

The window placement is for

  • macOS: Right-top-corner
  • or depndent on the system bar:
    • top system bar: middle-top
    • otherwise: right bottom

The window is closed with either the OS-specifc close shortcut, a close button or the list of notifications is empty.

Signed-off-by: Armin Schrenk <[email protected]>
Signed-off-by: Armin Schrenk <[email protected]>
Signed-off-by: Armin Schrenk <[email protected]>
and reduce css

Signed-off-by: Armin Schrenk <[email protected]>
Signed-off-by: Armin Schrenk <[email protected]>
Signed-off-by: Armin Schrenk <[email protected]>
Signed-off-by: Armin Schrenk <[email protected]>
@infeo infeo added this to the next milestone Dec 5, 2025
@infeo infeo self-assigned this Dec 5, 2025
@coderabbitai

coderabbitai Bot commented Dec 5, 2025 •

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a notification subsystem and UI: NotificationManager (debounce + queue) and FxNotificationManager (UI poller), NotificationComponent/Module/Controller/FXML/CSS, NotificationScoped and NotificationWindow DI annotations, and SystemBarUtil for OS-aware placement. Wires notifications into Vault, FxApplication, and FxApplicationWindows. Removes EventMap and simplifies VaultEvent to two fields. Also updates module-info.java (SSLContextProvider entries) and adds small UI enum/icon/resource changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • NotificationManager: cache/debounce semantics, concurrency and computeIfAbsent use, and queue draining correctness
    • Vault constructor change: all injection sites and tests that construct Vault must be updated
    • VaultEvent simplification and removal of count/Comparable: callers relying on count/ordering
    • Removal of EventMap: search for remaining usages and impact on event aggregation semantics
    • FxNotificationManager / FxApplication / FxApplicationWindows: scheduling, Platform.runLater usage, lifecycle and executor shutdown implications
    • NotificationModule/NotificationComponent/NotificationController/FXML/CSS: DI bindings, controller-scene contract, and stage placement logic (SystemBarUtil)
    • module-info.java: SPI provides clause correctness and platform-specific SSL providers

Possibly related PRs

Suggested labels

misc:gui

Suggested reviewers

  • overheadhunter

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main feature added: a notification window UI component for JavaFX in Cryptomator.
Description check ✅ Passed The description is directly related to the changeset, explaining the notification mechanism, window behavior, placement logic, and UI elements being added throughout the PR.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/notify-fallback

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bebe306 and 5e582f6.

📒 Files selected for processing (2)
  • src/main/resources/fxml/notification.fxml (1 hunks)
  • src/main/resources/i18n/strings.properties (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test
🔇 Additional comments (3)
src/main/resources/i18n/strings.properties (1)

16-16: LGTM!

The new button label is correctly placed alphabetically between "done" and "next", properly formatted, and semantically appropriate for the notification window's pager control.

src/main/resources/fxml/notification.fxml (2)

14-18: Controller properties and resource paths are correctly configured.

All properties referenced in the FXML (singleEvent, paging, message, vaultName, description, actionText) are present in NotificationController with proper property accessor methods. All event handler methods (previousNotification(), nextNotification(), close(), processSelectedEvent()) are correctly annotated with @FXML. The image resource exists at src/main/resources/img/logo64.png.


31-47: Fix invalid property binding on line 64: actionText.empty does not exist.

The binding ${!controller.actionText.empty} on line 64 is invalid. StringProperty does not have an empty property. Use one of the following approaches:

  1. Expose a BooleanProperty method in NotificationController (e.g., actionTextEmptyProperty()) that wraps Bindings.createBooleanBinding(() -> actionText.isEmpty(),...)
  2. Or update the binding to use a getter method that returns a BooleanBinding
  3. Alternatively, handle this in the controller's initialize() method and bind the button's visibility property directly

This will prevent binding failures at runtime when the notification is displayed.

⛔ Skipped due to learnings
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@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: 6

🧹 Nitpick comments (6)
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (1)

92-92: Address the TODO comment.

The TODO indicates that NotificationListener initialization is not yet implemented. Please ensure this is tracked and completed to fully integrate the notification system introduced in this PR.

Do you want me to open a new issue to track this task, or would you like assistance implementing the NotificationListener initialization?

src/main/java/org/cryptomator/ui/notification/NotificationComponent.java (1)

21-28: Minor inefficiency: window() called twice.

The window() method is invoked twice—once for assignment and once implicitly in the return. Consider caching the result to avoid potential redundant instantiation (though Dagger scoping likely handles this).

 default Stage showNotification() {
     var window = window();
     window.setScene(scene().get());
     window.sizeToScene();
     window.show();
     window.requestFocus();
-    return window;
+    return window;
 }

The current code is functionally correct given @NotificationScoped ensures a single instance per component. No change needed.

src/main/resources/fxml/notification.fxml (1)

38-38: Remove commented-out code.

This commented-out Label element appears to be leftover from development. Consider removing it to keep the FXML clean.

 <center>
     <VBox spacing="12">
-        <!--Label text="${controller.message}" styleClass="label-large" wrapText="true"/-->
         <Label text="${controller.description}" styleClass="label" wrapText="true"/>
     </VBox>
 </center>
src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java (1)

36-46: Address TODO and consider rescheduling.

The TODO on line 37 indicates incomplete documentation. Additionally, if continuous monitoring is desired, the method should reschedule itself after completing the check.

Would you like me to help complete the documentation and implement continuous polling?

src/main/java/org/cryptomator/event/NotificationManager.java (1)

32-33: Consider making fields private.

These fields have package-private visibility. For encapsulation, mark them private unless there's a specific reason for package access.

-Cache<Path, FilesystemEvent> eventCache;
-Queue<FilesystemEvent> eventsRequiringNotification;
+private final Cache<Path, FilesystemEvent> eventCache;
+private final Queue<FilesystemEvent> eventsRequiringNotification;
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

57-65: Reminder: Complete translations and event-specific messaging.

The TODO on line 57 and the placeholder default case need to be addressed before release. The current default message asks users to report a bug, which is appropriate for unexpected states.

Would you like help implementing specific message cases for different FilesystemEvent types?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7fe9049 and 8e9a001.

📒 Files selected for processing (18)
  • src/main/java/module-info.java (1 hunks)
  • src/main/java/org/cryptomator/common/EventMap.java (0 hunks)
  • src/main/java/org/cryptomator/event/NotificationManager.java (1 hunks)
  • src/main/java/org/cryptomator/ui/common/FxmlFile.java (1 hunks)
  • src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java (1 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (1 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java (2 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java (6 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java (1 hunks)
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java (3 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationComponent.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationScoped.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationWindow.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotifyAction.java (1 hunks)
  • src/main/resources/css/light_theme.css (1 hunks)
  • src/main/resources/fxml/notification.fxml (1 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/org/cryptomator/common/EventMap.java
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java
  • src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-11-21T16:31:37.834Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java:85-97
Timestamp: 2024-11-21T16:31:37.834Z
Learning: In `VaultListContextMenuController.didClickRemoveVault`, adding error handling and additional safety measures around vault removal is considered out of scope for this PR.

Applied to files:

  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-11-24T16:47:01.698Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:0-0
Timestamp: 2024-11-24T16:47:01.698Z
Learning: In Cryptomator, avoid adding unnecessary complexity to error handling in UI controllers unless it's critical.

Applied to files:

  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-12-11T13:52:42.201Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:27-45
Timestamp: 2024-12-11T13:52:42.201Z
Learning: In the Cryptomator project, parameter validation is performed in the `SimpleDialog` builder, so it's unnecessary to duplicate validation in controller classes like `SimpleDialogController`.

Applied to files:

  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2025-03-21T15:58:30.027Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3780
File: src/main/java/org/cryptomator/ui/eventview/EventListCellController.java:113-128
Timestamp: 2025-03-21T15:58:30.027Z
Learning: In Cryptomator's event system, entries are removed directly from the model (FileSystemEventAggregator) and then automatically synced to the view (FxFSEventList) with a potential delay of up to one second. This follows a model-view pattern where verification of removal is handled by the synchronization mechanism rather than explicit logging.

Applied to files:

  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java
  • src/main/java/org/cryptomator/event/NotificationManager.java
📚 Learning: 2025-01-17T12:01:11.981Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3675
File: src/main/java/org/cryptomator/networking/SSLContextWithPKCS12TrustStore.java:21-21
Timestamp: 2025-01-17T12:01:11.981Z
Learning: In the Linux implementation of SSLContextProvider, the PKCS12 trust store file path is configured using the property "cryptomator.networking.truststore.p12Path".

Applied to files:

  • src/main/java/module-info.java
📚 Learning: 2025-01-09T12:32:51.042Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3675
File: src/main/java/org/cryptomator/launcher/Cryptomator.java:124-131
Timestamp: 2025-01-09T12:32:51.042Z
Learning: In Cryptomator's SSL context configuration, fallback mechanism is not necessary since we're only changing the default SSLContext. If loading fails, the former default SSLContext remains usable.

Applied to files:

  • src/main/java/module-info.java
📚 Learning: 2025-01-09T12:32:51.042Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3675
File: src/main/java/org/cryptomator/launcher/Cryptomator.java:124-131
Timestamp: 2025-01-09T12:32:51.042Z
Learning: Priority is not used for SSLContextProvider service in Cryptomator, making the use of findFirst() appropriate for provider selection.

Applied to files:

  • src/main/java/module-info.java
📚 Learning: 2024-10-10T15:37:28.895Z
Learnt from: JaniruTEC
Repo: cryptomator/cryptomator PR: 3270
File: src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java:21-21
Timestamp: 2024-10-10T15:37:28.895Z
Learning: The `LocationPresetsProvider.resolveLocation` method in the Cryptomator project handles the expansion of the tilde `~` to the user's home directory.

Applied to files:

  • src/main/java/module-info.java
📚 Learning: 2025-11-08T09:11:39.167Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3948
File: src/main/java/module-info.java:2-2
Timestamp: 2025-11-08T09:11:39.167Z
Learning: In the Cryptomator project's module structure, the `UpdateMechanism` service from `org.cryptomator.integrations.update` is loaded by the integrations library modules (e.g., integrations-api or platform-specific modules like integrations-linux), not by the desktop module. The desktop module imports `UpdateMechanism` for type references only, so no `uses` declaration is needed in `org.cryptomator.desktop`'s module-info.java.

Applied to files:

  • src/main/java/module-info.java
🧬 Code graph analysis (3)
src/main/java/org/cryptomator/ui/notification/NotificationScoped.java (1)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)
  • NotificationScoped (24-156)
src/main/java/org/cryptomator/ui/notification/NotificationComponent.java (1)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)
  • NotificationScoped (24-156)
src/main/java/org/cryptomator/ui/notification/NotificationModule.java (2)
src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java (1)
  • Module (30-83)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)
  • NotificationScoped (24-156)
🪛 Biome (2.1.2)
src/main/resources/css/light_theme.css

[error] 1196-1196: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1197-1197: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1198-1198: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1199-1199: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1200-1200: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1201-1201: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1202-1202: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1202-1202: Unexpected unknown function: dropshadow

Use a known function instead.
See MDN web docs for more details.

(lint/correctness/noUnknownFunction)


[error] 1206-1206: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1210-1210: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1211-1211: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1212-1212: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1216-1216: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1217-1217: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1220-1220: Unexpected unknown pseudo-class pressed

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 1221-1221: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1225-1225: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1226-1226: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1229-1229: Unexpected unknown pseudo-class pressed

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 1230-1230: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1234-1234: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1235-1235: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1236-1236: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1240-1240: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1241-1241: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1244-1244: Unexpected unknown pseudo-class pressed

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 1245-1245: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (15)
src/main/java/module-info.java (1)

18-21: SSLContextProvider service wiring looks correct; please verify selection behavior with multiple providers

The new imports plus the uses SSLContextProvider; and provides SSLContextProvider with SSLContextWithWindowsCertStore, SSLContextWithMacKeychain, SSLContextWithPKCS12TrustStore; declarations are consistent and should make all three implementations visible to the ServiceLoader from this module.

Given earlier decisions to select the SSLContextProvider via ServiceLoader.load(SSLContextProvider.class)…findFirst() without an explicit priority mechanism, the order in the provides clause will effectively define which implementation is tried first. With three providers in one module, this could mean that on some platforms the PKCS12‑based provider is never reached if the first one is present but not actually usable there.

Please double‑check that the selection logic either:

  • filters by an isSupported()/similar flag before calling findFirst(), or
  • otherwise guarantees that the intended provider for each platform (e.g., PKCS12 on Linux) is the one actually chosen.

Also, the new uses org.cryptomator.event.NotificationHandler; declaration is structurally fine; just ensure there is at least one corresponding provides declaration in the module graph for the notification feature to function as expected.

Also applies to: 61-67

src/main/java/org/cryptomator/ui/notification/NotifyAction.java (1)

1-3: LGTM!

The record provides a clean, immutable data holder for pairing action labels with their executable callbacks, following Java best practices for simple data structures.

src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java (1)

16-16: LGTM!

The NotificationComponent is properly wired into the DI module following the established subcomponent pattern.

Also applies to: 43-44

src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java (1)

142-142: LGTM!

The formatting changes improve code conciseness while preserving the existing logic and behavior.

Also applies to: 158-159

src/main/java/org/cryptomator/ui/common/FxmlFile.java (1)

60-61: LGTM!

The NOTIFICATION enum constant is properly added following the established pattern, with correct punctuation for the enum declaration.

src/main/resources/css/light_theme.css (1)

1189-1246: LGTM! (Note: Static analysis warnings are false positives)

The notification window styling is well-structured and follows the established patterns in this theme file. The static analysis tool (Biome) is flagging JavaFX-specific CSS properties and pseudo-classes as errors because it's a web CSS linter. All flagged items are valid JavaFX CSS:

  • Properties prefixed with -fx- are JavaFX-specific and valid
  • The :pressed pseudo-class is a valid JavaFX pseudo-class
  • The dropshadow() function is a valid JavaFX CSS effect function
src/main/java/org/cryptomator/ui/notification/NotificationWindow.java (1)

1-12: LGTM!

The qualifier annotation follows the standard JSR-330/Dagger pattern and will properly distinguish the notification window Stage in dependency injection.

src/main/java/org/cryptomator/ui/notification/NotificationScoped.java (1)

1-11: LGTM!

The scope annotation follows the standard JSR-330/Dagger pattern and will properly manage the lifecycle of notification-scoped components.

src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java (1)

15-16: LGTM!

The new CHEVRON_LEFT and CHEVRON_RIGHT enum constants are correctly added in alphabetical order with valid Font Awesome 5 unicode values.

src/main/java/org/cryptomator/ui/notification/NotificationComponent.java (1)

11-35: LGTM!

The subcomponent follows the established Dagger pattern used elsewhere in the codebase. The factory interface and default showNotification() method provide clean integration with FxApplicationWindows.

src/main/resources/fxml/notification.fxml (1)

1-61: LGTM!

The FXML layout is well-structured with proper bindings to the controller. The use of managed="${controller.buttonVisible}" alongside visible correctly handles layout space when the button is hidden.

src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java (1)

200-202: LGTM!

The showNotification() method follows the established async pattern used by other window-showing methods like showEventViewer(). Error handling via reportErrors is consistent with the codebase conventions.

src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java (1)

32-34: Single-shot polling may not continuously monitor notifications.

schedulePollForUpdates() schedules a one-time check after 1000ms. If the intent is continuous polling (as suggested by the name "schedulePollForUpdates"), consider using scheduleAtFixedRate or re-scheduling after each check.

Is single-shot polling intentional? If continuous polling is needed:

 public void schedulePollForUpdates() {
-    scheduler.schedule(this::checkForPendingNotifications, 1000, TimeUnit.MILLISECONDS);
+    scheduler.scheduleAtFixedRate(this::checkForPendingNotifications, 1000, 1000, TimeUnit.MILLISECONDS);
 }

Alternatively, re-schedule at the end of checkForPendingNotifications() if you want polling to continue only while there are active vaults.

src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1)

28-40: LGTM on Stage configuration.

The transparent, always-on-top, non-resizable stage with Modality.NONE is appropriate for a notification window. The onShown handler for positioning after the window has dimensions is the correct approach.

src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

52-55: Potential IndexOutOfBoundsException in initialize() if list is empty.

If notificationsProp is empty when initialize() is called, notificationsProp.get(0) will throw.

Add a guard:

 @FXML
 public void initialize() {
-    selectedEvent.setValue(notificationsProp.get(selectionIndex.get()));
+    if (!notificationsProp.isEmpty()) {
+        selectedEvent.setValue(notificationsProp.get(selectionIndex.get()));
+    }
 }
⛔ Skipped due to learnings
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

infeo added 2 commits December 5, 2025 11:23
Signed-off-by: Armin Schrenk <[email protected]>
@overheadhunter

Copy link
Copy Markdown
Member

The window placement depends on the OS:

  • Windows: Right-bottom-corner

shouldn't this depend on the position of the tray bar? can't this be moved to any side?

@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: 2

♻️ Duplicate comments (5)
src/main/java/org/cryptomator/event/NotificationManager.java (3)

22-25: Malformed HTML in Javadoc.

The list markup is inverted as noted in a previous review. <ul> should contain <li> items, not the other way around.


42-53: Potential race condition between cache check and queue addition.

The cache check (isRecent) and queue addition are not atomic as noted in a previous review. Two threads could simultaneously check the cache for the same event and both add to the queue.


43-44: Confusing method/variable naming: isRecent returns true when event is NOT recent.

As noted in a previous review, the method isRecent returns true when the event is newly added to the cache (not recently seen), which contradicts the name. The variable notRecentlyAdded adds to the confusion.

Also applies to: 55-58

src/main/java/org/cryptomator/ui/notification/NotificationController.java (2)

44-44: Potential IndexOutOfBoundsException if list becomes empty.

As noted in a previous review, the listener on selectionIndex accesses notificationsProp.get(n.intValue()) without bounds checking. If the list is cleared while the listener is active, this will throw.


141-147: Inverted visibility logic will hide the button when it should be shown.

As noted in a previous review, buttonVisibleProperty() returns actionText.isEmpty(), which is true when actionText is null/empty. The button will be visible when there's no action text—opposite of the intended behavior. Additionally, isButtonVisible() uses different logic, causing inconsistency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e9a001 and 83199eb.

📒 Files selected for processing (7)
  • src/main/java/org/cryptomator/common/vaults/Vault.java (5 hunks)
  • src/main/java/org/cryptomator/event/NotificationManager.java (1 hunks)
  • src/main/java/org/cryptomator/event/VaultEvent.java (1 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java (5 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java (1 hunks)
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java (3 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3780
File: src/main/java/org/cryptomator/ui/eventview/EventListCellController.java:113-128
Timestamp: 2025-03-21T15:58:30.027Z
Learning: In Cryptomator's event system, entries are removed directly from the model (FileSystemEventAggregator) and then automatically synced to the view (FxFSEventList) with a potential delay of up to one second. This follows a model-view pattern where verification of removal is handled by the synchronization mechanism rather than explicit logging.
📚 Learning: 2025-01-09T12:33:23.183Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3675
File: src/main/java/org/cryptomator/common/integrations/IntegrationsLoaderCopy.java:65-73
Timestamp: 2025-01-09T12:33:23.183Z
Learning: The `IntegrationsLoaderCopy` class in `org.cryptomator.common.integrations` package is a temporary solution for module visibility problems and will be removed soon. No improvements or refactoring should be suggested for this class.

Applied to files:

  • src/main/java/org/cryptomator/common/vaults/Vault.java
📚 Learning: 2024-11-24T16:47:01.698Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:0-0
Timestamp: 2024-11-24T16:47:01.698Z
Learning: In Cryptomator, avoid adding unnecessary complexity to error handling in UI controllers unless it's critical.

Applied to files:

  • src/main/java/org/cryptomator/common/vaults/Vault.java
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-07-17T10:12:26.832Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3494
File: src/main/java/org/cryptomator/common/settings/SettingsProvider.java:50-50
Timestamp: 2024-07-17T10:12:26.832Z
Learning: The constructor of the `SettingsProvider` class in the Cryptomator project is marked with the `Inject` annotation, indicating that it is managed by a dependency injection framework and not called directly in written code.

Applied to files:

  • src/main/java/org/cryptomator/common/vaults/Vault.java
📚 Learning: 2025-03-21T15:58:30.027Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3780
File: src/main/java/org/cryptomator/ui/eventview/EventListCellController.java:113-128
Timestamp: 2025-03-21T15:58:30.027Z
Learning: In Cryptomator's event system, entries are removed directly from the model (FileSystemEventAggregator) and then automatically synced to the view (FxFSEventList) with a potential delay of up to one second. This follows a model-view pattern where verification of removal is handled by the synchronization mechanism rather than explicit logging.

Applied to files:

  • src/main/java/org/cryptomator/common/vaults/Vault.java
  • src/main/java/org/cryptomator/event/VaultEvent.java
  • src/main/java/org/cryptomator/event/NotificationManager.java
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
📚 Learning: 2024-12-11T13:52:42.201Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:27-45
Timestamp: 2024-12-11T13:52:42.201Z
Learning: In the Cryptomator project, parameter validation is performed in the `SimpleDialog` builder, so it's unnecessary to duplicate validation in controller classes like `SimpleDialogController`.

Applied to files:

  • src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test
🔇 Additional comments (4)
src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java (1)

19-19: LGTM! Formatting improvements.

The import reordering and formatting adjustments improve readability without altering behavior.

Also applies to: 142-144, 160-165

src/main/java/org/cryptomator/common/vaults/Vault.java (1)

26-26: LGTM! Notification integration is correct.

The Vault now forwards filesystem events to the NotificationManager in addition to the existing FileSystemEventAggregator, enabling the notification feature while preserving existing behavior.

Also applies to: 82-82, 95-96, 115-115, 269-269

src/main/java/org/cryptomator/event/VaultEvent.java (1)

6-8: LGTM! API simplification is cleaner.

The VaultEvent record has been simplified from a three-field comparable type to a two-field data holder. Event deduplication/debouncing is now handled by NotificationManager's cache-based mechanism, which is a cleaner separation of concerns.

src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java (1)

32-34: Clarify the one-shot scheduling design.

The method schedulePollForUpdates() schedules a single check after 1000ms but does not reschedule itself. Despite the class name "Radar" and method name "poll" suggesting continuous monitoring, the implementation executes only once (called from FxApplication.start()). The callback checkForPendingNotifications() does not reinvoke schedulePollForUpdates(), unlike the similar pattern in FxFSEventList.checkForEventUpdates() which does implement recurring polls. Clarify whether one-shot behavior is intentional; if so, rename to scheduleNotificationCheck() for accuracy.

Likely an incorrect or invalid review comment.

infeo added 2 commits December 5, 2025 11:53
Signed-off-by: Armin Schrenk <[email protected]>
@infeo

infeo commented Dec 5, 2025

Copy link
Copy Markdown
Member Author

shouldn't this depend on the position of the tray bar? can't this be moved to any side?

@overheadhunter i did not find a way to detect the tray-menu location. We can also choose a simpler approach and show the notification always on the same spot, os-independent.

@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

♻️ Duplicate comments (2)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (2)

141-147: Make button visibility logic consistent and ignore empty text.

buttonVisibleProperty() and isButtonVisible() use slightly different semantics:

  • Line 142: buttonVisibleProperty() returns actionText.isEmpty().not(), i.e. visible when non-empty.
  • Line 146: isButtonVisible() returns actionText.get() != null, which is also true for an empty string.

This mismatch can cause subtle differences between FXML-bound visibility and programmatic checks, especially if actionText is ever set to "". A previous review comment already pointed out this inconsistency.

Consider unifying the two, e.g.:

 public ObservableBooleanValue buttonVisibleProperty() {
-    return actionText.isEmpty().not();
+    return actionText.isEmpty().not();
 }

 public boolean isButtonVisible() {
-    return actionText.get() != null;
+    var text = actionText.get();
+    return text != null && !text.isEmpty();
 }

or simply delegate isButtonVisible() to buttonVisibleProperty().get() so there is exactly one source of truth.


41-46: Guard against invalid indices when dereferencing notificationsProp.

The code assumes that selectionIndex always points to a valid element in notificationsProp, but several places dereference without any bounds checks:

  • Line 44: notificationsProp.get(n.intValue()) in the selectionIndex listener.
  • Line 55: notificationsProp.get(selectionIndex.get()) in initialize().
  • Lines 103–105: nextNotification() can move selectionIndex while notificationsProp might be empty in edge cases.

If the list is ever empty (or shrinks concurrently with index changes), these get(...) calls can throw IndexOutOfBoundsException. Earlier review comments on this file already highlighted the same risk.

Consider defensively checking that the index is within [0, notificationsProp.size()) before calling get, and either skipping the update or clearing selectedEvent when out of range. If you decide to rely on the invariant “window is only ever created with a non-empty list and only this controller mutates it,” it’s still worth documenting that invariant near the constructor/initialize to justify the unchecked access.

Also applies to: 53-56, 93-106

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83199eb and 2c456f5.

📒 Files selected for processing (4)
  • src/main/java/org/cryptomator/common/vaults/Vault.java (5 hunks)
  • src/main/java/org/cryptomator/event/NotificationManager.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/java/org/cryptomator/common/vaults/Vault.java
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2025-03-21T15:58:30.027Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3780
File: src/main/java/org/cryptomator/ui/eventview/EventListCellController.java:113-128
Timestamp: 2025-03-21T15:58:30.027Z
Learning: In Cryptomator's event system, entries are removed directly from the model (FileSystemEventAggregator) and then automatically synced to the view (FxFSEventList) with a potential delay of up to one second. This follows a model-view pattern where verification of removal is handled by the synchronization mechanism rather than explicit logging.

Applied to files:

  • src/main/java/org/cryptomator/event/NotificationManager.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test
🔇 Additional comments (3)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

69-91: Clarify behavior when the notification action fails.

handleButtonAction() always removes the current notification in the finally block, even if executing the action (once implemented) throws an exception. This means failed actions will still drop the notification with no chance to retry.

If the intent is “fire-and-forget, at-most-once UI hint,” this is fine; otherwise, consider:

  • Catching exceptions around the action and keeping the event in the list if the action fails, or
  • Logging/reporting failures so they aren’t silently swallowed while still removing the event.

Right now the TODO indicates this path is unfinished, so it may be worth deciding the desired semantics before wiring the executor.

src/main/java/org/cryptomator/event/NotificationManager.java (2)

71-77: Concurrency pattern in cloneTo looks reasonable with current addEvent sync.

cloneTo(...) synchronizes on this while bulk‑copying and clearing eventsRequiringNotification. Because addEvent(...) enqueues under the same synchronized (this) block, the combination effectively acts as a “drain queue atomically into target” operation without losing or duplicating events.

Given that eventsRequiringNotification is already a ConcurrentLinkedQueue, this is slightly redundant but acceptable, and the explicit monitor helps enforce the drain‑and‑clear atomicity.

No changes strictly required here; just ensure any future refactors to addEvent (e.g., removing its synchronized block) keep this contract in mind.


8-9: DI imports are intentionally mixed to support Dagger's compatibility layer.

The codebase uses javax.inject.* imports throughout, and module-info.java explicitly requires both jakarta.inject and static javax.inject. This is intentional—Dagger 2.57.2 (the project's DI framework) supports both the legacy javax.inject standard and the newer jakarta.inject standard. The project compiles and runs successfully with this configuration, so no changes are needed.

Likely an incorrect or invalid review comment.

@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: 0

♻️ Duplicate comments (1)
src/main/java/org/cryptomator/event/NotificationManager.java (1)

41-53: offer(...) currently never accepts events, so notifications will never be produced

Right now the switch expression always falls through to default -> false, with the only concrete case left as a commented “example”. That means no FilesystemEvent will ever be enqueued and the whole notification pipeline remains effectively disabled despite the Javadoc claiming eligible events are accepted.

Before merging, either:

  • wire at least one real FilesystemEvent subtype through to addEvent(...), or
  • explicitly document/annotate offer as a stub if the feature is intentionally dormant in this PR.
🧹 Nitpick comments (2)
src/main/java/org/cryptomator/event/NotificationManager.java (2)

55-80: Concurrency & deduplication logic looks correct; queue type/synchronization could be simplified

The combination of:

  • computeIfAbsent on the Caffeine asMap() and
  • enqueuing under synchronized (this) with a shared lock used in cloneTo(...)

gives you an atomic “check‑dedupe‑and‑enqueue” behavior and avoids the earlier race condition; addEvent correctly returns true only when a new event was added.

Given that both addEvent and cloneTo operate under the same intrinsic lock, you’re effectively serializing all access to eventsRequiringNotification. In that setup, using ConcurrentLinkedQueue is a bit redundant; a plain Queue<VaultEvent> (e.g. ArrayDeque) behind the same lock would suffice and make the locking model simpler, or you could move to a purely lock‑free pattern with the concurrent queue and a different cloneTo implementation. Not urgent, just something to consider.


30-39: Consider making internal state private final for stronger encapsulation

eventCache and eventsRequiringNotification are currently package‑visible and non‑final, even though they are only set in the constructor and treated as internal implementation details.

Making them private final would better express their immutability and prevent accidental external access or reassignment:

-	Cache<FSEventBucket, FilesystemEvent> eventCache;
-	ConcurrentLinkedQueue<VaultEvent> eventsRequiringNotification;
+	private final Cache<FSEventBucket, FilesystemEvent> eventCache;
+	private final ConcurrentLinkedQueue<VaultEvent> eventsRequiringNotification;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c456f5 and 3135be9.

📒 Files selected for processing (1)
  • src/main/java/org/cryptomator/event/NotificationManager.java (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2025-03-21T15:58:30.027Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3780
File: src/main/java/org/cryptomator/ui/eventview/EventListCellController.java:113-128
Timestamp: 2025-03-21T15:58:30.027Z
Learning: In Cryptomator's event system, entries are removed directly from the model (FileSystemEventAggregator) and then automatically synced to the view (FxFSEventList) with a potential delay of up to one second. This follows a model-view pattern where verification of removal is handled by the synchronization mechanism rather than explicit logging.

Applied to files:

  • src/main/java/org/cryptomator/event/NotificationManager.java
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/event/NotificationManager.java
📚 Learning: 2024-07-27T13:14:40.963Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.

Applied to files:

  • src/main/java/org/cryptomator/event/NotificationManager.java

@overheadhunter

overheadhunter commented Dec 5, 2025 •

Copy link
Copy Markdown
Member

@overheadhunter i did not find a way to detect the tray-menu location. We can also choose a simpler approach and show the notification always on the same spot, os-independent.

I remember that either AWT or JavaFX API allows you to differentiate between total screen area and usable screen area, where the latter doesn't contain the rect occupied by the tray bar (or macOS menu bar). By comparing both rects, you can find out where the position.

Edit: See screen.getVisualBounds()

Screen screen = Screen.getPrimary();
Rectangle2D full = screen.getBounds();
Rectangle2D usable = screen.getVisualBounds();

Signed-off-by: Armin Schrenk <[email protected]>

@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: 1

♻️ Duplicate comments (2)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (2)

8-8: Deferred: javax.inject import tracked in issue #4070.

This import uses javax.inject instead of jakarta.inject, which was previously flagged and deferred to a broader refactoring effort tracked in issue #4070.


58-60: Guard against empty list in initialize().

Line 59 unconditionally accesses notificationsProp.get(selectionIndex.get()) without verifying the list is non-empty. If the notification list starts empty, this will throw IndexOutOfBoundsException.

Apply this diff:

 @FXML
 public void initialize() {
-    selectedEvent.setValue(notificationsProp.get(selectionIndex.get()));
+    if (!notificationsProp.isEmpty()) {
+        selectedEvent.setValue(notificationsProp.get(selectionIndex.get()));
+    }
 }
🧹 Nitpick comments (4)
src/main/java/org/cryptomator/ui/common/SystemBarUtil.java (1)

16-29: Consider documenting edge case behavior.

The implementation correctly follows the suggestion from the PR discussion to use Screen.getVisualBounds(). The logic is sound for typical scenarios where a single system bar occupies one side of the screen.

However, consider adding JavaDoc to document:

  • The method's purpose and return value
  • The assumption stated in line 19 (system bar fills a whole side)
  • Edge case behavior: when bounds == visualBounds (no system bar detected), the method defaults to Placement.BOTTOM
  • Edge case behavior: if system bars exist on multiple sides, only the first detected placement is returned (priority: LEFT → TOP → RIGHT → BOTTOM)

This documentation would help future maintainers understand the intended behavior and assumptions.

src/main/java/org/cryptomator/ui/notification/NotificationController.java (3)

62-70: Add null guard in adjustTexts for defensive programming.

Line 64 unconditionally calls newEvent.actualEvent(). If selectedEvent is ever set to null (e.g., when the list becomes empty or selection is cleared), this will throw NullPointerException.

Apply this diff:

 private void adjustTexts(ObservableValue<? extends VaultEvent> observable, VaultEvent oldEvent, VaultEvent newEvent) {
+    if (newEvent == null) {
+        message.set("");
+        description.set("");
+        actionText.set(null);
+        return;
+    }
     switch (newEvent.actualEvent()) {
         default -> {
             message.set("NO CONTENT");

73-95: Consider defensive null check on selectedEvent.

Lines 76-77 call ev.actualEvent() without checking if ev is null. While the current design ensures selectedEvent should have a value when this method is invoked, adding a null guard would make the code more robust to future changes.

 @FXML
 public void handleButtonAction() {
     try {
         var ev = selectedEvent.get();
+        if (ev == null) {
+            return;
+        }
         switch (ev.actualEvent()) {

145-151: Minor inconsistency in visibility checks.

buttonVisibleProperty() returns true only when actionText is non-null and non-empty (via isEmpty().not()), while isButtonVisible() returns true for any non-null value, even an empty string. For consistency, consider aligning both methods.

 public boolean isButtonVisible() {
-    return actionText.get() != null;
+    return actionText.get() != null && !actionText.get().isEmpty();
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3135be9 and 5c2954d.

📒 Files selected for processing (5)
  • src/main/java/org/cryptomator/ui/common/SystemBarUtil.java (1 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (3 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-07-27T13:14:40.963Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T08:28:24.864Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3641
File: .github/workflows/win-exe.yml:20-21
Timestamp: 2024-12-11T08:28:24.864Z
Learning: In the Cryptomator project, it's acceptable to update the JDK version (e.g., to JDK 23) while keeping the JavaFX version at an older version (e.g., JavaFX 22.0.2), as this has not caused problems in the past.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test
🔇 Additional comments (2)
src/main/java/org/cryptomator/ui/common/SystemBarUtil.java (1)

9-14: LGTM!

The enum correctly represents the four possible system bar placements.

src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (1)

33-57: LGTM! Clean dependency injection wiring.

The integration of FxNotificationRadar follows the established pattern for other dependencies in this class. The scheduling call is appropriately placed alongside the existing fxFSEventList.schedulePollForUpdates().

Also applies to: 103-103

infeo added 2 commits December 5, 2025 16:52
Signed-off-by: Armin Schrenk <[email protected]>
Signed-off-by: Armin Schrenk <[email protected]>

@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: 1

🧹 Nitpick comments (2)
src/main/java/org/cryptomator/ui/common/SystemBarUtil.java (1)

42-54: Make system bar detection more robust to double precision and clarify Javadoc.

The overall approach and priority order look good. Two small robustness tweaks:

  1. Double comparison: getBounds() / getVisualBounds() return doubles; using != risks treating tiny rounding differences as “bar present”. Consider comparing with a small epsilon instead of strict inequality.

  2. Bottom vs. no-bar semantics: The method intentionally returns BOTTOM when there is no bar, but the @param text currently suggests a bar always exists. Clarifying that the screen may or may not host a bar would better reflect the implementation.

Example adjustment:

 public class SystemBarUtil {

+	private static final double BOUNDS_EPSILON = 0.5;
+
 	public static Placement getPlacementOfSystembar(Screen screen) {
 		var bounds = screen.getBounds();
 		var vBounds = screen.getVisualBounds();
 		//assumption: the system bar fills a whole screen side
-		if (bounds.getMinX() != vBounds.getMinX()) {
+		if (Math.abs(bounds.getMinX() - vBounds.getMinX()) > BOUNDS_EPSILON) {
 			return Placement.LEFT;
-		} else if (bounds.getMinY() != vBounds.getMinY()) {
+		} else if (Math.abs(bounds.getMinY() - vBounds.getMinY()) > BOUNDS_EPSILON) {
 			return Placement.TOP;
-		} else if (bounds.getMaxX() != vBounds.getMaxX()) {
+		} else if (Math.abs(bounds.getMaxX() - vBounds.getMaxX()) > BOUNDS_EPSILON) {
 			return Placement.RIGHT;
 		} else {
 			return Placement.BOTTOM;
 		}
 	}

And in the Javadoc:

-	 * @param screen a {@link Screen} where an OS bar exists
+	 * @param screen the {@link Screen} whose OS bar placement should be determined (may have none)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

154-160: Unify button visibility semantics between property and getter

buttonVisibleProperty() treats any non‑empty string (including whitespace‑only) as “visible”, while isButtonVisible() uses isBlank(), which hides the button for whitespace‑only labels. This divergence is subtle but can become a source of confusion.

You can keep the behavior you want and ensure consistency by delegating the boolean getter to the property:

 	public ObservableBooleanValue buttonVisibleProperty() {
 		return actionText.isEmpty().not();
 	}
 
 	public boolean isButtonVisible() {
-		return actionText.get() != null && !actionText.get().isBlank();
+		return buttonVisibleProperty().get();
 	}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b83a3c2 and 5b9e70d.

📒 Files selected for processing (2)
  • src/main/java/org/cryptomator/ui/common/SystemBarUtil.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/common/SystemBarUtil.java
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/common/SystemBarUtil.java
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-07-27T13:14:40.963Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.

Applied to files:

  • src/main/java/org/cryptomator/ui/common/SystemBarUtil.java
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T08:28:24.864Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3641
File: .github/workflows/win-exe.yml:20-21
Timestamp: 2024-12-11T08:28:24.864Z
Learning: In the Cryptomator project, it's acceptable to update the JDK version (e.g., to JDK 23) while keeping the JavaFX version at an older version (e.g., JavaFX 22.0.2), as this has not caused problems in the past.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:31:37.834Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java:85-97
Timestamp: 2024-11-21T16:31:37.834Z
Learning: In `VaultListContextMenuController.didClickRemoveVault`, adding error handling and additional safety measures around vault removal is considered out of scope for this PR.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a notification window feature to Cryptomator that displays filesystem events from unlocked vaults. The feature polls for events at regular intervals and presents them in a customizable, always-on-top notification window with navigation controls.

  • Introduces a new notification system with polling mechanism and event debouncing
  • Implements a JavaFX-based notification window with paging and action buttons
  • Integrates window placement logic based on OS and system bar position

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/resources/fxml/notification.fxml Defines the UI layout for the notification window with header, content, and navigation controls
src/main/resources/css/light_theme.css Adds styling for the notification window including rounded borders, shadows, and button states
src/main/java/org/cryptomator/ui/notification/NotificationWindow.java Qualifier annotation for dependency injection of notification window components
src/main/java/org/cryptomator/ui/notification/NotificationScoped.java Scope annotation defining lifecycle for notification-related components
src/main/java/org/cryptomator/ui/notification/NotificationModule.java Dagger module configuring notification window creation and placement logic
src/main/java/org/cryptomator/ui/notification/NotificationController.java Controller managing notification display, navigation, and event handling
src/main/java/org/cryptomator/ui/notification/NotificationComponent.java Dagger subcomponent interface for notification window creation
src/main/java/org/cryptomator/ui/mainwindow/VaultListController.java Minor formatting changes to improve code readability
src/main/java/org/cryptomator/ui/fxapp/FxNotificationRadar.java Polls NotificationManager and triggers notification window display
src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java Adds method to show notification window
src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java Registers NotificationComponent in the application module
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java Initializes notification polling on application start
src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java Adds chevron left/right icons for notification navigation
src/main/java/org/cryptomator/ui/common/SystemBarUtil.java Utility for determining system bar placement on different operating systems
src/main/java/org/cryptomator/ui/common/FxmlFile.java Registers notification FXML file
src/main/java/org/cryptomator/event/VaultEvent.java Simplifies VaultEvent record by removing count tracking and comparison logic
src/main/java/org/cryptomator/event/NotificationManager.java Manages notification events with debouncing and queuing functionality
src/main/java/org/cryptomator/common/vaults/Vault.java Integrates NotificationManager to handle filesystem events
src/main/java/org/cryptomator/common/EventMap.java Deleted as event tracking is now handled by FileSystemEventAggregator and NotificationManager
src/main/java/module-info.java Reorders imports for better organization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Armin Schrenk <[email protected]>

@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: 1

♻️ Duplicate comments (1)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

52-62: Lambda parameters named _ will not compile on modern JDKs

Using _ as a lambda parameter (selectionIndex.addListener((_, _, n) -> { ... })) is illegal in Java 9+ and will fail compilation. Rename the parameters to valid identifiers and update the body accordingly, e.g.:

-		selectionIndex.addListener((_, _, n) -> {
-			if (!events.isEmpty()) {
-				selectedEvent.setValue(events.get(n.intValue()));
-			}
-		});
+		selectionIndex.addListener((observable, oldIndex, newIndex) -> {
+			if (!events.isEmpty()) {
+				int idx = newIndex.intValue();
+				if (idx >= 0 && idx < events.size()) {
+					selectedEvent.setValue(events.get(idx));
+				}
+			}
+		});
🧹 Nitpick comments (4)
src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1)

33-38: Track translation of hard-coded window title

The "Filesystem notification" title is currently hard-coded with a TODO. Once the feature stabilizes, consider moving this into the existing ResourceBundle to keep UI strings localized.

src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (1)

33-57: DI wiring is fine; consider aligning field name with type

The new FxNotificationManager notificationRadar field is correctly injected and stored; no functional issues.

If you touch this again, consider renaming the field to something closer to the type (e.g., notificationManager or fxNotificationManager) for readability, unless “radar” is an intentional term used elsewhere.

src/main/java/org/cryptomator/ui/notification/NotificationController.java (2)

83-105: Consider guarding against a null selectedEvent in processEvent()

Right now processEvent() assumes selectedEvent.get() is never null and would throw an NPE if that invariant is broken. To fail more gracefully in the UI, you could add a fast null check:

-			var ev = selectedEvent.get();
-			switch (ev.actualEvent()) {
+			var ev = selectedEvent.get();
+			if (ev == null) {
+				// optional: log or show BUG_MSG-like text
+				return;
+			}
+			switch (ev.actualEvent()) {

Not strictly required with the current flow, but it makes the controller more robust against future changes.


64-80: Hard-coded “NO CONTENT” / BUG_MSG texts should eventually be localized

You’ve already left a //TODO: Translations! marker. Once the notification types are fleshed out, consider moving these strings into the existing ResourceBundle and replacing them with keys so the notification window is fully localizable.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b9e70d and 2521cd2.

📒 Files selected for processing (6)
  • src/main/java/org/cryptomator/event/NotificationManager.java (1 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (3 hunks)
  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationManager.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1 hunks)
  • src/main/resources/fxml/notification.fxml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/resources/fxml/notification.fxml
  • src/main/java/org/cryptomator/event/NotificationManager.java
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/fxapp/FxNotificationManager.java
  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
📚 Learning: 2025-11-08T09:11:39.167Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3948
File: src/main/java/module-info.java:2-2
Timestamp: 2025-11-08T09:11:39.167Z
Learning: In the Cryptomator project's module structure, the `UpdateMechanism` service from `org.cryptomator.integrations.update` is loaded by the integrations library modules (e.g., integrations-api or platform-specific modules like integrations-linux), not by the desktop module. The desktop module imports `UpdateMechanism` for type references only, so no `uses` declaration is needed in `org.cryptomator.desktop`'s module-info.java.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationModule.java
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-07-27T13:14:40.963Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T08:28:24.864Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3641
File: .github/workflows/win-exe.yml:20-21
Timestamp: 2024-12-11T08:28:24.864Z
Learning: In the Cryptomator project, it's acceptable to update the JDK version (e.g., to JDK 23) while keeping the JavaFX version at an older version (e.g., JavaFX 22.0.2), as this has not caused problems in the past.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:31:37.834Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java:85-97
Timestamp: 2024-11-21T16:31:37.834Z
Learning: In `VaultListContextMenuController.didClickRemoveVault`, adding error handling and additional safety measures around vault removal is considered out of scope for this PR.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
🧬 Code graph analysis (1)
src/main/java/org/cryptomator/ui/fxapp/FxNotificationManager.java (1)
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (1)
  • FxApplicationScoped (18-124)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test
🔇 Additional comments (3)
src/main/java/org/cryptomator/ui/notification/NotificationModule.java (1)

58-76: Window placement heuristic looks consistent and non-overlapping

The placeWindow logic (macOS top-right, else top-center for top system bar, otherwise bottom-right using visual bounds) now avoids off-screen placement and should not overlap taskbars/menus. No further changes needed here from my side.

src/main/java/org/cryptomator/ui/fxapp/FxNotificationManager.java (1)

25-55: Polling and FX-thread handoff look sound; ensure schedulePollForUpdates() is called once

The use of scheduleAtFixedRate plus Platform.runLater keeps NotificationManager.addTo(...) and list mutation on the FX thread, which is good for thread safety.

Just make sure schedulePollForUpdates() is only invoked once per application lifecycle (as in FxApplication.start()), otherwise multiple pollers will be scheduled.

src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (1)

101-104: Notification polling is correctly hooked into application startup

Calling notificationRadar.schedulePollForUpdates() alongside the existing fxFSEventList polling cleanly integrates notifications into the startup sequence. No further changes needed here.

* add Cryptomator title
* include vault name in message
* remove bottom section and move button to current message area

@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: 0

♻️ Duplicate comments (1)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

55-64: Rename _ lambda parameters; they are illegal in Java 9+ and will not compile.

Using _ as a parameter name is a compile error on current JDKs. This listener must use valid identifiers; while you’re touching it, a small bounds check on the index would also make it more defensive.

-		selectionIndex.addListener((_, _, n) -> {
-			if (!events.isEmpty()) {
-				selectedEvent.setValue(events.get(n.intValue()));
-			}
-		});
+		selectionIndex.addListener((observable, oldIndex, newIndex) -> {
+			if (!events.isEmpty()) {
+				int index = newIndex.intValue();
+				if (index >= 0 && index < events.size()) {
+					selectedEvent.setValue(events.get(index));
+				}
+			}
+		});

Please recompile on your target JDK after this change to confirm there are no remaining uses of _ as an identifier in lambdas.

🧹 Nitpick comments (3)
src/main/resources/css/light_theme.css (1)

1195-1251: JavaFX CSS here is fine; Biome errors are false positives against the wrong CSS dialect.

The .notification-window block uses standard JavaFX CSS (-fx-background-color, radii, -fx-effect: dropshadow(...), and :pressed pseudo-class), which are valid for JavaFX controls but unknown to a web‑CSS linter. I’d keep these styles as‑is and instead adjust Biome config (e.g., exclude JavaFX CSS or use a JavaFX‑aware rule set) so it doesn’t flag the -fx-* properties, dropshadow, or :pressed here.

Based on learnings, this mirrors prior acceptance of JavaFX-specific -fx-underline; please just verify your CSS tooling is intentionally configured for JavaFX rather than standard browser CSS.

src/main/java/org/cryptomator/ui/notification/NotificationController.java (2)

88-111: Consider a null guard in processSelectedEvent() for robustness.

If the action is ever triggered while selectedEvent is null (e.g., due to future changes in selection wiring), ev.actualEvent() will NPE. The UI flow likely prevents this today, but a cheap defensive check keeps the controller safe:

 	@FXML
 	public void processSelectedEvent() {
-		try {
-			var ev = selectedEvent.get();
-			switch (ev.actualEvent()) {
+		var ev = selectedEvent.get();
+		if (ev == null) {
+			return;
+		}
+		try {
+			switch (ev.actualEvent()) {
 				//TODO: executorService.submit(callback.action());
 				default -> {
 				} //normally nothing
 			}
 		} finally {
 			removeSelectedEvent();
 		}
 	}

136-174: Property accessors are fine, but you may want consistent return types.

vaultNameProperty(), messageProperty(), and descriptionProperty() return ObservableValue<String>, while actionTextProperty() returns StringProperty. Functionally this works, but for API clarity you might either (a) expose all as StringProperty or (b) expose all as the more general ObservableValue<String>, depending on how FXML and other callers are expected to use them.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2521cd2 and 5a01458.

📒 Files selected for processing (4)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java (3 hunks)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
  • src/main/resources/css/light_theme.css (2 hunks)
  • src/main/resources/fxml/notification.fxml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/java/org/cryptomator/ui/fxapp/FxApplication.java
  • src/main/resources/fxml/notification.fxml
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2025-02-23T09:08:51.746Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3757
File: src/main/resources/css/light_theme.css:361-366
Timestamp: 2025-02-23T09:08:51.746Z
Learning: The `-fx-underline` property is a valid JavaFX CSS property for Labeled controls, as documented in the JavaFX CSS Reference Guide (https://openjfx.io/javadoc/21/javafx.graphics/javafx/scene/doc-files/cssref.html#labeled).

Applied to files:

  • src/main/resources/css/light_theme.css
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-07-27T13:14:40.963Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T08:28:24.864Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3641
File: .github/workflows/win-exe.yml:20-21
Timestamp: 2024-12-11T08:28:24.864Z
Learning: In the Cryptomator project, it's acceptable to update the JDK version (e.g., to JDK 23) while keeping the JavaFX version at an older version (e.g., JavaFX 22.0.2), as this has not caused problems in the past.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:31:37.834Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java:85-97
Timestamp: 2024-11-21T16:31:37.834Z
Learning: In `VaultListContextMenuController.didClickRemoveVault`, adding error handling and additional safety measures around vault removal is considered out of scope for this PR.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-19T23:01:51.307Z
Learnt from: gepbird
Repo: cryptomator/cryptomator PR: 3621
File: src/main/java/org/cryptomator/ui/keyloading/hub/HubConfig.java:55-58
Timestamp: 2024-11-19T23:01:51.307Z
Learning: In the Cryptomator project, updating `LegacyRegisterDeviceController` is not necessary when changing URI construction methods.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-24T16:47:01.698Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:0-0
Timestamp: 2024-11-24T16:47:01.698Z
Learning: In Cryptomator, avoid adding unnecessary complexity to error handling in UI controllers unless it's critical.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:42.201Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:27-45
Timestamp: 2024-12-11T13:52:42.201Z
Learning: In the Cryptomator project, parameter validation is performed in the `SimpleDialog` builder, so it's unnecessary to duplicate validation in controller classes like `SimpleDialogController`.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
🪛 Biome (2.1.2)
src/main/resources/css/light_theme.css

[error] 117-117: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 118-118: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1201-1201: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1202-1202: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1203-1203: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1204-1204: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1205-1205: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1206-1206: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1207-1207: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1207-1207: Unexpected unknown function: dropshadow

Use a known function instead.
See MDN web docs for more details.

(lint/correctness/noUnknownFunction)


[error] 1211-1211: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1215-1215: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1216-1216: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1217-1217: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1221-1221: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1222-1222: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1225-1225: Unexpected unknown pseudo-class pressed

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 1226-1226: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1230-1230: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1231-1231: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1234-1234: Unexpected unknown pseudo-class pressed

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 1235-1235: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1239-1239: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1240-1240: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1241-1241: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1245-1245: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1246-1246: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)


[error] 1249-1249: Unexpected unknown pseudo-class pressed

See MDN web docs for more details.

(lint/correctness/noUnknownPseudoClass)


[error] 1250-1250: Unknown property is not allowed.

See CSS Specifications and browser specific properties for more details.
To resolve this issue, replace the unknown property with a valid CSS property.

(lint/correctness/noUnknownProperty)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (java-kotlin)
  • GitHub Check: Compile and Test
🔇 Additional comments (2)
src/main/resources/css/light_theme.css (1)

116-119: .label-window-title style is consistent with existing label sizing.

Font family/size align with other title/large labels and follow the established Open Sans usage; no issues here.

src/main/java/org/cryptomator/ui/notification/NotificationController.java (1)

40-52: Constructor wiring and paging binding look solid.

Injecting the Stage, grabbing the shared events list from FxNotificationManager, and using a simple binding for paging (currentIndex + 1 / size) is straightforward and idiomatic for JavaFX properties; no changes needed here.

@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: 2

♻️ Duplicate comments (2)
src/main/java/org/cryptomator/ui/notification/NotificationController.java (2)

7-7: Verify javax.inject.Inject is intentional (project seems to use Jakarta Inject 2.x).
Given the earlier discussion in this PR stream about javax.inject ↔ jakarta.inject, please double-check the effective dependency graph/tooling expectation here before merging.


55-65: Fix compile error + harden selection listener (no _ params; add bounds handling; avoid forcing index=0 when empty).
(_, _, n) won’t compile on Java 9+; also !events.isEmpty() doesn’t guarantee n is in range.

 @FXML
 public void initialize() {
-    selectionIndex.addListener((_, _, n) -> {
-        if (!events.isEmpty()) {
-            selectedEvent.setValue(events.get(n.intValue()));
-        }
-    });
+    selectionIndex.addListener((obs, oldIdx, newIdx) -> {
+        int idx = newIdx.intValue();
+        if (idx >= 0 && idx < events.size()) {
+            selectedEvent.setValue(events.get(idx));
+        } else {
+            selectedEvent.setValue(null);
+        }
+    });
     selectedEvent.addListener(this::selectTexts);
-
-    selectionIndex.setValue(0);
+    selectionIndex.setValue(events.isEmpty() ? -1 : 0);
 }
🧹 Nitpick comments (1)
src/main/resources/fxml/notification.fxml (1)

30-42: Hide pager without leaving a “layout gap” (bind managed too).
visible alone doesn’t remove the node from layout; bind managed to the same condition so the close button doesn’t get offset when the pager is hidden.

-                <HBox styleClass="dialog-header" alignment="CENTER_LEFT" visible="${!controller.singleEvent}">
+                <HBox styleClass="dialog-header" alignment="CENTER_LEFT"
+                      visible="${!controller.singleEvent}"
+                      managed="${!controller.singleEvent}">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a01458 and bebe306.

📒 Files selected for processing (2)
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java (1 hunks)
  • src/main/resources/fxml/notification.fxml (1 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
📚 Learning: 2024-11-21T16:57:58.292Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.

Applied to files:

  • src/main/resources/fxml/notification.fxml
  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-24T16:41:49.825Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:52-56
Timestamp: 2024-11-24T16:41:49.825Z
Learning: In the Cryptomator project, null checks for JavaFX FXML injected components in the `initialize` method (e.g., in `MasterkeyOptionsController.java`) are unnecessary, as null values would indicate a severe issue with the JavaFX framework.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:43.966Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-07-27T13:14:40.963Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T08:28:24.864Z
Learnt from: overheadhunter
Repo: cryptomator/cryptomator PR: 3641
File: .github/workflows/win-exe.yml:20-21
Timestamp: 2024-12-11T08:28:24.864Z
Learning: In the Cryptomator project, it's acceptable to update the JDK version (e.g., to JDK 23) while keeping the JavaFX version at an older version (e.g., JavaFX 22.0.2), as this has not caused problems in the past.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-21T16:31:37.834Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java:85-97
Timestamp: 2024-11-21T16:31:37.834Z
Learning: In `VaultListContextMenuController.didClickRemoveVault`, adding error handling and additional safety measures around vault removal is considered out of scope for this PR.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-19T23:01:51.307Z
Learnt from: gepbird
Repo: cryptomator/cryptomator PR: 3621
File: src/main/java/org/cryptomator/ui/keyloading/hub/HubConfig.java:55-58
Timestamp: 2024-11-19T23:01:51.307Z
Learning: In the Cryptomator project, updating `LegacyRegisterDeviceController` is not necessary when changing URI construction methods.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-11-24T16:47:01.698Z
Learnt from: purejava
Repo: cryptomator/cryptomator PR: 3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:0-0
Timestamp: 2024-11-24T16:47:01.698Z
Learning: In Cryptomator, avoid adding unnecessary complexity to error handling in UI controllers unless it's critical.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
📚 Learning: 2024-12-11T13:52:42.201Z
Learnt from: infeo
Repo: cryptomator/cryptomator PR: 3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:27-45
Timestamp: 2024-12-11T13:52:42.201Z
Learning: In the Cryptomator project, parameter validation is performed in the `SimpleDialog` builder, so it's unnecessary to duplicate validation in controller classes like `SimpleDialogController`.

Applied to files:

  • src/main/java/org/cryptomator/ui/notification/NotificationController.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Compile and Test

@infeo
infeo changed the base branch from develop to feature/files-in-use December 12, 2025 11:10
# Conflicts:
#	src/main/java/org/cryptomator/common/EventMap.java
#	src/main/java/org/cryptomator/common/vaults/Vault.java
@infeo
infeo merged commit bf890d2 into feature/files-in-use Dec 12, 2025
@infeo
infeo deleted the feature/notify-fallback branch December 12, 2025 11:42
@infeo infeo mentioned this pull request Dec 12, 2025
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.

3 participants