-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[WEB-5823] chore: navigation and sidebar enhancements #8468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
📝 WalkthroughWalkthroughThis PR transitions project navigation preferences from localStorage-based management to API/store-driven persistence, updates navigation mode enum values to uppercase ("ACCORDION" and "TABBED"), extends the workspace service with user property endpoints, and enhances the workspace store with preference state management. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI Component
participant Hook as useNavigationPreferences
participant Store as WorkspaceStore
participant Service as WorkspaceService
participant API as Backend API
rect rgb(200, 220, 255)
Note over UI,API: Fetch Project Navigation Preferences
UI->>Hook: Call useNavigationPreferences(workspaceSlug)
Hook->>Store: getProjectNavigationPreferences(workspaceSlug)
alt Preferences cached in store
Store-->>Hook: Return cached preferences
else Preferences not cached
Store->>Service: fetchWorkspaceFilters(workspaceSlug)
Service->>API: GET /api/workspaces/{slug}/user-properties/
API-->>Service: IWorkspaceUserPropertiesResponse
Service-->>Store: Store in projectNavigationPreferencesMap
Store-->>Hook: Return preferences
end
Hook-->>UI: Return computed preferences + updaters
end
rect rgb(220, 255, 220)
Note over UI,API: Update Navigation Mode
UI->>Hook: Call updateNavigationMode(mode)
Hook->>Store: updateProjectNavigationPreferences(workspaceSlug, {navigation_control_preference: mode})
Store->>Store: Optimistic update of local state
Store->>Service: patchWorkspaceFilters(workspaceSlug, data)
Service->>API: PATCH /api/workspaces/{slug}/user-properties/
alt Update succeeds
API-->>Service: Updated IWorkspaceUserPropertiesResponse
Service-->>Store: Confirm update
Store-->>Hook: Return promise resolved
else Update fails
API-->>Service: Error
Service-->>Store: Rollback state
Store-->>Hook: Return promise rejected
end
Hook-->>UI: Update complete
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (13)
🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx,mts,cts}📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx,json,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (6)📚 Learning: 2025-12-17T10:58:59.591ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-12-12T15:20:36.542ZApplied to files:
📚 Learning: 2025-12-12T15:20:36.542ZApplied to files:
📚 Learning: 2025-06-18T09:46:08.566ZApplied to files:
📚 Learning: 2025-12-12T15:20:36.542ZApplied to files:
🧬 Code graph analysis (4)apps/web/core/layouts/auth-layout/workspace-wrapper.tsx (3)
apps/web/core/constants/fetch-keys.ts (1)
apps/web/core/services/workspace.service.ts (1)
apps/web/core/store/workspace/index.ts (1)
⏰ 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). (4)
🔇 Additional comments (17)
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 |
There was a problem hiding this comment.
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 migrates navigation preferences from local storage to API-based storage and standardizes navigation mode values to uppercase. The changes enable workspace-level persistence of project navigation preferences including navigation mode (accordion/tabbed) and project limit settings.
- Migrates project navigation preferences from browser local storage to workspace user properties API
- Changes navigation mode values from lowercase ("accordion", "horizontal") to uppercase ("ACCORDION", "TABBED") for consistency
- Adds new store methods and API endpoints for fetching and updating project navigation preferences
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/types/src/view-props.ts |
Defines new IWorkspaceUserPropertiesResponse interface extending issue filters with navigation preferences |
apps/web/core/types/navigation-preferences.ts |
Updates TProjectNavigationMode type to use uppercase values and updates defaults |
apps/web/core/store/workspace/index.ts |
Adds project navigation preferences map and implements fetch/update methods with optimistic updates |
apps/web/core/services/workspace.service.ts |
Adds API service methods for fetching and patching workspace user properties |
apps/web/core/layouts/auth-layout/workspace-wrapper.tsx |
Integrates fetching of project navigation preferences on workspace load |
apps/web/core/hooks/use-navigation-preferences.ts |
Refactors hook to use API-based preferences instead of local storage with fallback to defaults |
apps/web/core/constants/fetch-keys.ts |
Adds SWR cache key constant for project navigation preferences |
apps/web/core/components/workspace/sidebar/projects-list-item.tsx |
Updates navigation mode comparisons to use uppercase values |
apps/web/core/components/navigation/customize-navigation-dialog.tsx |
Updates radio button values and handlers to use uppercase navigation modes |
apps/web/ce/components/common/extended-app-header.tsx |
Updates navigation mode comparison to use uppercase value |
apps/web/ce/components/breadcrumbs/common.tsx |
Updates navigation mode comparison to use uppercase value |
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/layout.tsx |
Updates navigation mode comparison to use uppercase value |
apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/header.tsx |
Updates navigation mode comparison to use uppercase value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR includes navigation preference enhancements.
Type of Change
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.