From 1e387c270c6a106617df5d235828039b0257ceed Mon Sep 17 00:00:00 2001 From: artheru Date: Wed, 10 Jun 2026 11:09:09 +0800 Subject: [PATCH] docs: land on Quickstart instead of an empty pane (0.76.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - visiting docs.amerc.ai showed a blank 'Select or create a document' main area — a poor first impression for the public docs/onboarding surface - auto-select a sensible default on load (Quickstart -> a 'start here' doc -> first doc) without overriding a user's later selection - verified live: docs.amerc.ai lands on Quickstart, sidebar highlights it --- index.html | 2 +- package.json | 2 +- src/DocsApp.jsx | 7 ++++++- src/Scene2D.jsx | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index f4d7906..a742a50 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + diff --git a/package.json b/package.json index dd43e29..668da45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amerc-site", - "version": "0.75.0-esc", + "version": "0.76.0-docsland", "private": true, "type": "module", "scripts": { diff --git a/src/DocsApp.jsx b/src/DocsApp.jsx index 0d4e6ef..810136b 100644 --- a/src/DocsApp.jsx +++ b/src/DocsApp.jsx @@ -33,7 +33,12 @@ function DocsWorkspace({ canEdit }) { const renderRef = useRef(null); const loadList = useCallback(async () => { - try { const d = await api('/docs'); setDocs(d.docs || []); } catch (e) { setErr(e.message); } + try { + const d = await api('/docs'); const list = d.docs || []; setDocs(list); + // land on a useful doc instead of an empty "select a document" + const def = list.find((x) => /quickstart/i.test(x.title)) || list.find((x) => x.folder === 'start here') || list[0]; + if (def) setSel((cur) => cur ?? def.id); + } catch (e) { setErr(e.message); } }, []); useEffect(() => { loadList(); }, [loadList]); useEffect(() => { diff --git a/src/Scene2D.jsx b/src/Scene2D.jsx index c2ce3c3..2803f25 100644 --- a/src/Scene2D.jsx +++ b/src/Scene2D.jsx @@ -10,7 +10,7 @@ import { api } from './api.js'; const Menu = ({ size = 20 }) => (); const X = ({ size = 20 }) => (); -const RELEASE = '0.75.0-esc'; +const RELEASE = '0.76.0-docsland'; const NAV = [ { id: 'home', label: 'Tavern' },