Repository navigation
An empty page says which step comes next - #321
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
WaylandYang
force-pushed
the
feat/an-empty-state-points-at-the-next-step
branch
from
September 4, 2026 20:59
efb31eb to
15e346e
Compare
10 tasks
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.
Part of #313 — the half that works every time, not only the first.
That issue proposes two things: a dismissible first-run checklist, and empty states that connect to the next action. This is the second one. The checklist only helps once; an empty state helps on the third knowledge base, and the first time someone opens Search. It also needs no per-user progress to store — every page already had the data, it just never asked.
The actual defect
Each page assumed it was already set up, so each said one fixed thing:
GET /kbs/{id}/readinessis the one judgement all four now share:has_chat_model,documents,processing,failed,entities. Viewer-level, because anyone who can see a base should know whether it is empty or still working. Booleans and counts only — the model flag comes from workspace settings, which need workspace admin to read, so this says whether one is configured and never what it is.Chat deliberately gates on the model alone. An empty base still answers from mounted databases and memory; a missing model is the only state where nothing can be asked.
The copy
Old: "The graph is empty. Configure a chat model under Administration → Models first, then upload documents in the Library — entities and relations are extracted automatically."
One sentence carrying a state, two actions and a paragraph of theory. The rule now is state in one line, action on the button, no theory — someone staring at an empty page wants to know where to click, and the theory belongs in the docs.
Actions appear only for those who can take them, which is why the second row has no button.
The ontology page needed a rewrite, not an addition. Its empty schema read "No schema to display yet. Add a class on the left, or import an OWL/RDFS/Turtle file to get started" — presenting a class or an OWL file as the price of entry, which is precisely the barrier #313 describes. It now says "No classes yet. Extraction adds them as documents arrive", which is also what actually happens (0003 grows the ontology from the corpus, on by default). The New class and Import buttons stay in the rail for anyone who wants them. My first attempt added a reassuring second line underneath; two sentences arguing with each other is worse than one correct one, so it went.
Library is untouched. It was already right: whoever can upload sees the drop zone, which is the action itself, and whoever cannot sees one line. Changing it for symmetry would have been noise.
Verified
Walked all four states in a browser against a fresh install, advancing the base one step at a time and watching each page follow: no model → model configured → two documents in flight → extraction finished with an empty graph. Screenshots in the thread below.
cargo fmt --check,cargo clippy -D warnings,cargo test --workspacewithUTOPIA_TEST_REQUIRE_DB=1, andpnpm buildall pass.Found while testing, not fixed here
The
Generalbase created at registration installs no ontology pack, while creating a base through the UI installs the ones you tick (schema.org by default). So the first base of every deployment — the one a new user lands in — starts with an empty vocabulary. Filed separately; it is a cause of what #313 describes rather than a copy change.🤖 Generated with Claude Code