feat(viz): centered cold-start empty state instead of a black void#28
Merged
Conversation
A brand-new user (no learned knowledge yet) opening `plex serve` saw the Knowledge tab as a black canvas with only a tiny corner note — reads as broken. Render a centered empty state with the store's note + a graph-specific call-to-action when a payload has 0 nodes: - knowledge → "Seed lessons from your merged PR history with `plex analyze`, or just review — Plex learns from every finding you accept." - lineage → "Run a review and the comment → finding → verdict history will appear here." - code → "Index a repo (`plex index`) or pick one above…" Pure client-side, textContent-only (XSS-safe), pointer-events:none so it never blocks the canvas. Toggled in draw() on nodes.length === 0. Found while finishing the cold-start track: the day-one *review* itself is strong (verified on a fresh empty-knowledge repo — first-principles caught a planted null-deref + a swallowed- error bug the deterministic layer can't see, alongside the 3 deterministic findings), but the day-one *viz* first impression was weak. This closes that gap. Tests: ui.test asserts the empty-state element + showEmptyState + the analyze CTA. Co-Authored-By: Claude Opus 4.8 (1M context) <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 changed
A brand-new user (no learned knowledge yet) opening
plex servesaw the Knowledge tab as a black canvas with only a tiny corner note — it reads as broken. Now an empty graph renders a centered empty state with the store's note + a graph-specific call-to-action:plex analyze, or just review — Plex learns from every finding you accept."plex index) or pick one above…"Pure client-side,
textContent-only (XSS-safe),pointer-events:noneso it never blocks the canvas; toggled indraw()whennodes.length === 0.Why (finishing the cold-start track)
While verifying the day-one experience I confirmed the day-one review is strong — on a fresh empty-knowledge repo, the reviewer caught a planted null-deref-before-the-guard and a swallowed-error → silent
undefinedbug (both first-principles, beyond the deterministic layer) alongside the 3 deterministic findings, with no learned history. But the day-one viz first impression was a blank screen. This closes that gap so the cold-start looks intentional, not empty.plex analyze, or just review" CTAHow to test
pnpm test:unit(552) —ui.testasserts the#emptyelement,showEmptyState, and the analyze CTA.pnpm typecheck+pnpm buildgreen.PLEX_KNOWLEDGE_DIR=$(mktemp -d) plex serve→ Knowledge tab shows the centered empty state.🤖 Generated with Claude Code