Skip to content

console: pin the Admin nav group to the bottom of the side panel - #38098

Closed
jubrad wants to merge 4 commits into
MaterializeInc:mainfrom
jubrad:console-nav-admin-bottom
Closed

console: pin the Admin nav group to the bottom of the side panel#38098
jubrad wants to merge 4 commits into
MaterializeInc:mainfrom
jubrad:console-nav-admin-bottom

Conversation

@jubrad

@jubrad jubrad commented Aug 6, 2026

Copy link
Copy Markdown
Member

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

  • Pin the Admin group to the bottom of the nav menu (desktop and mobile), so account-scoped links keep a stable position regardless of environment state.
  • Hide the "Create New" button while no environment is ready, paring the panel down to just the account-scoped links.

Tests

  • Adds NavBar tests 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

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

🤖 Generated with Claude Code

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
jubrad force-pushed the console-nav-admin-bottom branch from bb23441 to 26cf463 Compare August 7, 2026 01:20
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
jubrad force-pushed the console-nav-admin-bottom branch from 26cf463 to d151ae0 Compare August 7, 2026 02:03
jubrad and others added 2 commits August 6, 2026 21:26
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>
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.

1 participant