| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
website: Fail a docs test on a hand-written GPUI Kit version (#3353) ## Summary Adds the missing half of the documentation-version guard. `website/tests/doc-sources.test.ts` already fails a pull request that writes out the GPUI snapshot version by hand (`{{gpui_pre_version}}`), and `doc-variables.js` provides `{{gpui_kit_version}}` for the same reason — but nothing checked that pages actually *use* it. So `v0.7.0` shipped with a hand-written `gpui-kit = "0.6"` in 20 places across 14 pages in both locales, and `/docs/installation/` still serves it today. Refs #3340. **This does not fix the live page** — see below. ## What #3340 actually is The report asks for the docs to show `gpui-kit = "0.7"`, and suggests the published site is "a stale build (or an incorrect `GPUI_KIT_VERSION` / snapshot)". I don't think that diagnosis holds: - The version resolver is correct. `readGpuiKitVersion()` prefers `GPUI_KIT_VERSION`, which `script/build-website-versions` sets from the tag, and `/` is built with `GPUI_KIT_VERSION="$(gpui_kit_version "$latest_release")"` where `latest_release` is `v0.7.0`. That resolves to `0.7.0`. - But `/` is built from **`snapshot_website "$latest_release"`** — the Markdown *at the tag*, not from `main`. At `v0.7.0`, `website/docs/installation.md:54` reads `gpui-kit = "0.6"` and contains no `{{gpui_kit_version}}` at all (0 occurrences). The placeholder landed on `main` after the tag. - So the literal in the live page is the literal in the `v0.7.0` tag, and it will keep being served until the next release. Editing `main` cannot change it, and re-tagging a published release is not something a contributor PR should do. What I can do without touching the release process is stop it from recurring. ## The guard One test, in the idiom of the `gpui_pre_version` one beside it. It matches only the forms that actually encode the dependency: - a Cargo declaration, bare (`gpui-kit = "0.7"`) or table (`gpui-kit = { version = "0.7", features = [...] }`) - a `docs.rs` link pinned to a version and reports `use {{gpui_kit_version}}`. Deliberately **not** matched, because matching them produces noise rather than signal: `gpui-kit-assets` (the `(?!-)` after the crate name), `docs.rs/gpui-kit/latest`, and prose that mentions the crate next to an unrelated version. I first tried the looser shape the `gpui_pre_version` test uses — flag any `\d+\.\d+` on a line containing `gpui-pre` — and it produced six false positives on `main` (`comparison.md` citing Zed `0.14.0`, `webassembly.md` citing wasm-bindgen `0.2.121`, `fonts.md` citing a Rust edition). Those would have needed `INTENTIONAL_GPUI_PINS`-style allowlist entries for crates that have nothing to do with Kit. ## Verification The guard passes on `main` (0 hits) and fails against the real `v0.7.0` documentation, checked out as a worktree and run with the same `bun test`: ``` main 0 hits v0.7.0 20 hits, e.g. docs/installation.md:54 writes a GPUI Kit version — use {{gpui_kit_version}} docs/getting-started.md:22 writes a GPUI Kit version — use {{gpui_kit_version}} zh-CN/docs/installation.md:54 writes a GPUI Kit version — use {{gpui_kit_version}} … (9 per locale) ``` `bun run test:docs`: the two `markdownLinks` tests time out at bun's 5s default on this machine, and fail identically on the unmodified tree — pre-existing, and CI does not hit it. Everything else in that script passes with this change (7 pass vs 2 pass before, same 2 pre-existing failures). `bunx tsc --noEmit` reports only pre-existing errors under `src/`; nothing in `website/tests/`. ## Not done, and why - **The live `/` page still says `0.6`.** Only a new release fixes that. If you want it fixed sooner, the options are to backport the placeholder onto a `v0.6.6`-style maintenance branch and cut a new patch tag, or to build `/` from `main` — the latter changes what "the docs at `/`" mean, so I did not go near it. Happy to do either if you want it. - No release pipeline, `script/build-website-versions`, or docs content is changed. The only file touched is the test. ## Public API None. Test-only change; no crate, TypeScript declaration, or exported symbol is added or altered. ## Notes Written with `opencode/space-bunny-free`. | 13 天前 | |
website: Keep versioned docs links inside their version (#3243) Documentation pages read under `/versions/main` or `/versions/<tag>` linked back to the default version through site-root links (`/docs/entity`, `/component/...`), which often 404 there because the default is the latest release. ## Links stay in their version - 124 site-root links in `docs`, `component`, `base`, `shell` (en and zh-CN) now link the `.md` file relatively. zh-CN pages that linked English Base pages now link the Chinese ones. - `remarkDocLinks` prefixes any remaining site-root docs link with the build's base, so released snapshots (v0.6.6 still has such links) stay inside `/versions/<tag>` too. - Redirect destinations (`/docs/dock` → `/component/dock`, …) and the zh-CN → en language switch kept dropping the version base; both are fixed. - The 404 page, which GitHub Pages serves for every missing path, looks for the same page in the other versions and offers it ("This page is not in the v0.6.6 (latest) documentation, but it exists in main."). It also now loads the site stylesheet; it was unstyled before. ## GPUI snapshot version in one place Pages write `{{gpui_pre_version}}` in prose, code and docs.rs links. It resolves from the `gpui` entry of the workspace `Cargo.toml`; `script/build-website-versions` passes each revision's own value. The `.md` endpoints and `llms-full.txt` expand it as well. ## Maturity labels `maturity: [preview | experimental | showcase-only | platform-dependent | stable]` in frontmatter renders mono labels under the title, linking to a new Maturity section on the docs home. Marked: Mobile and WebView (Experimental, Platform-dependent), WebAssembly (Showcase only: it currently serves the component showcases, not shipped applications), all GPUI Shell pages (Preview), Native Extensions, SystemNotification and TitleBar (Platform-dependent). Unmarked pages are Stable. ## Checks - `bun run test:docs` (sources, no build): no site-root docs links; relative links resolve, in the same locale when possible; no hand-written pinned `gpui-pre` version or versioned docs.rs gpui-pre URL; known variables only; en/zh-CN maturity match. - `bun run test:links`: every `<a>` and redirect in a build reaches a built page; `test:versioned-examples` repeats it at `/versions/test/`, where leaving the version fails. - Test Docs now also runs on `Cargo.toml` changes. Verified locally with a production-shaped build (v0.6.6 at `/`, this branch at `/versions/main`): all website tests pass, the v0.6.6 snapshot passes the link check at `/versions/v0.6.6/`, and the 404 fallback works for `/docs/entity` and `/zh-CN/docs/entity`. Publishing a release that contains the new GPUI guides is what makes `/docs/` show them; this PR does not change which version is the default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> | 20 天前 | |
website: Follow release versions and highlight diffs (#3284) ## Description Website installation examples and asset API links still named Kit 0.6 after the 0.7 release, and diff blocks in release notes did not distinguish additions from deletions. Pass `GPUI_KIT_VERSION` to each versioned website build, deriving it from the release tag or the Kit manifest for main. Resolve `{{gpui_kit_version}}` in the affected English and Chinese pages, including Markdown exports, and pass the same value to the homepage installation and clipboard snippet. Local development falls back to the checkout's manifest. Existing release-tag snapshots retain their original content; future tags include the variable-based pages. Enable diff highlighting in the shared documentation and release-notes renderer, with green additions, red deletions and blue headers in both light and dark themes. ## How to Test - `bun test --cwd website --timeout 60000` — 39 tests passed. - `GPUI_KIT_VERSION=0.8.1 PUBLIC_SITE_VERSION=v0.8.1 bun run --cwd website build` — passed; verified homepage HTML, hydration props, Markdown exports and asset links use 0.8.1 despite the local Cargo version being 0.7.0. - Verified generated release-notes HTML includes diff colors for both themes. - `bash -n script/build-website-versions` and `git diff --check` — passed. ## Checklist - [x] Read CONTRIBUTING and followed repository conventions. - [x] AI-assisted changes reviewed and verified with focused regression tests and the website build. - [x] English and Chinese documentation synchronized. Native Story and platform performance checks are not applicable to this website change. | 17 天前 | |
website: Follow release versions and highlight diffs (#3284) ## Description Website installation examples and asset API links still named Kit 0.6 after the 0.7 release, and diff blocks in release notes did not distinguish additions from deletions. Pass `GPUI_KIT_VERSION` to each versioned website build, deriving it from the release tag or the Kit manifest for main. Resolve `{{gpui_kit_version}}` in the affected English and Chinese pages, including Markdown exports, and pass the same value to the homepage installation and clipboard snippet. Local development falls back to the checkout's manifest. Existing release-tag snapshots retain their original content; future tags include the variable-based pages. Enable diff highlighting in the shared documentation and release-notes renderer, with green additions, red deletions and blue headers in both light and dark themes. ## How to Test - `bun test --cwd website --timeout 60000` — 39 tests passed. - `GPUI_KIT_VERSION=0.8.1 PUBLIC_SITE_VERSION=v0.8.1 bun run --cwd website build` — passed; verified homepage HTML, hydration props, Markdown exports and asset links use 0.8.1 despite the local Cargo version being 0.7.0. - Verified generated release-notes HTML includes diff colors for both themes. - `bash -n script/build-website-versions` and `git diff --check` — passed. ## Checklist - [x] Read CONTRIBUTING and followed repository conventions. - [x] AI-assisted changes reviewed and verified with focused regression tests and the website build. - [x] English and Chinese documentation synchronized. Native Story and platform performance checks are not applicable to this website change. | 17 天前 | |
docs: deepen GPUI manual and add release guides (#3232) ## Description Deepen the bilingual GPUI Kit documentation into a practical framework manual. The guides now include runnable exercises for state, rendering, custom elements, painting, text, focus, accessibility, and animation, with clearer expected results and troubleshooting. Clarify what the 120 Hz frame budget means, when GPUI requests frames, and how immediate, retained, and hybrid describe different layers. Preserve the five core layers and explain `gpui-pre` as version-aligned GPUI publication. Add focused packaging and Auto Update guides, including a user-level Linux installer, and expand the asset guides for `icon_assets!`, embedded images, `svg()`, and `img()`. Keep the existing sidebar structure. The page order places WebView after Native Extensions; the new navigation labels are Packaging and Auto Update. Generated Markdown now ends with the existing CC BY 4.0 attribution notice. ## Screenshot Not attached. The interactive frame timeline and documentation pages can be reviewed in the site preview. ## How to Test - `script/check-ai docs` — passed (9 recipe fragments and 6 script tests). - `cargo fmt --all -- --check` and `git diff --check` — passed. - `cargo test -p gpui-kit --test ui --features 'test-support component' --locked` — passed (1 test). - Compiled the new runnable documentation examples in existing example packages; temporary verification files were removed. - Checked the affected English and Chinese pages in the local Astro preview, including sidebar order and Markdown license output. - `bun run build` reached static route generation but stopped because the adjacent `gpui-kit-showcases/scripts/validate.ts` checkout is absent locally. The docs CI workflow checks out showcases separately. ## Checklist - [x] I have read the contributing guide and followed the relevant documentation guidance. - [x] Reviewed the AI-assisted examples against the pinned GPUI APIs and compiled the new complete snippets. - [ ] Story app manual tests (not run for this documentation change). - [ ] macOS, Windows, and Linux performance tests (no platform rendering implementation changed). | 20 天前 | |
website: Refine App Stories layout and browsing (#2960) ## Description App Stories cards inherited prose list markers and spacing, making the catalog tall and difficult to scan. Scope the page styles and use the GPUI Kit website's typography, neutral theme tokens, compact controls, and consistent card spacing. Screenshot previews fill a shared 16:9 area, with author, platform/date, and icon-only links organized into aligned rows. Featured now displays six apps per page in editorial order. All apps displays nine entries per page from the complete catalog, defaults to newest publication first, and owns its search, category filters, and star sorting. Search, category, and sort changes reset All apps to page one. Empty results keep the controls available. Star counts use compact notation, accessible names, and an optical alignment correction; Commercial precedes the count, and the separate Read story row is removed. Replace the native sort menu with a theme-aware keyboard-operable listbox and use 32px search/sort controls. Normalize navigation action label sizing and centered line boxes. Update the website design rules and test both pagination sizes and boundaries. Implementation and tests were AI-assisted, with iterative visual feedback and independent code review. Use `bunx` to invoke Astro binaries directly in the package scripts. The previous `bun --bun astro` invocation resolved the identically named package script recursively in CI and failed with E2BIG. Verified the standard `bun run build` command after this fix. Align Test Docs with the release workflow by checking out the approved Showcase catalog, installing its locked dependencies with Bun 1.4.0, and passing `SHOWCASES_DIR`. Run catalog and SEO tests in the website check. ## Visual verification Checked English and Chinese, light and dark themes, and widths from 360 to 1440 pixels in Chromium. Verified aligned card metadata and icon rows, edge-to-edge previews, keyboard focus, selection, empty-state recovery, reduced motion, and Featured's 6/6/4 pagination and All apps' 9/9/9/9/3 pagination, with no duplicate entries. The App Stories content also fits at 200% root font size. The existing shared site navigation overflows in that text-only scaling case; this pre-existing text-scaling overflow remains outside the toolbar alignment fix. ## How to Test From `website/`: ```sh bun run test:showcases bun run build bun run test:seo ``` Open `/apps` and `/zh-CN/apps`. Change Featured pages, search and clear an unmatched query, combine search with a category, and switch between publication and star sorting. Featured selection and order should remain independent of All apps filters. ## Checklist - [x] Read and followed the contributing guidelines. - [x] Reviewed the changes and ran the website tests and build. - [ ] Maintainer review of AI-assisted changes. Rust Story and platform performance tests are not applicable to this website-only change. | 1 个月前 | |
Read Featured app selection from the catalog root | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 13 天前 | ||
| 20 天前 | ||
| 17 天前 | ||
| 17 天前 | ||
| 20 天前 | ||
| 1 个月前 | ||
| 1 个月前 |