Skip to content

Conversation

@aaryan610
Copy link
Member

@aaryan610 aaryan610 commented Nov 26, 2025

Description

This PR addresses some UI bugs in the revamped navigation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Summary by CodeRabbit

  • New Features

    • Added stickies to the sidebar
    • Added "Set as Default" action with a new icon for tabs
    • Tab visibility toggle (Show/Hide)
  • Improvements

    • Streamlined navigation customization UI with unified lists and improved ordering
    • Improved navigation layout, spacing and header/top-nav sizing
    • Improved search input accessibility and external focus handling
    • Success and error toasts for tab preference updates

✏️ Tip: You can customize this high-level summary in your review settings.

@makeplane
Copy link

makeplane bot commented Nov 26, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

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

Adjusts layout/flex rules across several navigation and sidebar components, consolidates navigation-item derivation in the customize dialog, introduces a SetAsDefaultIcon (and its export), adds support for a "stickies" sidebar item, and tweaks preference update/error handling.

Changes

Cohort / File(s) Summary
Top / Header Layouts
apps/web/ce/components/navigations/top-navigation-root.tsx, apps/web/core/components/navigation/tab-navigation-root.tsx, apps/web/core/components/navigation/top-nav-power-k.tsx, apps/web/core/components/navigation/project-header.tsx
Adjusted flex/shrink/grow/spacing classes, removed some width/truncation constraints, and isolated action-menu sizing to change horizontal layout and spacing.
Tab Navigation UI & Actions
apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx, apps/web/core/components/navigation/tab-navigation-visible-item.tsx
Replaced previous default icon with new SetAsDefaultIcon; added PinOff and SetAsDefaultIcon in visible items; reworked overflow item markup and hover/visibility rules for action buttons.
Customize Navigation / Preferences
apps/web/core/components/navigation/customize-navigation-dialog.tsx, apps/web/core/components/navigation/use-tab-preferences.ts
Consolidated pinned/unpinned and enabled/disabled derivation into single sorted arrays for workspace/personal items; updated rendering to use these arrays; changed preference update/error handling and toast usage.
Workspace Sidebar & Stickies
apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx, apps/web/ce/components/workspace/sidebar/helper.tsx
Unified sidebar dropdown toggle effect; expanded menu width/whitespace behavior; added handling for a new stickies sidebar item icon (MultipleStickyIcon).
Project Actions Props
apps/web/core/components/navigation/project-actions-menu.tsx
Renamed props type to Props, added onCopyText: () => void, removed default React import, introduced isMenuActive state and re-ordered hook/init logic.
Icons Package
packages/propel/src/icons/set-as-default-icon.tsx, packages/propel/src/icons/index.ts
Added new SetAsDefaultIcon React SVG component and re-exported it from the icons index.

Sequence Diagram(s)

sequenceDiagram
  participant U as UI (Customize Dialog)
  participant P as Preferences API
  participant T as Toasts

  Note over U,P: User toggles "set default" on a tab
  U->>P: updatePreferences({ default_tab: key })
  alt success
    P-->>U: resolved
    U->>T: showSuccess("Default tab updated")
  else failure
    P-->>U: rejected
    U->>T: showError("Failed to update default")
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus review on customize-navigation-dialog.tsx (derivation/sorting and checkbox state mapping).
  • Verify hover/visibility and keyboard/accessibility behavior in tab-navigation-overflow-menu.tsx and tab-navigation-visible-item.tsx.
  • Confirm SetAsDefaultIcon export and consistent icon usage across components.

Possibly related PRs

Suggested labels

🐛bug

Suggested reviewers

  • pushya22

Poem

🐰 I hopped through classes, gaps, and icons bright,

swapped defaults, pinned and hid with gentle bite,
stickies found a nook to dwell,
SVGs painted stories well,
the rabbit cheers — the nav feels light.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. While it identifies the change as a bug fix, it lacks detail about specific bugs addressed, test scenarios, and reference to the related issue WEB-5511. Expand the description with specific UI bugs fixed, test scenarios performed, and add a reference link to issue WEB-5511 to complete the template requirements.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately identifies the main change as addressing UI bugs in the revamped navigation, which aligns with the file modifications across navigation components.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/navigation-ui

📜 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 c8bddf2 and 79a5367.

📒 Files selected for processing (1)
  • apps/web/core/components/navigation/use-tab-preferences.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • apps/web/core/components/navigation/use-tab-preferences.ts
