fix(den-web): preserve hook order through dashboard redirects - #5652
Merged
Merged
Conversation
OrgDashboardShell called its library hooks after the organization-picker and onboarding early returns. Switching to the picker after the auth redirect skipped hooks from the previous render and caused React error 300. Keep the hooks unconditional and disable sidebar requests on full-page views. Add an organization-selection regression journey and enforce rules-of-hooks in CI. Signed-off-by: Laurent De Marez <laurent@demarez.org>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
The organization picker uses a cookie-authenticated Better Auth endpoint, but seed.web only supplies a bearer token. Sign in once, seed its cookie alongside its token, and probe that same session's active organization. Signed-off-by: Laurent De Marez <laurent@demarez.org>
Preserve dev's unused-dependency removals alongside the new ESLint hook-order dependencies in the lockfile. Signed-off-by: Laurent De Marez <laurent@demarez.org>
Collaborator
Author
|
CI is currently blocked by the ongoing GitHub Actions runner-assignment incident: https://stspg.io/c11dc9nb1zdq. Warden and evidence checks both failed to acquire a hosted runner on the initial run and one retry; no code steps ran in those cancelled jobs. The organization-selection regression proof passed on 6b3b425. Deferring further retries until runner availability recovers. |
This branch is waiting to be deployed
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.
What is this about?
Fix the Den web crash when choosing an organization after sign-in or returning from setup.
Fixes ENG-646.
What problem does it solve?
People could hit a client-side exception during navigation and have to reload to continue.
What was the situation before?
Opening Den with multiple organizations could redirect to the dashboard and crash instead of showing the organization chooser: “Rendered fewer hooks than expected.”
How is this implemented?
org-dashboard-shell.tsx.useLibraryModelsdisable requests while sidebar content is hidden, without skipping hooks.What else changed?
next lintcommand with focused ESLint rules-of-hooks enforcement, add its dependencies, and run it in CI.Release note
Choosing an organization after sign-in and returning from setup no longer crash the Den dashboard.
Evidence
evals/specs/org-selection.e2e.test.ts— before: “Rendered fewer hooks than expected”; after: the chooser opens and selection or setup completion returns to the dashboard without a reload.