feat(dashboard): support ?view=domain deep-link#496
Open
vector-field wants to merge 1 commit into
Open
Conversation
Opening the dashboard always lands on the structural view; reaching the domain flow view requires manually clicking the Domain toggle. This adds a `?view=domain` URL parameter so the dashboard can open directly on the domain view (useful for bookmarks, shared links, and tooling that launches the dashboard pointed at a domain graph). The switch is applied in the domain-graph fetch handler rather than at init because the domain view cannot render until the domain graph is loaded into the store — applying it earlier would fall back to structural. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Adds a
?view=domainURL parameter to the dashboard so it can open directly on the domain flow view instead of always starting on the structural graph.Why
Today the dashboard always loads on the structural view, and the only way to reach the domain view is to click the Domain toggle in the toolbar. That makes it impossible to bookmark or share a link that lands on the domain flow, or to have tooling launch the dashboard pointed straight at a domain graph. After running
/understand-domain, jumping to the domain view is a common next step.How
In the
domain-graph.jsonfetch handler inApp.tsx, after the domain graph is set in the store, check for?view=domainand switchviewModeto"domain".The switch is intentionally applied in the fetch handler, not at init — the domain view can't render until the domain graph is loaded into the store (
Appfalls back to structural otherwise). It also composes cleanly with the existingtokenparam, which is stripped from the URL separately whileviewpersists.Notes
useDashboardStoreis already used the same way a few lines above for theknowledgeview.domainis handled here sincestructuralis the default andknowledgeis auto-selected for knowledge graphs; happy to extend to a generalviewswitch if preferred.🤖 Generated with Claude Code