* 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>
Two independent papercuts in the circular reference check, both hit while
investigating a failure on another PR.
`npm run check-cycle-references` could not run on Windows at all. It spawned
the extensionless `node_modules/.bin/depcruise` shim through `execFileSync`,
which Windows cannot launch; the `.cmd` sibling does not help either, since
Node >=18 refuses to spawn `.cmd` without a shell (CVE-2024-27980). Resolve
dependency-cruiser's own entry point and run it with `process.execPath`
instead — no shell, works everywhere.
The check also fails on baseline drift (cycles recorded in the baseline that
no longer exist), which is correct: the baseline is a ratchet, and leaving a
fixed cycle in it would silently keep permitting its reintroduction. But CI
labelled every non-success outcome "New circular references detected", so a PR
that *removed* two cycles was reported as having added some. That cost real
debugging time.
Give the script distinct exit codes — 1 for a new cycle, 2 for drift alone —
and have the workflow capture and map them to separate messages. The failure
behaviour is unchanged; only the wording is now accurate. Renamed the final
step to match what it actually gates on.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
## Summary
- Replaces the madge-based `check-cycle-references` with a `dependency-cruiser`-based check, cruised once per npm workspace package.
- Keeps the checker, dependency-cruiser config, and known-cycle baseline together under `scripts/circular-references/`.
- Uses a committed baseline to grandfather existing cycles while failing on new cycles and stale baseline entries.
- Cleans the existing `insomnia-inso` type cycle by using `insomnia-data`'s `AllTypes` instead of importing the database container type.
- CI explicitly uses Bash for correct `tee`/pipeline failure propagation, safely handles skipped checks, and posts a PR report.
- Dropped `madge`/`.madgerc`, added `dependency-cruiser`.