🧬 Code graph analysis (1)
apps/web/core/components/navigation/use-tab-preferences.ts (3)
apps/web/core/services/project/project-member.service.ts (1)
  • updateProjectMemberPreferences (87-98)
apps/space/core/store/publish/publish.store.ts (1)
  • workspaceSlug (93-95)
packages/propel/src/toast/toast.tsx (1)
  • setToast (202-222)
⏰ 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). (3)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/web/core/components/navigation/use-tab-preferences.ts (1)

57-64: Error handling now delegated to callers—verify all call sites handle rejections.

The try/catch has been removed from updatePreferences, so any error from updateProjectMemberPreferences will now cause the returned promise to reject. This is acceptable if every caller properly handles rejections. However, note that when memberId is falsy, the function returns early with undefined, causing the promise to resolve successfully even though no update occurred.

Verify that all three callers (handleToggleDefaultTab, handleHideTab, handleShowTab) correctly handle both promise rejections and the case where memberId is falsy.


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.

Copy link
Contributor

Copilot AI left a 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 addresses UI bugs in the revamped navigation system, focusing on styling improvements, better error handling, and icon consistency across navigation components.

Key Changes

  • Added new SetAsDefaultIcon component to replace the generic star icon for setting default tabs
  • Improved layout and styling consistency across navigation components with better Tailwind class usage
  • Enhanced user feedback by adding toast notifications for default tab updates

Reviewed changes

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

Show a summary per file
File Description
packages/propel/src/icons/set-as-default-icon.tsx New icon component for the "set as default" action
packages/propel/src/icons/index.ts Exported the new SetAsDefaultIcon component
apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx Simplified useEffect logic and improved layout classes with w-fit and whitespace-nowrap
apps/web/core/components/navigation/use-tab-preferences.ts Added toast notifications for successful and failed default tab updates
apps/web/core/components/navigation/top-nav-power-k.tsx Improved styling consistency, simplified class conditionals, and added role="button" for accessibility
apps/web/core/components/navigation/tab-navigation-visible-item.tsx Updated context menu to use SetAsDefaultIcon instead of text-only display
apps/web/core/components/navigation/tab-navigation-root.tsx Improved flex layout with better shrink-0 usage and wrapped ProjectActionsMenu in a non-shrinking container
apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx Replaced Star icon with SetAsDefaultIcon, improved hover states with group modifiers, and added tooltips
apps/web/core/components/navigation/project-header.tsx Removed unused cn import and simplified wrapper div classes
apps/web/core/components/navigation/project-actions-menu.tsx Reorganized variable declarations with comment grouping and renamed type to Props
apps/web/core/components/navigation/customize-navigation-dialog.tsx Simplified UI by removing separated enabled/disabled and pinned/unpinned sections, showing all items in a single sortable list with correct checkbox states from preferences
apps/web/ce/components/workspace/sidebar/helper.tsx Added icon support for stickies navigation item
apps/web/ce/components/navigations/top-navigation-root.tsx Improved flexbox layout with flex-1 on sides and shrink-0 in center for better centering of search component

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/core/components/navigation/customize-navigation-dialog.tsx (1)

133-147: Derived isEnabled property is computed but not used in the Checkbox.

The personalItems useMemo computes isEnabled for each item (line 136), but the Checkbox at line 209 accesses personalPreferences.items[item.key]?.enabled directly instead of using item.isEnabled. This inconsistency could lead to subtle bugs if the derivation logic differs.

Consider using the derived property for consistency:

                     <Checkbox
-                      checked={!!personalPreferences.items[item.key]?.enabled}
+                      checked={item.isEnabled}
                       onChange={(e) => togglePersonalItem(item.key, e.target.checked)}
                     />
🧹 Nitpick comments (8)
apps/web/ce/components/workspace/sidebar/helper.tsx (1)

35-36: Stickies sidebar icon wiring is correct and consistent

The "stickies" case returns MultipleStickyIcon with the same size-4 flex-shrink-0 classes as other items, so layout and visual consistency are preserved. As a future improvement, you could narrow key from string to a union of supported keys (including "stickies") for better type safety.

apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx (1)

74-74: Optional: Remove redundant whitespace-nowrap class.

The truncate utility already applies white-space: nowrap, making the explicit whitespace-nowrap redundant. While this doesn't cause issues, removing it would clean up the className.

Apply this diff to remove the redundancy:

