fix(frontend): restore engine flavor actor navigation after top bar redesign#5242
fix(frontend): restore engine flavor actor navigation after top bar redesign#5242NicholasKissel wants to merge 1 commit into
Conversation
…igation after top bar redesign
|
🚅 Deployed to the rivet-pr-5242 environment in rivet-frontend
|
Code ReviewPR: This PR correctly fixes the local inspector ( Correctness / Potential Bugs
The component is only mounted inside
Loader early-exit skips In Code Quality / StyleDuplicated search-extraction block between Both components in
The cloud counterpart renders a skeleton during pending transitions even when an actor is selected. The engine variant returns Unsafe This bypasses TanStack Router's typed search params — a pattern that exists in the cloud index route too, but is a candidate for cleanup when the route search schema is tightened. Architecture / Convention ComplianceCorrect feature flag gating ✓ — Loader prefetch logic is correct ✓ — When Breadcrumb slash separator ✓ — "New Namespace" button wiring ✓ — Navigating to SummaryThe fix is correct and ready to merge. The items above are either low-risk edge cases or style inconsistencies inherited from surrounding pre-existing code, none of which are blockers. Priority follow-ups (can be separate PRs):
|
Problem
The local inspector (
rivet-engineatlocalhost:6420/ui) is unusable when the route can't auto-select an actor instance. It dead-ends on "No Actor Name selected. Select an Actor Name from the list on the left." with no list anywhere on the page.The top bar redesign (#5064) removed the old left sidebar and gave the cloud flavor replacements (the
ActorsGridnamespace landing + breadcrumb segment popovers), but the engine flavor never got them:/ns/$namespace/index route still auto-redirected into the first build's first actor and fell through to a dead-end empty state when there was none.ActorsGridunconditionally calleduseCloudNamespaceDataProvider(), which throws outside the cloud route tree, so it couldn't be reused.Fix
Mirror the cloud flavor in the engine flavor:
routes/_context/ns.$namespace/index.tsx— render theActorsGridlanding when no actor name is selected (with a skeleton pending component), and only auto-select the first instance of the selected name. This also fixes a latent bug where selecting a name redirected into the first build's actor instead of the selected one.app/actors-grid.tsx— make the grid engine-safe: move the managed-pool Logs button and the Deployments section behindfeatures.computewrappers so cloud-only data provider hooks never mount in the engine flavor.app/context-switcher.tsx— add an engine branch to the inline context switcher: a namespace segment popover (find/switch/create, backed by the engine data provider, preserving the leaf route and clearing the namespace-scoped actor selection) plus the existingActorBreadcrumbSegment.components/actors/actors-list.tsx— replace the stale "list on the left" copy with a "Browse Actor Names" button that navigates to the grid landing.Verification
Stood up the engine flavor end-to-end (published
rivet-enginebinary on 6420, rivetkit fixture app registeringcounterwith 2 instances andchatRoomwith 0, dev server in engine flavor, driven by Playwright):/ns/defaultshows the grid with both actor names.chatRoom(zero instances — the previously broken case) shows the "No actors created" quickstart instead of the dead-end.counterauto-opens its first instance.Default / counterpopovers both work (namespace list was previously an empty box).pnpm check-typespasses, biome findings on touched files are identical to main, and the productionbuild:engineembedded build compiles.🤖 Generated with Claude Code