Repository navigation
Conversation
App::asset_source() was replaced by App::assets(), which returns an AssetRegistry (gpui-ce longbridge#259). The native context menu only builds on Windows and macOS, so the Linux build never saw the old call, and the crate stopped compiling on both. AssetRegistry does not implement AssetSource (its load returns an Option), so the menu now takes the registry. The icon resolution tests build a registry holding the test icon, since AssetRegistry::from(source) only registers the paths the source lists. Three html.rs tests still expected relative(..) to be a DefiniteLength; like value_to_length, they now convert it with .into(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J7JQV1YRa9p7viwjBUskzm
gpui-ce longbridge#272 renamed Window::activate_window to Window::activate. The shell's script API keeps its window.activate_window() name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J7JQV1YRa9p7viwjBUskzm
philocalyst
pushed a commit
that referenced
this pull request
Oct 1, 2026
🤖 Auto-generated by Endless task [#3](https://endless.longbridge-inc.com/projects/gpui-component/tasks/3). Initiated by: huacnlee@longbridge-inc.com Worker agent: Claude Code (claude_code · lboneapi · claude-sonnet-5) ## Commits - **website: migrate from VitePress to Astro 5** Replace the VitePress 2 alpha documentation site with a full Astro 5.x implementation. Preserves all content, routes, CSS design tokens (58 tokens light + dark), dual-language support (EN / zh-CN), and functionality. Key changes: - Astro 5 static output with @astrojs/vue for Vue islands - Tailwind v4 via @tailwindcss/vite (no PostCSS) - 6 Content Collections (docs, shell, base x EN/zh-CN) with dynamic routes - Custom TypeScript sidebar generator replacing vitepress-sidebar - All Vue components ported: useData/withBase/VPFlyout removed, props added - HomeApp.vue: self-contained Vue island (nav + sections + EN/ZH copy) - AppsApp/ContributorsApp/SkillsApp: lightweight Vue islands - Pagefind search (build-time index) with CmdK modal trigger - llms-full.txt static endpoint at /gpui-component/llms-full.txt - WASM dev server middleware ported from VitePress config.mts - 58 CSS tokens copied verbatim, .vp-doc renamed to .doc-content - **chore(website): remove residual .vitepress directory after Astro migration** The .vitepress/ directory was retained from the pre-migration VitePress source. Per PRD §6.3 (maintainability), it must not appear in the migrated website/. 32 files removed. - **feat(review): remove legacy Vue website pages and unused data files** - **feat(dev): update website/, base/[...slug], docs/[...slug]** - **website: update GitHub repo links from gpui-component to gpui-kit** Repo was renamed on GitHub; update all website content and Vue/Astro components that link back to it. - **website: restore a mobile fallback for the docs nav links** The mobile media query hid .site-nav__links (Components/Shell/Base/App Stories plus the entire Resources dropdown) with no replacement, dead-ending phone users in violation of DESIGN.md's own no-hide-without-fallback rule. Add a burger button that toggles a drawer, flatten the Resources dropdown into stacked items on mobile, and drop an unused import/variable found while in the file. - **website: derive the nav language-switch path from base, not a literal** langSwitchHref hardcoded /gpui-component/ in a regex instead of using the base import.meta.env already exposes, so it would silently break if the base path ever changes. - **website: de-duplicate the SITE_URL constant into one module** BaseLayout.astro and DocsLayout.astro each hardcoded the same https://longbridge.github.io/gpui-component literal, so a domain change would need to be edited in two places and could drift. - **website: update DESIGN.md for the Astro file layout** DESIGN.md still described the VitePress theme (.vitepress/theme/style.css, index.vue, apps.vue, the .VPNavBar/.VPNav blur split, repo.data.js, the transformPageData OG hook) after the migration replaced all of it. Point every reference at the real Astro files and describe the docs nav's actual 767px drawer behavior, restored by the previous commit. - **website: fix stale token comment in global.css** The header comment pointed at .vitepress/theme/style.css (deleted) and claimed 58 tokens; the file actually carries 64 (chart-1..5 and shadow-dialog were never in the PRD's manual count, but both existed in the pre-migration source and are correctly present here). - **website: derive base-path literals from BASE_URL instead of hardcoding** sidebar.ts and llms.ts each hardcoded `/gpui-component` as a literal base path, duplicating astro.config.mjs's `base` value. Derive both from import.meta.env.BASE_URL so a future base-path change only needs to touch the config. - **website: pass base path into the favicon inline script via define:vars** The script looked up document.querySelector('base')?.href, but no <base> element exists in the page, so that lookup always failed and the hardcoded /gpui-component/ fallback was the only path ever taken. Pass the already-computed `base` value through define:vars instead of duplicating it as a second literal. - **website: pass the site base path into the WASM dev-server middleware** wasmExamplesDevServer() hardcoded /gpui-component as a third copy of astro.config.mjs's base value. Pass it in as a parameter instead. - **website: derive the contributors-page background image from BASE_URL** The public/contributors.svg background was referenced by a hardcoded /gpui-component/ literal in a Vue SFC <style> block. Compute the URL from import.meta.env.BASE_URL in <script setup> and bind it in with v-bind() instead. - **website: remove unused LanguageSwitcher.vue** Nav.astro implements language switching inline; this component was not imported anywhere and had drifted out of sync (it still used the brittle /gpui-component/ regex replacement that Nav.astro's version was already fixed to avoid). - **website: port the GPUI Kit rebrand (main longbridge#2927) into the Astro site** main's rebrand PR landed on VitePress before this branch's Astro migration merged, so port its website-facing substance by hand instead of a literal rebase: base path -> `/`, site domain -> gpui-kit.com with a CNAME, and every "GPUI Component" -> "GPUI Kit" brand mention that the original commit swapped (nav/footer/titles, docs/index intro's new three-crate layout summary, component doc examples, logo/architecture SVGs, OG template). Sentences about the gpui-component crate itself are left untouched, matching upstream's own distinction. Also fixes the WASM dev-server middleware and the two example vite configs for the new empty base prefix, and the docs/index.astro fallback literal that would otherwise have pointed at the old base path. --------- Co-authored-by: Huacnlee (Li Huashun) <huacnlee@longbridge-inc.com> Co-authored-by: Jason Lee <huacnlee@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Codex <codex@openai.com>
Author
|
Closing this as superseded by #4. I built
When this repository moves to a GPUI CE release newer than 0.2.2, the |
|
Ah, thank you! It may help to contribute back into -CE to make some of these things harder to mess up/confuse |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1, which made the crate build against current GPUI CE on Linux. On Windows and macOS it still fails to compile, and since #1 merged, GPUI CE has renamed one more window method.
Changes
The native menu takes the
AssetRegistry.App::asset_source()was replaced byApp::assets()in gpui-ce Toggle stripe and number of rows in Table Story longbridge/gpui-kit#259. The native context menu only builds on Windows and macOS, so the Linux build never saw the old call:AssetRegistrydoes not implementAssetSource(itsloadreturns anOption), sonative_menunow takes the registry. The icon tests build a registry that holds the test icon, becauseAssetRegistry::from(source)only registers the paths the source lists. Threehtml.rstests also needed.into()onrelative(..), likevalue_to_lengthitself. This is the patch from my comment on Update components for current GPUI CE APIs #1.Window::activate_window()→Window::activate(). This was renamed in gpui-ce calendar: Add to support Sized longbridge/gpui-kit#272, merged the day after Update components for current GPUI CE APIs #1, and breaks the crate on every platform. The shell's script API keeps itswindow.activate_window()name.Testing
maindepends ongpui-ce 0.2.2, which on crates.io predates these APIs. So I tested against gpui-cemain(94db357) through a local[patch.crates-io]that isn't part of this PR.main(801f75f)asset_sourceandactivate_windowactivate_windowcargo test -p gpui_ce_components --libcargo clippy -p gpui_ce_components --all-targets -- -D warningsThe Windows test count includes the native menu's icon resolution tests, which only exist on Windows and macOS.
* The failing test is
popover::tests::the_enter_motion_starts_over_every_time_the_dropdown_opens. It fails with or without this PR: it passes with gpui-ce at 4cde195 and fails from f763dab on, gpui-ce longbridge#284 ("Migrate Animation back to Motion"), where the dropdown no longer slides in (from Point { x: 8px, y: 128px } to Point { x: 8px, y: 128px }). That belongs in gpui-ce or in a separate change here.Not covered
macos.rsgets the same signature change aswindows.rs.story,shelland the examples. Theactivate()rename there is mechanical, but I couldn't compile these crates against gpui-cemainbecause of API drift outside this PR, which I'd leave for a separate change:gpui_ce_components_fpsenablesgpui/profiler, which doesn't compile on gpui-cemain:debug_overlay.rsbuilds aQuadwithout the newerborder_dashed_*,corner_smoothingandpaddingfields. Even with that patched locally,crates/fps/src/sampler.rs:56no longer matches the profiler API (FrameEventvsFrameTiming).story,shellandfps_monitordepend on it.gpui_ce_components_basebuilds as a library, but its tests and showcase examples don't:Hitboxhas a newtagsfield,PaintQuadhas the dashed-border fields, and several colors are nowBackgroundrather thanHsla.AI disclosure: the testing, the second commit and this description were done with Claude (an AI assistant). I reviewed them.
🤖 Generated with Claude Code
https://claude.ai/code/session_01J7JQV1YRa9p7viwjBUskzm