-      className={cn("relative h-full flex max-w-48 w-fit whitespace-nowrap truncate", {
+      className={cn("relative h-full flex max-w-48 w-fit truncate", {
apps/web/core/components/navigation/customize-navigation-dialog.tsx (1)

239-242: Consider using the derived isPinned property for consistency.

The workspaceItems array already computes isPinned at line 86. Using item.isPinned instead of re-accessing the preferences would be more consistent with the data model and avoid redundant lookups.

                       <Checkbox
-                        checked={!!workspacePreferences.items[item.key]?.is_pinned}
+                        checked={item.isPinned}
                         onChange={(e) => handleWorkspaceItemToggle(item.key, e.target.checked)}
                       />
apps/web/core/components/navigation/top-nav-power-k.tsx (1)

210-225: New trigger layout and focus wiring are solid; consider tightening role="button" semantics

The relative container + width transition and border handling make the Cmd‑K input feel polished, and registering inputRef with setTopNavInputRef is a nice touch for keyboard shortcuts. Since the wrapper div now has role="button", you might optionally add tabIndex={0} and key handlers for Enter/Space, or drop the role and rely on the actual <input> for accessibility if the wrapper itself doesn’t need to be an interactive control.

apps/web/core/components/navigation/tab-navigation-root.tsx (1)

169-187: Header/rail layout refactor should help with overflow; just sanity‑check narrow widths

Separating ProjectHeader and ProjectActionsMenu into a shrink-0 group and tightening the divider (shrink-0 h-5 w-1) makes the top rail more predictable and should avoid the actions button being clipped. It’s worth verifying on very narrow viewports that the combined shrink-0 header block plus tabs still behave as expected given the overflow-hidden outer container.

apps/web/core/components/navigation/project-actions-menu.tsx (1)

33-40: Remove or actually use isMenuActive/actionSectionRef to avoid dead state

isMenuActive is toggled on the trigger click and reset in onMenuClose, but it isn’t used to control CustomMenu or to drive any styling; likewise, actionSectionRef is never read. That’s extra state/refs with no behavioral effect and can be confusing.

Either wire isMenuActive into the trigger’s classes (e.g., to show an “open” state) or simplify by removing the unused state and callbacks, for example:

-import { useState, useRef } from "react";
+import { useRef } from "react";

-  // states
-  const [isMenuActive, setIsMenuActive] = useState(false);
   // translation
   const { t } = useTranslation();
   // refs
   const actionSectionRef = useRef<HTMLDivElement | null>(null);
   // router
   const navigate = useNavigate();
@@
       customButton={
         <span
           ref={actionSectionRef}
           className="grid place-items-center p-0.5 text-custom-sidebar-text-400 hover:bg-custom-sidebar-background-80 rounded"
-          onClick={() => setIsMenuActive(!isMenuActive)}
         >
           <MoreHorizontal className="size-4" />
         </span>
       }
@@
-      closeOnSelect
-      onMenuClose={() => setIsMenuActive(false)}
+      closeOnSelect

If you intend to keep isMenuActive for styling/analytics, consider adding the relevant usage now to avoid this looking like dead code.

Also applies to: 45-59

apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx (2)

22-27: Update the doc comment to match the current icons/behavior

The comment still refers to “Eye” and “Star” icons, but the implementation now uses Pin for showing hidden tabs and SetAsDefaultIcon for default state. Consider updating this comment so it doesn’t mislead future readers.


47-57: Either style active items or drop itemIsActive from the key

itemIsActive is computed but only used to change the key (...-active vs ...-inactive). That forces unmount/mount cycles when the active state flips without actually changing styles.

Either use itemIsActive to adjust classes (e.g., text/background color) or simplify the key:

-  <Menu.MenuItem key={`${item.key}-overflow-${itemIsActive ? "active" : "inactive"}`} className="p-0 w-full">
+  <Menu.MenuItem key={`${item.key}-overflow`} className="p-0 w-full">

This keeps behavior simpler and avoids unnecessary remounts.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 05b1c14 and 80ce943.

📒 Files selected for processing (13)
  • apps/web/ce/components/navigations/top-navigation-root.tsx (1 hunks)
  • apps/web/ce/components/workspace/sidebar/helper.tsx (2 hunks)
  • apps/web/core/components/navigation/customize-navigation-dialog.tsx (7 hunks)
  • apps/web/core/components/navigation/project-actions-menu.tsx (3 hunks)
  • apps/web/core/components/navigation/project-header.tsx (2 hunks)
  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx (4 hunks)
  • apps/web/core/components/navigation/tab-navigation-root.tsx (1 hunks)
  • apps/web/core/components/navigation/tab-navigation-visible-item.tsx (2 hunks)
  • apps/web/core/components/navigation/top-nav-power-k.tsx (1 hunks)
  • apps/web/core/components/navigation/use-tab-preferences.ts (1 hunks)
  • apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx (1 hunks)
  • packages/propel/src/icons/index.ts (1 hunks)
  • packages/propel/src/icons/set-as-default-icon.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • packages/propel/src/icons/set-as-default-icon.tsx
  • apps/web/ce/components/workspace/sidebar/helper.tsx
  • packages/propel/src/icons/index.ts
  • apps/web/ce/components/navigations/top-navigation-root.tsx
  • apps/web/core/components/navigation/tab-navigation-root.tsx
  • apps/web/core/components/navigation/tab-navigation-visible-item.tsx
  • apps/web/core/components/navigation/use-tab-preferences.ts
  • apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx
  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx
  • apps/web/core/components/navigation/project-header.tsx
  • apps/web/core/components/navigation/project-actions-menu.tsx
  • apps/web/core/components/navigation/customize-navigation-dialog.tsx
  • apps/web/core/components/navigation/top-nav-power-k.tsx
🧠 Learnings (7)
📚 Learning: 2025-10-09T20:42:31.843Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T20:42:31.843Z
Learning: In the makeplane/plane repository, React types are globally available through TypeScript configuration. Type annotations like React.FC, React.ReactNode, etc. can be used without explicitly importing the React namespace. The codebase uses the modern JSX transform, so React imports are not required for JSX or type references.

Applied to files:

  • apps/web/core/components/navigation/tab-navigation-visible-item.tsx
  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx
  • apps/web/core/components/navigation/project-header.tsx
  • apps/web/core/components/navigation/project-actions-menu.tsx
📚 Learning: 2025-10-21T17:22:05.204Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7989
File: apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx:45-46
Timestamp: 2025-10-21T17:22:05.204Z
Learning: In the makeplane/plane repository, the refactor from useParams() to params prop is specifically scoped to page.tsx and layout.tsx files in apps/web/app (Next.js App Router pattern). Other components (hooks, regular client components, utilities) should continue using the useParams() hook as that is the correct pattern for non-route components.

Applied to files:

  • apps/web/core/components/navigation/tab-navigation-visible-item.tsx
  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx
  • apps/web/core/components/navigation/project-header.tsx
  • apps/web/core/components/navigation/project-actions-menu.tsx
📚 Learning: 2025-10-01T15:30:17.605Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7888
File: packages/propel/src/avatar/avatar.stories.tsx:2-3
Timestamp: 2025-10-01T15:30:17.605Z
Learning: In the makeplane/plane repository, avoid suggesting inline type imports (e.g., `import { Avatar, type TAvatarSize }`) due to bundler compatibility issues. Keep type imports and value imports as separate statements.

Applied to files:

  • apps/web/core/components/navigation/project-header.tsx
📚 Learning: 2025-05-14T13:16:23.323Z
Learnt from: vamsikrishnamathala
Repo: makeplane/plane PR: 7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.

Applied to files:

  • apps/web/core/components/navigation/project-header.tsx
📚 Learning: 2025-10-09T22:12:26.424Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T22:12:26.424Z
Learning: When `types/react` is installed in a TypeScript project (which is standard for React + TypeScript codebases), React types (React.FC, React.ReactNode, React.ComponentProps, etc.) are globally available by design. These type annotations can and should be used without explicitly importing the React namespace. This is a TypeScript/DefinitelyTyped feature, not codebase-specific configuration.

Applied to files:

  • apps/web/core/components/navigation/project-header.tsx
  • apps/web/core/components/navigation/project-actions-menu.tsx
📚 Learning: 2025-11-25T10:18:05.162Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.162Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Use copying array methods (`toSorted`, `toSpliced`, `with`) for immutable array operations (TypeScript 5.2+)

Applied to files:

  • apps/web/core/components/navigation/project-actions-menu.tsx
📚 Learning: 2025-09-02T08:14:49.260Z
Learnt from: sriramveeraghanta
Repo: makeplane/plane PR: 7697
File: apps/web/app/(all)/[workspaceSlug]/(projects)/header.tsx:12-13
Timestamp: 2025-09-02T08:14:49.260Z
Learning: The star-us-link.tsx file in apps/web/app/(all)/[workspaceSlug]/(projects)/ already has "use client" directive at the top, making it a proper Client Component for hook usage.

Applied to files:

  • apps/web/core/components/navigation/project-actions-menu.tsx
🧬 Code graph analysis (7)
apps/web/ce/components/workspace/sidebar/helper.tsx (1)
packages/propel/src/icons/workspace/multiple-sticky-icon.tsx (1)
  • MultipleStickyIcon (6-13)
apps/web/ce/components/navigations/top-navigation-root.tsx (2)
apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx (1)
  • WorkspaceMenuRoot (31-218)
apps/web/core/components/navigation/top-nav-power-k.tsx (1)
  • TopNavPowerK (18-289)
apps/web/core/components/navigation/tab-navigation-root.tsx (3)
apps/web/core/components/navigation/project-header.tsx (1)
  • ProjectHeader (13-20)
apps/web/core/components/navigation/project-actions-menu.tsx (1)
  • ProjectActionsMenu (24-114)
apps/space/core/store/publish/publish.store.ts (1)
  • workspaceSlug (93-95)
apps/web/core/components/navigation/tab-navigation-visible-item.tsx (1)
packages/propel/src/icons/set-as-default-icon.tsx (1)
  • SetAsDefaultIcon (3-23)
apps/web/core/components/navigation/use-tab-preferences.ts (1)
packages/propel/src/toast/toast.tsx (1)
  • setToast (202-222)
apps/web/core/components/navigation/project-actions-menu.tsx (1)
packages/i18n/src/hooks/use-translation.ts (1)
  • useTranslation (23-35)
apps/web/core/components/navigation/customize-navigation-dialog.tsx (1)
packages/ui/src/form-fields/checkbox.tsx (1)
  • Checkbox (88-88)
⏰ 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)
  • GitHub Check: Agent
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Build and lint web apps
🔇 Additional comments (10)
apps/web/ce/components/workspace/sidebar/helper.tsx (1)

1-12: MultipleStickyIcon import matches existing icon pattern

Importing MultipleStickyIcon from the same barrel as the other workspace icons is consistent and looks good.

apps/web/core/components/workspace/sidebar/workspace-menu-root.tsx (1)

68-69: LGTM! Correct dependency array for the useEffect.

The consolidated toggle logic is cleaner, and including toggleAnySidebarDropdown in the dependency array correctly satisfies React's exhaustive-deps rule. Since it's from a MobX store hook, it should be stable and won't cause infinite re-renders.

apps/web/core/components/navigation/customize-navigation-dialog.tsx (1)

74-98: LGTM!

The refactored workspaceItems useMemo correctly consolidates the workspace item derivation. The permission filtering, preference mapping with sensible defaults, and sorting by sortOrder are all implemented properly.

apps/web/core/components/navigation/project-header.tsx (1)

13-19: Container layout simplification looks good

Direct Tailwind classes on the header container keep behavior clear and still give the name block room to truncate; no functional or type issues here.

packages/propel/src/icons/index.ts (1)

57-57: New icon export is consistent with existing icon API

Re‑exporting ./set-as-default-icon matches the rest of the icons index pattern and cleanly exposes SetAsDefaultIcon to consumers.

apps/web/core/components/navigation/tab-navigation-visible-item.tsx (1)

3-10: Context menu icon additions and layout look good

Adding SetAsDefaultIcon and PinOff with the shared flex/gap styling gives the menu clearer affordances without altering behavior. Handlers and existing labels are preserved, so the change is safely UI-only.

Also applies to: 53-72

packages/propel/src/icons/set-as-default-icon.tsx (1)

1-23: Icon component implementation is clean and consistent

SetAsDefaultIcon follows the existing icon pattern (typed props, text-current default, spread ...rest onto <svg>), so it should integrate smoothly with the rest of the icon set.

apps/web/ce/components/navigations/top-navigation-root.tsx (1)

17-35: Top nav layout changes create a cleaner left/center/right distribution

Using flex-1 on the workspace and right‑actions containers with a fixed‑width Cmd‑K block (shrink-0) should give a more stable top bar layout across display modes, while the conditional padding via cn keeps the compact look when labels are hidden. No functional concerns here.

apps/web/core/components/navigation/project-actions-menu.tsx (1)

12-22: Props shape and new callbacks look consistent with usage

The new Props type (including onCopyText, onLeaveProject, onPublishModal) matches how the component is used below and keeps the project dependency minimal ({ id: string }). No issues here.

apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx (1)

14-20: Props definition matches component usage

The new Props type (with overflowItems, isActive, tabPreferences, onToggleDefault, onShow) aligns with how the component is used and keeps the surface area clear. No problems here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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 (2)
apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx (2)

69-73: Localize the “Show” label/title for hidden tabs

The "Show" title is hard-coded while the rest of the component uses t(...). For consistency and i18n coverage, route this through the translation hook (and optionally add aria-label for better a11y).

-                    className="invisible group-hover/menu-item:visible p-1 rounded text-custom-text-300 hover:text-custom-text-100 transition-colors"
-                    title="Show"
+                    className="invisible group-hover/menu-item:visible p-1 rounded text-custom-text-300 hover:text-custom-text-100 transition-colors"
+                    title={t("tab_navigation.show")}
+                    aria-label={t("tab_navigation.show")}

(Adjust the key to match your existing namespace.)


75-92: Localize “Clear default” / “Set as default” strings

The default-toggle button uses hard-coded English strings in both tooltipContent and title. Since this component already uses useTranslation, these should go through t(...) for i18n consistency; you can also share the same keys between tooltip and title.

-                <Tooltip tooltipContent={isDefault ? "Clear default" : "Set as default"}>
+                <Tooltip
+                  tooltipContent={
+                    isDefault
+                      ? t("tab_navigation.clear_default")
+                      : t("tab_navigation.set_default")
+                  }
+                >
                   <button
@@
-                    className={cn(
+                    className={cn(
                       "invisible group-hover/menu-item:visible p-1 rounded text-custom-text-300 hover:text-custom-text-100 transition-colors",
                       {
                         visible: isDefault,
                       }
                     )}
-                    title={isDefault ? "Clear default" : "Set as default"}
+                    title={
+                      isDefault
+                        ? t("tab_navigation.clear_default")
+                        : t("tab_navigation.set_default")
+                    }
+                    aria-label={
+                      isDefault
+                        ? t("tab_navigation.clear_default")
+                        : t("tab_navigation.set_default")
+                    }
                   >

(Adjust translation keys to match your locale files.)

🧹 Nitpick comments (1)
apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx (1)

54-56: Avoid encoding active state into the React key

Including itemIsActive in the key will unmount/remount the menu item whenever active state changes, which is usually unnecessary and can reset internal state/DOM. A stable key based only on item.key should be enough.

-          <Menu.MenuItem key={`${item.key}-overflow-${itemIsActive ? "active" : "inactive"}`} className="p-0 w-full">
+          <Menu.MenuItem key={`${item.key}-overflow`} className="p-0 w-full">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80ce943 and c8bddf2.

📒 Files selected for processing (2)
  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx (4 hunks)
  • apps/web/core/components/navigation/use-tab-preferences.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/core/components/navigation/use-tab-preferences.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx
🧠 Learnings (2)
📚 Learning: 2025-10-09T20:42:31.843Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T20:42:31.843Z
Learning: In the makeplane/plane repository, React types are globally available through TypeScript configuration. Type annotations like React.FC, React.ReactNode, etc. can be used without explicitly importing the React namespace. The codebase uses the modern JSX transform, so React imports are not required for JSX or type references.

Applied to files:

  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx
📚 Learning: 2025-10-21T17:22:05.204Z
Learnt from: lifeiscontent
Repo: makeplane/plane PR: 7989
File: apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx:45-46
Timestamp: 2025-10-21T17:22:05.204Z
Learning: In the makeplane/plane repository, the refactor from useParams() to params prop is specifically scoped to page.tsx and layout.tsx files in apps/web/app (Next.js App Router pattern). Other components (hooks, regular client components, utilities) should continue using the useParams() hook as that is the correct pattern for non-route components.

Applied to files:

  • apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx
⏰ 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: Build and lint web apps
  • GitHub Check: Analyze (javascript)

@pushya22 pushya22 merged commit eddf80a into preview Nov 26, 2025
6 checks passed
@pushya22 pushya22 deleted the fix/navigation-ui branch November 26, 2025 13:21
ClarenceChen0627 pushed a commit to ClarenceChen0627/plane that referenced this pull request Dec 5, 2025
ClarenceChen0627 pushed a commit to ClarenceChen0627/plane that referenced this pull request Dec 5, 2025
ClarenceChen0627 pushed a commit to ClarenceChen0627/plane that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants