Skip to content

fix: add a NoSelectedProjectView and ensure it doesn't error when project not found - #8931

Merged
ZxBing0066 merged 2 commits into
developfrom
fix/invariant-project-error
Aug 5, 2025
Merged

ZxBing0066 merged 2 commits into
developfrom
fix/invariant-project-error

Conversation

@ZxBing0066

@ZxBing0066 ZxBing0066 commented Aug 4, 2025

Copy link
Copy Markdown
Member

INS-979

Changes

  • add a NoSelectedProjectView, but it's only for a transition state, so you wouldn't see it.
  • redirect to the initial route instead of /organization/${organizationId}
  • remove unnecessary invariants of the project to avoid errors

@ZxBing0066
ZxBing0066 requested a review from CurryYangxx August 4, 2025 05:32
@ZxBing0066 ZxBing0066 self-assigned this Aug 4, 2025
Comment on lines +52 to +54
// When redirect to `/organizations/:organizationId`, it sometimes doesn't reload the index loader, so manually redirect to the initial route for the organization
const initialOrganizationRoute = await getInitialRouteForOrganization({ organizationId });
return redirect(initialOrganizationRoute);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ZxBing0066
ZxBing0066 enabled auto-merge (squash) August 5, 2025 05:00
@ZxBing0066
ZxBing0066 merged commit 39d948c into develop Aug 5, 2025
14 checks passed
@ZxBing0066
ZxBing0066 deleted the fix/invariant-project-error branch August 5, 2025 05:14
RoamingLost pushed a commit to RoamingLost/insomnia that referenced this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants