From b0e998cf87a1df65a5a94918b0ec87b36546d5fc Mon Sep 17 00:00:00 2001 From: Akash Goenka Date: Thu, 27 Aug 2026 01:01:00 +0530 Subject: [PATCH 1/4] feat(site): live demo, graph, and notebook united under one Demo nav Ties find/gs/capture/recall into one continuous before/after narrative at /demo/, adds a real live /notebook/ viewer (same generate-and-commit pattern as /graph/, plus a home-link placeholder mirroring the graph template so both standalone pages can navigate back to the site), and a /live/ hub page linking out to all three. Nav collapses Demo/Graph/ Notebook into one dropdown and drops npm (kept in the footer). Co-Authored-By: Claude Sonnet 5 --- scripts/kb-viewer/build-site-page.mjs | 42 ++ site-astro/src/components/Footer.astro | 3 +- site-astro/src/components/Nav.astro | 36 +- site-astro/src/graph-page.html | 2 +- site-astro/src/notebook-page.html | 735 ++++++++++++++++++++++ site-astro/src/pages/demo/index.astro | 282 +++++++++ site-astro/src/pages/index.astro | 23 +- site-astro/src/pages/live/index.astro | 104 +++ site-astro/src/pages/notebook/index.astro | 22 + site-astro/src/styles/landing.css | 50 +- src/kb/view-template.ts | 2 +- src/kb/view.ts | 2 + 12 files changed, 1252 insertions(+), 51 deletions(-) create mode 100644 scripts/kb-viewer/build-site-page.mjs create mode 100644 site-astro/src/notebook-page.html create mode 100644 site-astro/src/pages/demo/index.astro create mode 100644 site-astro/src/pages/live/index.astro create mode 100644 site-astro/src/pages/notebook/index.astro diff --git a/scripts/kb-viewer/build-site-page.mjs b/scripts/kb-viewer/build-site-page.mjs new file mode 100644 index 0000000..063c147 --- /dev/null +++ b/scripts/kb-viewer/build-site-page.mjs @@ -0,0 +1,42 @@ +// Generate the notebook browser page for coldstartmcp.dev. +// +// The site page is the SAME viewer `coldstart kb view` produces — one +// self-contained HTML file, no dependencies — with this repo's own real +// notebook baked in. Same pattern as scripts/graph-viewer/build-site-page.mjs. +// +// npm run build && node scripts/kb-viewer/build-site-page.mjs +import { writeFileSync, mkdirSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; + +const HERE = dirname(fileURLToPath(import.meta.url)); +const ROOT = join(HERE, '..', '..'); +const DIST = join(ROOT, 'dist'); +const OUT = join(ROOT, 'site-astro', 'src', 'notebook-page.html'); + +const distImport = (...p) => import(pathToFileURL(join(DIST, ...p)).href); + +let buildViewData, renderViewHtml, VIEW_TEMPLATE; +try { + ({ buildViewData, renderViewHtml } = await distImport('kb', 'view.js')); + ({ VIEW_TEMPLATE } = await distImport('kb', 'view-template.js')); +} catch (err) { + console.error('could not load dist/ — run `npm run build` first.\n' + err.message); + process.exit(1); +} + +// The home link must be substituted into the TEMPLATE first: renderViewHtml +// clears the slot for the standalone CLI page, which has nowhere to go back to. +const template = VIEW_TEMPLATE.replace( + '', '← coldstartmcp.dev', +); + +const generated = new Date().toISOString().slice(0, 10); +const data = buildViewData(ROOT, generated); +const html = renderViewHtml(template, data); + +mkdirSync(dirname(OUT), { recursive: true }); +writeFileSync(OUT, html); +console.log( + `${OUT} (${(Buffer.byteLength(html) / 1024 | 0)}KB, ${data.notes.length} notes)`, +); diff --git a/site-astro/src/components/Footer.astro b/site-astro/src/components/Footer.astro index 245e96c..706c33c 100644 --- a/site-astro/src/components/Footer.astro +++ b/site-astro/src/components/Footer.astro @@ -1,11 +1,12 @@ --- -interface Props { variant?: 'home' | 'docs' | 'blog' | 'how' } +interface Props { variant?: 'home' | 'docs' | 'blog' | 'how' | 'live' } const { variant = 'docs' } = Astro.props; const taglines = { home: 'codebase memory for coding agents · MIT', docs: 'docs · MIT', blog: 'blog · MIT', how: 'how it works · MIT', + live: 'see it live · MIT', }; const tagline = taglines[variant]; --- diff --git a/site-astro/src/components/Nav.astro b/site-astro/src/components/Nav.astro index a16e830..4b66c66 100644 --- a/site-astro/src/components/Nav.astro +++ b/site-astro/src/components/Nav.astro @@ -1,6 +1,7 @@ --- -interface Props { variant?: 'home' | 'docs' | 'blog' | 'how' | 'graph' } +interface Props { variant?: 'home' | 'docs' | 'blog' | 'how' | 'graph' | 'demo' | 'notebook' | 'live' } const { variant = 'docs' } = Astro.props; +const demoActive = variant === 'demo' || variant === 'graph' || variant === 'notebook' || variant === 'live'; ---
+ diff --git a/site-astro/src/pages/demo/index.astro b/site-astro/src/pages/demo/index.astro new file mode 100644 index 0000000..fa70c81 --- /dev/null +++ b/site-astro/src/pages/demo/index.astro @@ -0,0 +1,282 @@ +--- +import Head from '../../layouts/Head.astro'; +import SvgDefs from '../../components/SvgDefs.astro'; +import Nav from '../../components/Nav.astro'; +import Footer from '../../components/Footer.astro'; +import '../../styles/landing.css'; + +const title = 'Demo — one real session, this repo | coldstart'; +const description = + 'A single continuous session against coldstart\'s own codebase: an agent with no note yet runs find and gs to answer a question, writes what it learned, then a later prompt gets the same answer for zero tool calls.'; +--- + + + + + + + + + +