fix(dashboard): guard res.ok on the knowledge-graph fetch
The knowledge-graph.json load was the only data fetch in App.tsx that
called res.json() without first checking res.ok, unlike the sibling
meta.json / config.json / diff-overlay.json / domain-graph.json fetches
in the same file.
When the dev server returns a 404 JSON error body (e.g. the graph file is
not found because GRAPH_DIR is unset), that error object was parsed and
passed to validateGraph(), which then failed project-metadata validation
and surfaced the misleading "Invalid knowledge graph: Missing or invalid
project metadata" instead of the real cause.
Guard res.ok and surface the server's actual error message
("No knowledge graph found. Run /understand first."), routing to the
existing .catch so the user sees an actionable message.
Refs #288, #406.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> D
Daniel Zivkovic committed
63a66ae5bb0c39631242b828cb54c384804facaa
Parent: fbc1b82