Skip to content

feat(wework): add task reminders and tray status - #1795

Merged
qdaxb merged 3 commits into
mainfrom
agent/wework-task-reminders-tray
Jul 7, 2026
Merged

qdaxb merged 3 commits into
mainfrom
agent/wework-task-reminders-tray

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Wework task completion reminders across the sidebar, system notifications, settings, and tray icon.

  • tracks completed runtime tasks as unread unless the completed task is already open in a focused window
  • sends task completion system notifications using the latest user prompt and model reply from the task transcript
  • adds tray display preferences for unread count, running status, usage, and completion notifications
  • updates the tray icon renderer to show unread/running/usage states and quota reset times
  • shows quota reset times in the desktop settings usage menu

Why

Completed tasks could lose their blue unread indicator, tray state was hard to read, and completion notifications used generic copy instead of the actual task context. This makes task completion state persistent and visible while avoiding unread noise when the user is already watching the task complete.

Validation

  • pnpm --filter wework exec vitest run src/features/workbench/runtimeTaskReminders.test.ts src/features/workbench/runtimeTaskNotificationContent.test.ts
  • pnpm --filter wework exec tsc --noEmit --pretty false
  • pnpm --filter wework lint

Summary by CodeRabbit

  • New Features

    • Added system notification support for completed runtime tasks.
    • Added new tray display options for unread tasks, running tasks, and usage status.
    • Tray tooltips now show localized reset times for usage limits.
  • Bug Fixes

    • Improved unread task tracking so task reminders update more reliably across the app.
    • Enhanced sidebar and mobile drawer indicators for unread runtime tasks.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bff7849a-1111-49ec-b432-b9eb4da3f398

📥 Commits

Reviewing files that changed from the base of the PR and between 0c37509 and 79d09fc.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • wework/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (31)
  • wework/package.json
  • wework/src-tauri/Cargo.toml
  • wework/src-tauri/capabilities/default.json
  • wework/src-tauri/src/lib.rs
  • wework/src/api/local/codexUsage.test.ts
  • wework/src/api/local/codexUsage.ts
  • wework/src/components/layout/DesktopSettingsMenu.test.tsx
  • wework/src/components/layout/DesktopSettingsMenu.tsx
  • wework/src/components/layout/DesktopSidebar.test.tsx
  • wework/src/components/layout/DesktopSidebar.tsx
  • wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
  • wework/src/components/layout/DesktopWorkbenchLayout.tsx
  • wework/src/components/layout/MobileDrawer.tsx
  • wework/src/components/layout/MobileWorkbenchLayout.tsx
  • wework/src/components/settings/GeneralSettingsPage.test.tsx
  • wework/src/components/settings/GeneralSettingsPage.tsx
  • wework/src/features/workbench/WorkbenchProvider.tsx
  • wework/src/features/workbench/runtimeTaskNotificationContent.test.ts
  • wework/src/features/workbench/runtimeTaskNotificationContent.ts
  • wework/src/features/workbench/runtimeTaskReminders.test.ts
  • wework/src/features/workbench/runtimeTaskReminders.ts
  • wework/src/features/workbench/runtimeTaskSystemNotifications.ts
  • wework/src/features/workbench/workbenchContextTypes.ts
  • wework/src/i18n/locales/en/common.json
  • wework/src/i18n/locales/zh-CN/common.json
  • wework/src/pages/WorkbenchPage.tsx
  • wework/src/tauri/appPreferences.test.ts
  • wework/src/tauri/appPreferences.ts
  • wework/src/tauri/trayMenuState.test.ts
  • wework/src/tauri/trayMenuState.ts
  • wework/src/tauri/trayNavigation.test.ts
📝 Walkthrough

Walkthrough

This PR adds runtime task completion reminders with desktop notifications via a new Tauri notification plugin, extends tray icon/menu state to show unread and running indicators, adds tray display preference toggles in general settings, and adds locale-aware reset-time formatting for codex usage tooltips.

Changes

Task reminders, notifications, and tray/settings updates

Layer / File(s) Summary
Notification plugin wiring
wework/package.json, wework/src-tauri/Cargo.toml, wework/src-tauri/capabilities/default.json, wework/src-tauri/src/lib.rs
Adds @tauri-apps/plugin-notification/tauri-plugin-notification dependencies, grants the notification:default permission, and registers the plugin in the Tauri builder.
Runtime task reminder state
wework/src/features/workbench/runtimeTaskReminders.ts, wework/src/features/workbench/runtimeTaskReminders.test.ts
Introduces reminder types, buildRuntimeTaskReminderSnapshot, storage-backed unread/running key tracking, and useRuntimeTaskReminders hook, with unit tests covering completion, focus, and pruning scenarios.
Notification content and sending
wework/src/features/workbench/runtimeTaskNotificationContent.ts, ...test.ts, wework/src/features/workbench/runtimeTaskSystemNotifications.ts
Derives notification title/body from transcript messages or fallback context, and sends completion notifications through the Tauri notification plugin with permission handling.
Workbench reminder context
wework/src/features/workbench/WorkbenchProvider.tsx, workbenchContextTypes.ts
Wires runtimeTaskReminders into WorkbenchContext and WorkbenchPaneContext.
Sidebar and drawer unread indicators
wework/src/components/layout/DesktopSidebar.tsx, DesktopWorkbenchLayout.tsx, MobileDrawer.tsx, MobileWorkbenchLayout.tsx, tests
Replaces internal localStorage-derived unread tracking with caller-provided unreadRuntimeTaskKeys/onMarkRuntimeTaskRead props, rendering unread dots based on reminder keys.
App preferences for tray and notifications
wework/src/tauri/appPreferences.ts, ...test.ts, wework/src-tauri/src/lib.rs
Adds taskCompletionNotificationsEnabled, trayUnreadEnabled, trayRunningEnabled, trayUsageEnabled fields on both frontend and Rust sides, plus an APP_PREFERENCES_CHANGED_EVENT.
Tray menu unread and running groups
wework/src/tauri/trayMenuState.ts, ...test.ts, wework/src-tauri/src/lib.rs, wework/src/tauri/trayNavigation.test.ts
Extends TrayMenuTaskGroups/TrayMenuStatePayload with unread arrays and status/count fields, and updates tray menu building logic and labels.
Tray icon unread badge and meter
wework/src-tauri/src/lib.rs
Adds pixel/glyph helpers to render a running-status meter and unread badge on the tray icon, updating layout calculations.
General settings tray toggles
wework/src/components/settings/GeneralSettingsPage.tsx, ...test.tsx, locale files
Refactors preference toggles into shared handler/row components, adds tray display option buttons, and adds/updates locale strings and tests.
WorkbenchPage tray integration
wework/src/pages/WorkbenchPage.tsx
Builds tray menu groups from reminder data/preferences and composes tray tooltip text.
Codex usage reset-time formatting
wework/src/api/local/codexUsage.ts, ...test.ts, wework/src/components/layout/DesktopSettingsMenu.tsx, ...test.tsx, DesktopWorkbenchLayout.test.tsx
Adds locale-aware reset-time formatting used in tooltips and a new UsageWindowRow component to display reset times in the settings menu.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RuntimeWork
  participant useRuntimeTaskReminders
  participant Storage as localStorage
  participant NotificationText as getRuntimeTaskNotificationText
  participant TauriPlugin as tauri_plugin_notification

  RuntimeWork->>useRuntimeTaskReminders: task status updates
  useRuntimeTaskReminders->>Storage: read stored unread/running keys
  useRuntimeTaskReminders->>useRuntimeTaskReminders: buildRuntimeTaskReminderSnapshot
  useRuntimeTaskReminders->>Storage: persist updated unread/running keys
  useRuntimeTaskReminders->>NotificationText: newly completed unread item
  NotificationText-->>useRuntimeTaskReminders: title, body
  useRuntimeTaskReminders->>TauriPlugin: sendRuntimeTaskCompletionNotification
  TauriPlugin-->>useRuntimeTaskReminders: permission granted/notification sent
Loading
sequenceDiagram
  participant WorkbenchPage
  participant buildTrayMenuTaskGroups
  participant SetTrayMenuStateCommand as Tauri command
  participant TrayIconRenderer as tray_usage_icon

  WorkbenchPage->>buildTrayMenuTaskGroups: runtimeWork, reminders, preferences
  buildTrayMenuTaskGroups-->>WorkbenchPage: unread/running groups, counts
  WorkbenchPage->>SetTrayMenuStateCommand: state payload with unread/running fields
  SetTrayMenuStateCommand->>TrayIconRenderer: show_running_status, unread_count
  TrayIconRenderer-->>SetTrayMenuStateCommand: rendered icon with badge/meter
Loading
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/wework-task-reminders-tray

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.

@qdaxb
qdaxb marked this pull request as ready for review July 7, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant