Fix: New navigation sidebar UI issues#9958
Draft
cwangsmv wants to merge 7 commits into
Draft
Conversation
✅ Circular References ReportGenerated at: 2026-05-27T03:00:07.762Z Summary
Click to view all circular references in PR (19)Click to view all circular references in base branch (19)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses multiple UX and behavior issues introduced with the new project navigation sidebar, including workspace drag/drop behavior, pinned/empty-node visuals, sidebar toggling, and preventing stale navigations during rapid node switching.
Changes:
- Prevent stale/overlapping navigations by ignoring outdated async tab builds.
- Add workspace reordering (local/manual) + restrict which workspace scopes can be moved across projects.
- Centralize sidebar toggle handling (menu/shortcut/main-process event) and adjust several sidebar UI details (pinned section, empty nodes, dropdowns).
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia/src/ui/hooks/use-insomnia-tab.ts | Adds a navigation “generation” guard to avoid stale async navigations. |
| packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/workspace-node.tsx | Minor prop ordering/formatting for workspace node props. |
| packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/use-sidebar-drag-and-drop.tsx | Adds cross-project scope restrictions and introduces a callback for workspace reordering. |
| packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/request-node.tsx | Adjusts pinned request UI and removes toggle button for pinned rows. |
| packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/project-node.tsx | Switches to new sidebar-specific project dropdown and wires workspace sort props. |
| packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/project-navigation-sidebar.tsx | Implements workspace sorting/reordering state, pinned section behavior tweaks, and filtering adjustments. |
| packages/insomnia/src/ui/components/sidebar/project-navigation-sidebar/empty-node.tsx | Updates empty-node spacing/typography and “Create” button visuals. |
| packages/insomnia/src/ui/components/modals/workspace-duplicate-modal.tsx | Navigates after duplicate via fetcher result and closes modal accordingly. |
| packages/insomnia/src/ui/components/dropdowns/sidebar-workspace-dropdown.tsx | Fixes className spacing when concatenating optional item className. |
| packages/insomnia/src/ui/components/dropdowns/sidebar-project-dropdown.tsx | New dropdown providing project actions + workspace sort controls. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.move.tsx | Changes duplicate/move action to return data instead of redirecting. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.test.tsx | Removes per-route sidebar toggle shortcut wiring. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.spec.tsx | Removes per-route sidebar toggle shortcut wiring. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.mock-server.tsx | Removes per-route sidebar toggle wiring (handled by parent route). |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.environment.tsx | Removes per-route sidebar toggle wiring (handled by parent route). |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.tsx | Removes per-route sidebar toggle shortcut wiring. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.tsx | Centralizes sidebar toggle handling via panel imperative API + keyboard shortcuts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+446
to
+452
| // Show pinned collection children when the workspace is expanded | ||
| const pinnedCollectionChildren = shouldHideCollectionChildren | ||
| ? [] | ||
| : // Filter out pinned requests by pinned attribute. Besides, when there is an active filter, also filter out un-matched requests. | ||
| collectionChildren.filter( | ||
| child => child.pinned && !(projectNavigationSidebarFilter ? child.hidden : false), | ||
| ); |
Comment on lines
+19
to
+20
| // WhiteList workspace scopes that are allowed to be moved across projects. | ||
| const allowCrossProjectDropWorkspaceScope: string[] = [ |
Comment on lines
+360
to
+366
| sortedWorkspaces = localOrder | ||
| ? [...workspaces].sort((a, b) => { | ||
| const ai = localOrder.indexOf(a._id); | ||
| const bi = localOrder.indexOf(b._id); | ||
| return (ai === -1 ? Infinity : ai) - (bi === -1 ? Infinity : bi); | ||
| }) | ||
| : [...workspaces].sort((a, b) => sortMethodMap['created-asc'](a, b)); |
| FlatItem, | ||
| { kind: 'workspace' | 'collectionChild' | 'project' | 'emptyFolder' | 'emptyProject' | 'emptyCollection' } | ||
| >; | ||
| // WhiteList workspace scopes that are allowed to be moved across projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
INS-2605