Skip to content

Conversation

@evereq
Copy link
Member

@evereq evereq commented Dec 25, 2025

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.



Summary by cubic

Adds a dedicated Plugin Marketplace window and top‑level /plugins route across desktop, timer, agent, and server apps, moving plugin management out of Settings and making it accessible via tray/menu. Also upgrades NestJS and Express to the latest minor versions.

  • New Features

    • New PluginMarketplaceWindow with WindowManager support (RegisteredWindow.PLUGINS); window is created/loaded on app start and opened from tray/menu.
    • Added PluginsModule and a guarded /plugins route (with AuthConnectionGuard) to all apps; lazy‑loads installed and marketplace views.
    • Updated navigation from /settings/marketplace-plugins to /plugins/(installed|marketplace); refreshed layout and styles for plugin pages.
  • Dependencies

    • Bumped NestJS to 11.1.10 across apps/packages.
    • Bumped Express to 5.2.1 where used.
    • Updated yarn.lock accordingly.

Written for commit 9ca1a6c. Summary will update automatically on new commits.

syns2191 and others added 2 commits December 24, 2025 16:57
* chore: update yarn.lock baseline

* chore: upgrade @nestjs and related packages from v11.1.0 to v11.1.10
* feat(window): add Plugin Marketplace window and wire it in desktop-window

* feat(ui/plugins): add Plugin Marketplace UI (list, detail, upload, filters, layout, styles)

* refactor(settings): wire plugin routes and access guard; update settings module

* refactor(desktop): menu/tray entries to open Plugin Marketplace window

* refactor(core): extend window manager interface to support plugin windows

* chore(timer): update routing/module and bootstrap for plugin window integration

* feat: export new components and modules

This commit adds exports for several new components and modules from the desktop-ui-lib. This includes components related to login, agent dashboard, integrations, language, recap, settings, and time tracker. These exports make these components and modules available for use in other parts of the application.

* feat(plugins): add plugin route and tray menu item

Adds a new route for plugins and integrates a new menu item into the tray icon's context menu. This enables users to access the plugin marketplace directly from the system tray.
The `app-routing.module.ts` now includes a 'plugins' path with a guard and lazy loading for plugin-related components and routes. The `app.module.ts` imports the `PluginsModule`.
The `tray.ts` file is updated to include a new "Plugins" menu item in the tray icon. Clicking this item will open the `PluginMarketplaceWindow` if it's not already open, or focus it if it is. This feature enhances the agent's extensibility and user experience by providing easy access to plugins.

* feat(plugins): implement plugin marketplace and routing

Integrates the plugin marketplace into the application and sets up the necessary routing for plugin management. This includes adding the `PluginsModule` to both desktop and server applications, and configuring the `plugins` route with `AuthConnectionGuard` to ensure authenticated access.
The plugin marketplace window is now created and loaded in both desktop and server entry points. This feature allows for dynamic loading and management of plugins within the application.

* fix(package): add missing newline at end of package.json

* fix(plugins): ensure plugin window is retrieved after creation

When creating a new plugin marketplace window, the code immediately tried to show it without re-retrieving the window instance from the `WindowManager`. This commit ensures that the `window` variable is updated after the new window is created, so that `window.show()` is called on the correct instance.
Additionally, removed an unnecessary `toggleDevTools()` call from the `PluginMarketplaceWindow` constructor.
Also updated the `desktop-ui-lib` to correctly bind the `routerLink` directive and added `ChangeDetectionStrategy.OnPush` to `PluginLayoutComponent` for performance.

* fix(tray): use correct ui path for plugin marketplace window

When opening the plugin marketplace window, the incorrect path was being used. This commit updates the path to `appWindow.getUiPath('plugins')` to ensure the window loads correctly.

* fix(plugin-layout): remove unnecessary change detection strategy

The `ChangeDetectionStrategy.OnPush` was implicitly handled by Angular's default behavior when not explicitly set. Removing it simplifies the component definition without altering its functionality or performance.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 25, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

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.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@evereq evereq merged commit 5d5f763 into stage Dec 25, 2025
22 of 25 checks passed
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.5% Duplication on New Code (required ≤ 3%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 74 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/desktop-ui-lib/src/lib/settings/settings.component.html">

<violation number="1" location="packages/desktop-ui-lib/src/lib/settings/settings.component.html:916">
P2: Duplicate `[disabled]` attribute on this input element. The input already has `[disabled]=&quot;appSetting?.timerStarted&quot;` above, but this second `[disabled]=&quot;true&quot;` will always override it, making the input permanently disabled. Remove the conditional binding if the input should always be disabled, or remove this line if the disabled state should depend on `appSetting?.timerStarted`.</violation>
</file>

<file name="packages/desktop-ui-lib/src/lib/settings/settings.component.ts">

<violation number="1" location="packages/desktop-ui-lib/src/lib/settings/settings.component.ts:583">
P1: Menu items have been removed from the non-server case: `TIMER_TRACKER.SETTINGS.ADVANCED_SETTINGS` and `TIMER_TRACKER.SETTINGS.PLUGINS` are no longer included. This appears to be a significant functional change hidden within formatting updates. If this is intentional, it should be documented; if not, these items should be restored.</violation>
</file>

<file name="apps/desktop/src/index.ts">

<violation number="1" location="apps/desktop/src/index.ts:544">
P2: The `marketplace` window is declared as a local const and not tracked at module level like other windows (`alwaysOn`, `notificationWindow`, etc.). This means it won&#39;t be properly closed in `closeAllWindows()` during app shutdown, potentially causing resource leaks. Consider declaring `let marketplace: PluginMarketplaceWindow = null;` at module level (near line 118) and adding it to the `windows` array in `closeAllWindows()`.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

nbInput
fullWidth
status="basic"
[disabled]="true"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 25, 2025

Choose a reason for hiding this comment

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

P2: Duplicate [disabled] attribute on this input element. The input already has [disabled]="appSetting?.timerStarted" above, but this second [disabled]="true" will always override it, making the input permanently disabled. Remove the conditional binding if the input should always be disabled, or remove this line if the disabled state should depend on appSetting?.timerStarted.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/desktop-ui-lib/src/lib/settings/settings.component.html, line 916:

<comment>Duplicate `[disabled]` attribute on this input element. The input already has `[disabled]=&quot;appSetting?.timerStarted&quot;` above, but this second `[disabled]=&quot;true&quot;` will always override it, making the input permanently disabled. Remove the conditional binding if the input should always be disabled, or remove this line if the disabled state should depend on `appSetting?.timerStarted`.</comment>

<file context>
@@ -956,123 +847,92 @@ &lt;h4&gt;
+															nbInput
+															fullWidth
+															status=&quot;basic&quot;
+															[disabled]=&quot;true&quot;
+														/&gt;
 													&lt;/div&gt;
</file context>
Fix with Cubic

const allowScreenshotCapture = auth?.allowScreenshotCapture || auth?.user?.employee?.allowScreenshotCapture;
this.menus = this.isServer
? ['TIMER_TRACKER.SETTINGS.UPDATE', 'TIMER_TRACKER.SETTINGS.ADVANCED_SETTINGS', 'MENU.ABOUT']
: [
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 25, 2025

Choose a reason for hiding this comment

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

P1: Menu items have been removed from the non-server case: TIMER_TRACKER.SETTINGS.ADVANCED_SETTINGS and TIMER_TRACKER.SETTINGS.PLUGINS are no longer included. This appears to be a significant functional change hidden within formatting updates. If this is intentional, it should be documented; if not, these items should be restored.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/desktop-ui-lib/src/lib/settings/settings.component.ts, line 583:

<comment>Menu items have been removed from the non-server case: `TIMER_TRACKER.SETTINGS.ADVANCED_SETTINGS` and `TIMER_TRACKER.SETTINGS.PLUGINS` are no longer included. This appears to be a significant functional change hidden within formatting updates. If this is intentional, it should be documented; if not, these items should be restored.</comment>

<file context>
@@ -518,78 +529,70 @@ export class SettingsComponent implements OnInit, AfterViewInit, OnDestroy {
+			const allowScreenshotCapture = auth?.allowScreenshotCapture || auth?.user?.employee?.allowScreenshotCapture;
+			this.menus = this.isServer
+				? [&#39;TIMER_TRACKER.SETTINGS.UPDATE&#39;, &#39;TIMER_TRACKER.SETTINGS.ADVANCED_SETTINGS&#39;, &#39;MENU.ABOUT&#39;]
+				: [
+						...(allowScreenshotCapture ? [&#39;TIMER_TRACKER.SETTINGS.SCREEN_CAPTURE&#39;] : []),
+						&#39;TIMER_TRACKER.TIMER&#39;,
</file context>
Fix with Cubic

updaterWindow = await createUpdaterWindow(updaterWindow, pathWindow.timeTrackerUi, pathWindow.preloadPath);
imageView = await createImageViewerWindow(imageView, pathWindow.timeTrackerUi, pathWindow.preloadPath);

const marketplace = new PluginMarketplaceWindow(pathWindow.timeTrackerUi);
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 25, 2025

Choose a reason for hiding this comment

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

P2: The marketplace window is declared as a local const and not tracked at module level like other windows (alwaysOn, notificationWindow, etc.). This means it won't be properly closed in closeAllWindows() during app shutdown, potentially causing resource leaks. Consider declaring let marketplace: PluginMarketplaceWindow = null; at module level (near line 118) and adding it to the windows array in closeAllWindows().

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/index.ts, line 544:

<comment>The `marketplace` window is declared as a local const and not tracked at module level like other windows (`alwaysOn`, `notificationWindow`, etc.). This means it won&#39;t be properly closed in `closeAllWindows()` during app shutdown, potentially causing resource leaks. Consider declaring `let marketplace: PluginMarketplaceWindow = null;` at module level (near line 118) and adding it to the `windows` array in `closeAllWindows()`.</comment>

<file context>
@@ -540,6 +541,9 @@ app.on(&#39;ready&#39;, async () =&gt; {
 		updaterWindow = await createUpdaterWindow(updaterWindow, pathWindow.timeTrackerUi, pathWindow.preloadPath);
 		imageView = await createImageViewerWindow(imageView, pathWindow.timeTrackerUi, pathWindow.preloadPath);
 
+		const marketplace = new PluginMarketplaceWindow(pathWindow.timeTrackerUi);
+		await marketplace.loadURL();
+
</file context>
Fix with Cubic

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 25, 2025

Greptile Summary

Merges two feature branches: NestJS package updates (v11.1.0 → v11.1.10) and plugin marketplace refactoring that moves plugins from settings into a dedicated window.

Major Changes:

  • Created new PluginMarketplaceWindow class with proper window registration and configuration
  • Added RegisteredWindow.PLUGINS enum entry for window management
  • Updated desktop menu and tray icons across desktop, server, and agent apps to open plugin marketplace in dedicated window
  • Refactored plugin routing: changed paths from plugins to installed and marketplace-plugins to marketplace
  • Removed plugin-related menu items from settings component (now in dedicated window)
  • Updated NestJS core packages from 11.1.0 to 11.1.10 and @nestjs/schematics from 11.0.5 to 11.0.9
  • Reorganized exports in desktop-ui-lib/src/index.ts (alphabetized and added new component exports)
  • Formatting improvements across multiple files (indentation, spacing)

PR Description Issue:
The PR description does not explain what changes were made or why they add value, as required by the contributing guidelines checkbox.

Confidence Score: 4/5

  • This PR is safe to merge with minor concerns about the incomplete PR description
  • The code changes are well-structured and follow good architectural patterns (separating plugins into a dedicated window). The NestJS dependency updates are minor version bumps. However, the PR description doesn't explain the changes as required by the contributing guidelines, and the PR combines two separate concerns (dependency updates + feature refactor) which could have been split into separate PRs for clearer review
  • Check that plugin window functionality works correctly across all three applications (desktop, server, agent) and verify NestJS updates don't introduce breaking changes

Important Files Changed

Filename Overview
packages/desktop-window/src/lib/plugin-marketplace.window.ts New window class for plugin marketplace with proper configuration and registration
packages/desktop-lib/src/lib/desktop-menu.ts Refactored plugin menu to open dedicated window instead of settings
packages/desktop-lib/src/lib/desktop-tray.ts Added plugin menu entries to tray icon with keyboard shortcut
apps/agent/src/main/tray.ts Added plugin marketplace to agent tray with window management
packages/desktop-ui-lib/src/lib/settings/settings.component.ts Removed plugins from settings menu, formatting improvements
apps/desktop/src/index.ts Instantiated PluginMarketplaceWindow on app ready
apps/server/src/index.ts Added plugin marketplace window initialization

Sequence Diagram

sequenceDiagram
    participant User
    participant Menu/Tray
    participant WindowManager
    participant PluginMarketplaceWindow
    participant Angular Router
    participant PluginComponents

    User->>Menu/Tray: Click "Plugins" menu item
    Menu/Tray->>WindowManager: getOne(RegisteredWindow.PLUGINS)
    
    alt Window doesn't exist
        Menu/Tray->>PluginMarketplaceWindow: new PluginMarketplaceWindow(path)
        PluginMarketplaceWindow->>WindowManager: register(RegisteredWindow.PLUGINS, this)
        PluginMarketplaceWindow->>PluginMarketplaceWindow: loadURL()
        Menu/Tray->>WindowManager: getOne(RegisteredWindow.PLUGINS)
    end
    
    WindowManager-->>Menu/Tray: return window instance
    Menu/Tray->>WindowManager: show(RegisteredWindow.PLUGINS)
    WindowManager->>PluginMarketplaceWindow: show()
    
    PluginMarketplaceWindow->>Angular Router: Navigate to /plugins
    Angular Router->>Angular Router: Redirect to /plugins/installed
    Angular Router->>PluginComponents: Load PluginLayoutComponent
    
    PluginComponents-->>User: Display plugin marketplace UI
Loading

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.

4 participants