mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-06 21:14:38 -04:00
* refactor(sidebar): own the project shell in one layout route `/organization/:organizationId/project` and `/organization/:organizationId/project/:projectId` each rendered their own copy of the project shell — panel group, navigation sidebar, project modal — through two sidebar components, `ProjectNavigationSidebar` and `EmptyProjectNavigationSidebar`. Because the two are sibling route modules, gaining or losing the last project in an organization swapped one for the other and remounted the entire sidebar. Anything the sidebar owned was dropped at that moment. Most visibly, a Konnect sync started from an empty organization lost its AbortController as soon as it created the first project: the Cancel button vanished, the sync kept running invisibly, and disconnecting afterwards deleted projects the still-running sync then recreated. Introduce `organization.$organizationId.project.tsx` as a parent layout owning the shell. flatRoutes nests both existing children under it automatically, so no route files are renamed. The children keep only what needs the active project: the git file issues provider and the outlet context. The two sidebars collapse into one that already handled an empty project list. Also move `KonnectSyncResultPanel` out of the `showKonnectSyncIntro` ternary's else branch. It hosts the Konnect settings modal, and the intro branch's "Configure" button is what opens it, so nesting it there made that button set state nothing rendered — leaving an organization with Konnect projects but no PAT unable to reconnect, across restarts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore: refresh circular reference baseline The layout refactor removed two cycles rooted at `organization.$organizationId.project.$projectId.tsx`, which no longer imports the navigation sidebar or the sync bar: ...project.$projectId.tsx -> project-navigation-sidebar.tsx -> project-node.tsx -> insomnia-event-stream-context.tsx ...project.$projectId.tsx -> sync-bar.tsx `check-cycle-references` fails on baseline drift as well as on new cycles, so the recorded baseline has to drop them. No cycles were added — the regenerated file differs from the previous one by exactly these two deletions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor(routes): drop unused project index loader data `ProjectIndexLoaderData` was exported but referenced nowhere, and nothing read this route's loader data. The returned `{ projects, projectsCount }` was also unreachable as anything but `{ [], 0 }` — the loader redirects whenever the organization has projects, so the only way to reach the return is with none. Return null instead and drop the interface. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>