console: pin the Admin nav group to the bottom of the side panel - #38098
Closed
jubrad wants to merge 4 commits into
Closed
console: pin the Admin nav group to the bottom of the side panel#38098jubrad wants to merge 4 commits into
jubrad wants to merge 4 commits into
Conversation
The environment-not-ready flow used a stripped custom layout with no navigation, so users without an enabled environment could not see or reach account-scoped pages like App Passwords, License, or Usage & Billing. A blocked or trial-expired organization, by contrast, already rendered the full BaseLayout with those links visible, making the two states inconsistent. Render EnvironmentNotReadyRoutes inside BaseLayout instead. The nav already handles the no-environment state: region-scoped items hide via HideIfEnvironmentDisabled while account-scoped Admin items carry forceShow, so new users now get the same chrome as everyone else. The logo links back to the enable-region flow while no environment is ready. The welcome dialog is suppressed in this flow via a new BaseLayout prop. It pops the moment a region becomes healthy and would cover the flow's own region-ready affordances, blocking the tutorial's "Open console" button (caught by the e2e suite). The region-ready toast is preserved in a headless RegionReadyToast component. Its unmount cleanup reads the unstable toast reference through a ref instead of an eslint-disable, which the react-compiler lint rule no longer accepts. The custom layout file is deleted. Adds tests asserting the Admin nav group renders on the enable-region page with no enabled environment while region-scoped items stay hidden, and that the welcome dialog stays suppressed once a region is healthy. The test provider wrapper now nests ToastProvider inside the router to match the app, so toasts can render router Links. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jubrad
force-pushed
the
console-nav-admin-bottom
branch
from
August 7, 2026 01:20
bb23441 to
26cf463
Compare
The environment health probe treated a SQL-level error response as an immediate "crashed", while connection failures got a grace window of maxBootDuration after the region was enabled. A freshly provisioned environmentd can respond with errors before it has fully initialized, and the region API only reports provisioning state, not whether environmentd is serving queries, so the probe is the only readiness signal. Since isEnvironmentReady counts "crashed" as ready and EnableRegion routes crashed environments to the console home, one transient error during boot dropped users into a console that could not serve queries yet. Treat SQL errors like connection failures: "booting" within the boot window, "crashed" after it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jubrad
force-pushed
the
console-nav-admin-bottom
branch
from
August 7, 2026 02:03
26cf463 to
d151ae0
Compare
The nav in the environment-not-ready flow was gated on environment health, so a transient health reading could flash the full sidebar and object-creation entry points while nothing was usable yet. Gate it on the flow instead: a new accountOnly nav mode renders only the account-scoped (forceShow) items and hides the Create New button, and EnvironmentNotReadyRoutes turns it on. The full sidebar appears only once the user leaves the flow for a working console. Also restyle the tutorial slides to center in the layout's content area like the enable-region page, instead of the absolute viewport positioning they used under the old standalone layout. Adds a test asserting the nav stays account-only in this flow even when the environment reports crashed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Admin group sat directly below the region-scoped nav items, so whenever those items were hidden (no enabled environment, or a blocked organization) it slid up to the top of the panel. Pin it to the bottom instead, so account-scoped links keep a stable position regardless of environment state. Also hide the Create New button while no environment is ready. All of its actions are disabled in that state, so it only added noise to the pared-down panel. Adds NavBar tests for the Admin group ordering and for the pared-down no-environment state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jubrad
force-pushed
the
console-nav-admin-bottom
branch
from
August 7, 2026 02:29
d151ae0 to
ffe172c
Compare
5 tasks
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.
Note
Stacked on #38087 — this diff includes that PR's commit until it merges. Review only the latest commit here.
Motivation
The Admin nav group sat directly below the region-scoped items, so whenever those were hidden (no enabled environment, or a blocked organization) it slid up to the top of the side panel. Users without an environment also saw a "Create New" button whose actions were all disabled.
Changes
Tests
NavBartests asserting the Admin group renders after the region-scoped items with a healthy environment, and that the create button and region items are hidden without one.Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.🤖 Generated with Claude Code