[codex] clear v2 ready notification on workspace click#3765
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughWhen a workspace item in the dashboard sidebar is clicked, the hook now invokes Changes
Sequence DiagramsequenceDiagram
participant User
participant DashboardSidebarWorkspaceItem as Workspace Item Hook
participant NotificationStore as V2 Notification Store
participant Router as Router/Navigation
User->>DashboardSidebarWorkspaceItem: Click workspace item
DashboardSidebarWorkspaceItem->>NotificationStore: clearWorkspaceAttention(workspaceId)
NotificationStore->>NotificationStore: Remove "review" status notifications<br/>for workspace
NotificationStore-->>DashboardSidebarWorkspaceItem: Workspace attention cleared
DashboardSidebarWorkspaceItem->>Router: Navigate to /v2-workspace/$workspaceId
Router-->>User: Display workspace
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR calls Confidence Score: 5/5Safe to merge — small, well-tested change with no risky side-effects. The change is minimal: one store selector and one function call added to a click handler, with the store implementation already existing and the new test covering the key invariants. No P0/P1 issues identified. No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts | Adds clearWorkspaceAttention call on workspace item click, correctly scoped to the clicked workspaceId and placed before navigation. |
| apps/desktop/src/renderer/stores/v2-notifications/store.test.ts | New test verifies clearWorkspaceAttention removes only 'review' entries for the targeted workspace while preserving 'working', 'permission', and other-workspace statuses. |
Sequence Diagram
sequenceDiagram
participant User
participant WorkspaceItem as DashboardSidebarWorkspaceItem
participant Store as V2NotificationStore
participant Router
User->>WorkspaceItem: click workspace row
WorkspaceItem->>Store: clearWorkspaceAttention(workspaceId)
Note over Store: removes entries where<br/>workspaceId matches AND status === "review"<br/>preserves "working", "permission", other workspaces
Store-->>WorkspaceItem: state updated
WorkspaceItem->>Router: navigate to /v2-workspace/:workspaceId
Reviews (1): Last reviewed commit: "clear v2 ready notification on workspace..." | Re-trigger Greptile
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
reviewsources while preservingworking,permission, and other-workspace statuses.Impact
Clicking a v2 workspace row now acknowledges the ready notification immediately, without hiding active work or permission-request indicators.
Validation
bun test apps/desktop/src/renderer/stores/v2-notifications/store.test.tsbunx biome check apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts apps/desktop/src/renderer/stores/v2-notifications/store.test.tsSummary by cubic
Clicking a v2 workspace in the sidebar now clears its ready/review notification, matching the v1 behavior. Active work and permission indicators remain, and other workspaces are unaffected; tests cover this.
Written for commit 3438569. Summary will update on new commits.
Summary by CodeRabbit
Improvements
Tests