fix(webapp): the palette always offers a way back (BEA-52) - #102
Merged
ssowonny merged 2 commits intoAug 2, 2026
Merged
Conversation
⌘K on a path that doesn't resolve degraded to History ×2 and Sign out — the tree-derived entries are gone on a dead route and the switcher lists only OTHER projects, so on a single-project hub the palette, which is the natural escape hatch there, was the one surface with no way out. Four static entries now lead the candidate list whenever hub && project: Go to project root, Dashboard, Installation, Settings — the same four destinations (and icons) the sidebar has. They're independent of the tree and of whether the path resolves, and each navigates to a real VIEW_ROUTES URL, so a reload renders the same view. Panels only close on a location change, so selecting the page you're already on closes them explicitly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ssowonny
deleted the
bea-52-ph-scan-bug-command-palette-on-a-not-found-route-offers-no
branch
August 2, 2026 23:16
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.
TL;DR
Browser.tsx, "Check again" only) — out of scope here, still the obvious follow-up.Fixes BEA-52.
Before / after
⌘K on
/<project-id>/does-not-exist.md:The seeded harness has a tree, so "before" is less bare than the reported case (one project, empty tree → three entries) — but the four ways back are missing either way.
And on a brand-new project with nothing in it, which is where the tree-derived entries can't help at all:
Every entry lands on a real URL that renders the same view after a reload (Settings shown; root/dashboard/install verified the same way):
What changed
paletteCandidates(internal/webapp/frontend/src/apps/Browser.tsx) built its list from path-scoped actions, whole-project history, other projects, sign out, and the tree. None of those is a view route, so on a dead route the two tree-derived sources vanish and, on a single-project hub, so does the switcher.Four static entries now go first, gated on
hub && projectonly — the same conditionProjectNavuses, and independent ofloaded/the tree:folder/<project-id>dashboard/<project-id>/dashboardterminal/<project-id>/installgear/<project-id>/settingsThey're first because an empty query scores every candidate 0 and the sort is stable. Icons are the ones
ProjectNavalready uses for the same destinations. Every entry goes throughurlForView/navigate— never panel state — and closes an open admin panel explicitly, sinceHubApponly clears panels on a location change and picking the page you're already on isn't one.History: whole projectwas left exactly where it was: same destination as the sidebar's History, so no second entry.Deviations from the plan
Two, both small:
type ViewNameand wrappedurlForViewin ago(v: ViewName)helper. Passing the URL string straight to ago(to: string)helper covers the project-root case too and needs no new import — same four URLs.#palette-results. That id never reaches the DOM: cmdk'sListoverwritesidwith its own generated one (a pre-existing quirk inPalette.tsx, untouched here). The test uses#palette [cmdk-list]instead, and there's a comment saying why.Testing
go build ./...,go vet ./...,go test ./...— all pass.npm run e2e— 98 passed, including the newpalette on a dead route still offers the way back(e2e/browse.spec.ts): asserts the four entries on/<wiki-id>/does-not-exist.md, asserts exactly one whole-project History entry, selects Dashboard, waits for/<wiki-id>/dashboard, reloads, asserts the treemap renders.frontend/check-dist.sh—internal/webapp/staticis fresh (rebuilt and committed).No architecture diagram change:
PaletteandBrowserare already drawn inarchitecture/webapp-frontend.mdand no type or relationship changed.Build session
(only works on this machine)