9 Commits

Author SHA1 Message Date
twosugar 3b7a4872c0 docs(migrate): add stage-2 implementation plan
Composite components, build fix (§S1 already landed via Sätteri opt-out),
canary preview, and legacy cutover. §S1 documents both Plan A (unified()
processor, chosen path) and Plan B fallback (Astro 6 downgrade, not
needed).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-18 11:48:20 +08:00
twosugar 9a7d3dcb06 docs(plan): openapi-website astro migration stage 1
18-task implementation plan for stage 1 of the vitepress -> astro
migration. Covers vitepress teardown (mv to .legacy/), astro scaffold,
tri-lingual content routes, tokens/styles baseline, shell components
(TopNav/Sidebar/TOC/PrevNext/Breadcrumb/Search), region system,
pagefind-backed vitepress-parity search UI, LLM .md export, 7 mdx
primitives extracted into @longbridge/openapi-ui workspace, 6 composite
placeholders, opencli A/B tooling, first-pass verification and legacy
purge.

Each task follows TDD-adjacent structure (checklist steps, per-task
commits, exact file paths, executable code). Global constraints copied
verbatim from spec: URL set A △ B = ∅ hard gate, user-experience
equivalence, shiki token drift <=2% (only approved exception), no
AI-run builds, no push, single-file commit granularity.

Spec: docs/superpowers/specs/2026-08-17-openapi-astro-migration-design.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-17 16:08:24 +08:00
twosugar fac783bcdb docs(spec): openapi-website astro migration design
Architectural spec for migrating openapi-website from VitePress
2.0-alpha + Vue 3 to Astro 7 + React 19 + Tailwind v4, referencing
whale-apidocs.

Top-level constraint: user-facing experience must remain identical
(URLs, visuals, interactions, load, search, component behavior). Only
approved exception: shiki code-highlight token color drift <=2%.

Two-stage plan:
- Stage 1: architecture + primitives + shell (remove vitepress, wire
  content collections, sidebar generator from _category_.json, theme
  pre-paint, region system, Pagefind search, opencli URL/DOM gate).
- Stage 2: composite components (TryIt rebuilt with react-hook-form,
  ApiReference React CSR port, NewHomePage, inspira animations), all
  extracted into 6 workspace packages.

opencli A/B verification via chrome-devtools MCP, DOM topology >=95%,
URL set diff = empty, layered CI (per-PR sample, canary full-site
visual, release-gate experience assertions).

Decision log: 21 entries, all open questions closed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-17 15:17:59 +08:00
Jason Lee 651007e619 docs: Remove invalid docs. 2026-04-03 22:20:01 +08:00
Jason Lee cf021667ff cli: Refactor domain-grouped command names (#397)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 11:32:36 +08:00
Jason Lee e61c421395 feat: add CliCommand block with syntax highlighting and multi-example docs (#390)
## Summary

- New markdown-it plugin (`cli-command.ts`) renders `<CliCommand>` tags
as styled code blocks with proper shiki dual-theme color variables
(`--shiki-light` / `--shiki-dark`) for syntax highlighting: longbridge
binary (purple), subcommands (blue), args and inline comments (gray)
- Header changed from compact bar to h2-style title matching SDK Links
section; Install CLI link floats right with no border, pointing to
`/docs/cli`
- Single-line `<CliCommand>content</CliCommand>` tokens (parsed as
paragraph > inline by markdown-it) now correctly handled via Case 2
token splice
- Expanded all non-trade `<CliCommand>` blocks from single-line to
multi-line format with 2–4 real verified examples per command and
locale-aware comments (en / zh-CN / zh-HK) across quote pull, content,
subscribe, security, and watchlist docs

## Test plan

- [ ] Run `bun run dev` and verify CliCommand blocks render with correct
syntax highlighting in light and dark mode
- [ ] Verify h2 title "CLI" appears with Install CLI link on the right
(no border)
- [ ] Verify Install CLI link points to `/docs/cli`
- [ ] Check a few pages across en / zh-CN / zh-HK locales

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 14:19:36 +08:00
Jason Lee 6a4b543645 docs: Add openapi.yaml (#382)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:37:42 +08:00
Jason Lee e18f7061fc docs: Fix incorrect install skill command. 2026-03-23 21:31:45 +08:00
Jason Lee 0add508ae2 feat: add Skill page with interactive demo (#376)
## Summary

- **New `/skill` page** with full trilingual support (en / zh-CN /
zh-HK)
- **Interactive chat demo**: 4 scenarios (Live Quote, Portfolio,
Subscription, Earnings) × 5 AI clients (OpenClaw, ChatGPT, Claude,
Claude Code, Codex) with typewriter animation
- **Rich response rendering**: tables with Shadcn-style borders, mini
SVG sparkline charts, syntax-highlighted code blocks
- **Scenario cards section** below the demo describing use cases
- **Nav update**: Skill link added to all three locale nav configs

## Bug Fixes

- **Syntax highlighter**: replaced chained-regex approach with a
single-pass tokenizer. The old code ran number → keyword → string
regexes sequentially on the same string — the keyword regex matched
`class` inside generated `<span class="hl-n">` attributes, and the
string regex matched `"hl-n"` as a string literal, corrupting the HTML
structure entirely
- **v-html routing**: replaced `currentMessages[2]?.rich` template
condition with an explicit `isRichResponse` ref set in `runAnimation()`
to prevent incorrect branch selection when switching client tabs

## Test plan

- [ ] Visit `/skill`, `/zh-CN/skill`, `/zh-HK/skill` — page loads in all
locales
- [ ] Click through all 4 scenario tabs — animation plays correctly for
each
- [ ] Click through all 5 client tabs — correct message shown, Claude
Code tab shows syntax-highlighted code (not raw HTML)
- [ ] Verify sparkline charts render in the Live Quote / OpenClaw
scenario
- [ ] Verify table borders render correctly (outer border + row
dividers, no missing bottom border)
- [ ] Verify gain/loss values show green/red colors in tables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 20:03:14 +08:00