Commit Graph
17 Commits
Author SHA1 Message Date
Hunter B 1d751bedb4 ci(web): preflight cloudflare deploy env
Fail the manual website deploy job before the OpenNext build when the Cloudflare account variable or API token secret is missing or placeholder-like. This makes the GitHub Actions failure actionable while leaving Wrangler as the deploy authority.

Verification:

- npm run check:deploy-env (expected failure without env)

- env CLOUDFLARE_ACCOUNT_ID=cf50f793171d7cb3b2ce23368b69cdcb CLOUDFLARE_API_TOKEN=abcdefghijklmnopqrstuvwxyz npm run check:deploy-env

- npm run check:facts

- npm run check:docs

- npm run lint

- git diff --check
2026-06-26 13:02:39 -07:00
Hunter Bown c06d872616 Merge pull request #3543 from idling11/fix/issue-3417-docs-structure
refactor(web): promote repo docs into structured website documentation (#3417)
2026-06-24 08:50:47 -07:00
Hunter B 82351c006e fix(web,build): handle Custom meta-provider + fix default-model after config split
Follow-ons surfaced by integrating #1519 + #3311:
- #1519 added the dynamic ApiProvider::Custom meta-provider. Exclude it from the
  website provider facts (facts-lib.mjs + facts-drift.ts EXCLUDED, like
  DeepseekCN) and from the provider-table drift check (META_PROVIDER_TABLES in
  check-provider-registry.py) — it's a runtime catch-all, not a shipped provider.
- #3311 moved DEFAULT_TEXT_MODEL's definition to config/models.rs, which broke
  the web facts' loose scrape (it mis-bound to an NVIDIA base URL). Read both
  files and match the const definition precisely; default model is deepseek-v4-pro
  again.
2026-06-24 02:07:28 -07:00
Hunter BandClaude Opus 4.8 fbac2bd234 fix(web): keep prebuild facts generation deterministic
Audit #3 (scratchpad/bug-audit-2026-06-24.md): `npm run build` ran
derive-facts.mjs which always stamped a fresh generatedAt into the tracked
web/lib/facts.generated.ts, dirtying the working tree on every clean build.

Preserve the committed generatedAt when every *checked* fact (the same set the
drift gate compares, excluding generatedAt + runtime-only latestRelease) is
unchanged, so a clean rebuild leaves the tracked file byte-identical. A real
fact change still stamps a fresh timestamp.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-23 23:50:38 -07:00
Hanmiao Li 0129c44f00 refactor(web): promote repo docs into structured website documentation (#3417)
Replace the single monolithic Docs page with a hub-and-spoke structure
backed by a canonical docs-map.ts registry.

- web/lib/docs-map.ts: canonical doc registry mapping 16 topic areas to
  repo source files, with locale-aware labels and category groups
- web/app/[locale]/docs/layout.tsx: shared sidebar nav layout for all
  docs sub-pages with categorized topic links (§ for pages, ↗ for repo)
- web/app/[locale]/docs/page.tsx: rewritten from 640-line monolith into
  a hub index with categorized topic cards and source attribution
- web/app/[locale]/docs/constitution/page.tsx: standalone page
  preserving existing EN+ZH inline content
- web/app/[locale]/docs/modes/page.tsx: standalone modes + approval page
- web/app/[locale]/docs/tools/page.tsx: standalone tools catalog page
- web/scripts/check-docs.mjs: drift/parity gate verifying repo source
  files exist, version matches workspace, and install snippets are fresh
- web/package.json: add npm run check:docs
- .github/workflows/web.yml: run check:docs after prebuild in lint job
2026-06-24 14:22:16 +08:00
Hunter BownandHanmiao Li 38f9152089 feat(web): add fact-drift CI gate for version, providers, and tool inventory (#3415) (#3481)
Extract shared derivation logic into web/scripts/facts-lib.mjs and
create a check-facts.mjs CI gate that fails when web/lib/facts.generated.ts
is stale relative to the workspace sources.

- facts-lib.mjs: single-source-of-truth derivation shared by
  derive-facts.mjs (prebuild) and check-facts.mjs (gate)
- derive-facts.mjs: slimmed to ~63 lines, imports from facts-lib.mjs
- check-facts.mjs: re-derives facts and compares against committed file;
  exits non-zero when version, providers, crates, sandboxBackends,
  defaultModel, nodeEngines, toolCount, or license have drifted
- web/package.json: add npm run check:facts script
- .github/workflows/web.yml: run check:facts after prebuild in lint job
- web/lib/check-facts.test.ts: 9 vitest tests covering stale version
  (0.8.62 vs 0.8.64), provider drift, multi-field detection, edge cases

Closes #3415

Co-authored-by: Hanmiao Li <[email protected]>
2026-06-23 10:45:13 -07:00
Hunter Bown 5b8a5ac0b2 feat(provider): add DeepSeek Anthropic-compatible route
Adds a DeepSeek Anthropic-compatible provider route through the existing Messages adapter.\n\nVerification:\n- cargo fmt --all -- --check\n- git diff --check\n- python3 scripts/check-provider-registry.py\n- cargo test -p codewhale-tui --bin codewhale-tui --locked deepseek_anthropic\n- cargo test -p codewhale-tui --bin codewhale-tui --locked api_provider_metadata_helpers_follow_config_provider_metadata\n- cargo test -p codewhale-tui --bin codewhale-tui --locked provider_config_key_follows_config_provider_metadata\n- cargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -D warnings -A clippy::uninlined_format_args -A clippy::too_many_arguments -A clippy::unnecessary_map_or -A clippy::assertions_on_constants\n- GitHub checks green on abe866ae0
2026-06-23 10:26:07 -07:00
Hunter BownandClaude Opus 4.8 0861661b60 feat(provider): add Qianfan route fixture (#3425)
* feat(provider): add Qianfan route fixture

Add Baidu Qianfan as a first-class OpenAI-compatible provider descriptor with provider-scoped auth, base URL, model env overrides, docs, and focused TUI/config regressions.

Qianfan service model IDs pass through under provider scope, while unsupported reasoning extensions stay out of request payloads.

Refs #3357.

* Add Qianfan to web facts maps

Keep the build-time and runtime facts derivation label maps in sync with the Qianfan ApiProvider variant so the release version-drift guard can derive provider facts cleanly.

Verification:

- ./scripts/release/check-versions.sh

- python3 scripts/check-provider-registry.py

- cargo test -p codewhale-config --locked qianfan

- cargo test -p codewhale-tui --bin codewhale-tui --locked qianfan

- npm run lint -- lib/facts-drift.ts scripts/derive-facts.mjs (from web/)

- cargo fmt --all -- --check

- git diff --check

* fix(provider): qianfan env-var alias fallback skips empty values

std::env::var returns Ok("") for a set-but-empty var, so the prior or_else chain
never reached BAIDU_QIANFAN_BASE_URL / BAIDU_QIANFAN_MODEL when QIANFAN_* was set
to empty. Filter each var for non-empty before falling back to the alias.
(From the Claude review on #3425.)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-23 02:13:27 -07:00
Hunter BandNightt 7c9f28caa0 fix(release): finish v0.8.61 provider and site surfaces
Complete the DeepInfra CLI/config/TUI alias path, refresh the public 25-provider README/docs/site surfaces, and clean the website production build tracing metadata for v0.8.61.

Harvested release-surface follow-up from PR #3236 by @nightt5879.

Closes #3231.

Co-authored-by: Nightt <[email protected]>
2026-06-16 01:16:57 -07:00
Hunter BandClaude Opus 4.8 ddbc3cfe4b docs(web): finish i18n cleanup, fix provider facts, mission framing
- Remove dead i18n dictionary code (dictionaries/{en,zh}.ts,
  get-dictionary.ts); copy is inlined per-page and these had no importers.
- Add Z.ai/StepFun/MiniMax to derive-facts + facts-drift labelMaps so the
  facts build covers all providers and 'npm run build' passes.
- Homepage/FAQ: mission-idea-in-this-version framing, 0.8.61 version refs,
  locale-prefixed fallback links; WhaleFlow stays off the homepage hero.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-15 06:26:05 -07:00
Hunter BandClaude Opus 4.8 a70d5c9e12 docs(web): harvest README + website refresh onto main (0.8.61)
Richer README front door (open-models-first framing, '## The Idea' constitution essay,
accurate 24-provider list) + website improvements (SEO opengraph/robots/sitemap routes,
nav/footer, facts-driven pages, coupled locale-layout), 3-way reconciled to 0.8.61:
provider count corrected 21->24 (verified vs crates/config), version/palette/dead-link fixes.
Conservatively deferred 3 heavily-conflicting web pages (page/faq/install) to preserve main's
richer versions. Verified: tsc --noEmit exit 0, eslint clean, cargo build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-14 14:27:45 -07:00
Hunter B 3d503a0a24 docs: bring public surface and npm-deferred install copy 2026-06-08 08:01:18 -07:00
Hunter B 6f295e9961 docs: sync release credit surfaces 2026-05-31 17:43:46 -07:00
Hunter Bown 64c870f35c docs(web): sync v0.8.45 facts and provider surface 2026-05-25 22:07:10 -05:00
Hunter Bown 3e89ccf98e style: cargo fmt 2026-05-24 03:34:13 -05:00
Hunter Bown 190eb6b162 docs(web): refresh v0.8.32 site state 2026-05-12 14:04:17 -05:00
Hunter BownandClaude Opus 4.7 9e45780ba0 feat(web): community site for deepseek-tui.com (mobile + color refresh) (#1108)
First commit of the Next.js community site that powers
deepseek-tui.com, deployed via Cloudflare Workers / OpenNext.

This commit lands the scaffold and applies the visual + correctness
pass requested by community feedback:

- Palette: drop the cream/Anthropic-feel paper (#F4F1E8) for a
  DeepSeek-aligned cool white + soft gray (#FFFFFF / #F4F6FB), with
  indigo accents kept. Soften default hairlines so a pure-white
  background reads clean instead of harsh.
- Mobile: add a hamburger menu (mobile-menu.tsx) so phones can reach
  Install / Docs / Activity / Roadmap / Contribute — previously the
  link list was hidden on phones with no replacement. Tighter hero,
  flexible button row, viewport-safe code blocks, columnar grids
  collapse cleanly under 768px, and the printed-almanac center rule
  is desktop-only now (it sliced through narrow viewports).
- "How it works" diagram: replace the hand-rolled ASCII art (which
  misaligned under CJK monospace because Han characters take 2
  columns vs Latin's 1, per dhh's note in WeChat) with a real
  mermaid diagram rendered client-side via dynamic import. Uses the
  mermaid.live standard syntax 庄表伟 recommended.
- Issue #1104: the docs listed a `deepseek-cn` provider that the
  v0.8.16 binary doesn't accept (`ProviderArg` in crates/cli only
  has 9 variants; the 10th lives only in the legacy tui/config.rs).
  derive-facts.mjs now omits `deepseek-cn` until that variant is
  wired through the shared ProviderKind, and the install page's
  China-network recipe uses `base_url` / `DEEPSEEK_BASE_URL` (which
  actually works on v0.8.16) instead of the unsupported provider.

Auto-deploys via .github/workflows/deploy-web.yml on push to main.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-07 21:00:06 -05:00