Commit Graph

9 Commits

Author SHA1 Message Date
66ccd54d21 docs: full-text search with snippets + peek a11y (0.93.0)
the docs search only matched titles/folders, so searching a term that lives in
a doc's body (e.g. 'heartbeat') returned nothing — you had to already know
which doc to open.

- search now matches title AND body across all docs; results show the title
  plus a context snippet with the query highlighted (<mark>)
- doc bodies are fetched once on first search and cached (invalidated when the
  doc list changes); in-flight searches cancel on a new query
- clicking a result opens the doc (and updates the URL); clearing returns the
  folder tree
- a11y: the homepage API peek used role=tablist/tab without tabpanels (an
  incomplete ARIA pattern) — switched to a labeled button group with aria-pressed
- verified live: 'heartbeat' -> 3 body matches with highlighted snippets,
  click opens Connect-your-broker, clear restores the tree
2026-06-10 14:08:19 +08:00
e5e79d75aa docs: collapsible doc nav on mobile (0.91.0)
a mobile audit (no overflow anywhere; agent modal + on-this-page TOC both fine)
turned up one weak spot: on phones the doc tree was a cramped 210px scroll area
pinned above every page, and it never scrolled the active doc into view — so
you couldn't tell which doc you were reading or reach half of them easily.

- the sidebar now collapses to a compact bar showing the CURRENT doc + a
  chevron; tap to reveal the full tree (active doc highlighted), tap a doc to
  navigate and auto-collapse
- desktop is byte-for-byte unchanged: the collapsible wrapper is display:contents
  off-mobile, so the tree stays a normal flex child (sidebar still 280px)
- verified live: mobile collapsed shows 'API reference', expands to 8 docs,
  selecting Quickstart navigates + collapses + relabels; desktop toggle hidden,
  tree intact
2026-06-10 13:35:07 +08:00
0e3c567c97 docs: on-this-page TOC + section deep links + heading anchors (0.88.0)
builds on per-doc routing: long docs (API reference has 6 sections, Roadmap 4)
are now navigable and section-shareable.

- each h2/h3 gets a slug id + a hover '#' anchor; URL form is
  #/<doc-slug>/<section-slug> (e.g. #/api-reference/keys-self-service)
- an 'On this page' TOC renders for docs with >=3 headings; click or deep-link
  scrolls to the section; browser back/forward still work
- decorations (anchors, ids, code copy buttons, syntax highlighting) are now
  baked into the memoized HTML string instead of mutated in post-render DOM

  WHY: the post-render mutation approach was being wiped. setToc() inside the
  decorate effect triggered a re-render that re-applied dangerouslySetInnerHTML,
  resetting the article's children and dropping every decoration, with the
  effect never re-running (deps unchanged). Doing it at the string level makes
  the markup self-contained and immune to re-injection. Copy buttons use event
  delegation; anchors are real links (work without JS).

- verified live: 6/6 heading ids + anchors on API reference, TOC navigates,
  3 copy buttons + highlighting on Connect-your-broker, deep-links land and
  scroll to the section, TOC hidden on short docs
2026-06-10 12:50:31 +08:00
60d045b55f docs: shareable URLs per document (0.87.0)
the docs site kept the selected document only in React state, so you couldn't
bookmark, share, or refresh-into a specific doc, and browser back/forward did
nothing — a real gap for a developer docs site people want to link into.

- each doc now has a slug URL: docs.amerc.ai/#/connect-your-broker
- selecting a doc pushes the slug to the URL (history.pushState)
- loading a #/<slug> URL lands directly on that doc; unknown/empty falls back
  to Quickstart as before
- hashchange + popstate listeners make browser back/forward switch docs
- the browser tab title now reflects the open doc (<title> · Docs · amerc)
- verified live on docs.amerc.ai: click updates URL+view+title, deep-links
  land correctly, back/forward navigate between docs
2026-06-10 12:22:10 +08:00
1e387c270c docs: land on Quickstart instead of an empty pane (0.76.0)
- 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
2026-06-10 11:09:09 +08:00
2d00cb4e63 docs: safe syntax highlighting (0.61.0)
- minimal dep-free highlighter for fenced code blocks: strings (green),
  numbers (amber), keywords (purple)
- deliberately NO comment rule, so '//' inside URLs (https://, wss://) is
  never mis-colored or mangled — the common micro-highlighter pitfall
- applied in the DocsApp post-render pass alongside the copy buttons; the
  copy button still yields the exact original text
- verified live: 22 tokens colored, both https:// and wss:// URLs preserved
  byte-for-byte, code intact
2026-06-10 08:31:47 +08:00
6a8fc0a5c0 docs: code-block copy buttons + 'Connect your broker' guide (0.58.0)
- fix fenced code blocks: reset the doubled inline-code background on
  'pre code', readable monospace styling (applies to all technical docs)
- DocsApp decorates rendered code blocks with a hover copy button
- seed a 'Connect your broker' guide (guides/) — the lasting reference for
  the supply-side last mile: heartbeat loop (curl + Node) to stay online,
  the relay WebSocket, and how it fits together (accurate from the API)
- verified live on docs.amerc.ai: guide renders, 3 code blocks, 3 copy
  buttons wired, clean styling
2026-06-10 08:17:15 +08:00
c8f6d0f892 public documentation (0.39.0)
- amerc-api: GET /docs + /docs/:id are public (reads); writes still require auth
- DocsApp/ConsoleShell: publicView mode renders docs read-only when logged out,
  with a 'Log in to edit' header CTA; edit/new/delete hidden for anonymous
- Docs nav link now shown to everyone
- seeded 5 quality guides: Quickstart, Publish an agent, Embed a chatbox, Showcase, API reference
2026-06-10 06:08:19 +08:00
b055663372 amerc suite: 2D pixel tavern + zero-dep auth/admin/docs/pm backend
- Scene2D pixel tavern (replaces three.js 3D scene)
- amerc-api: node:http+node:sqlite+node:crypto, auth/admin/docs/files/boards
- docs.amerc.ai + pm.amerc.ai (whiteboard mindmap + netdisk) apps
- agent API keys for fleet read/write

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 06:03:40 +08:00