Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 39 additions & 37 deletions .agents/skills/update-gpui/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,62 @@
---
name: update-gpui
description: Update GPUI submodule to the latest commit. Use when asked to update, bump, or upgrade the gpui dependency.
description: Update all immutable GPUI Git pins and compatibility metadata. Use when asked to update, bump, or upgrade GPUI.
user_invocable: true
---

## Instructions

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a top-level heading after the front matter.

markdownlint flags ## Instructions as the first heading. Add a # Update GPUI heading before it and retain ## Instructions as a subsection.

🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 7-7: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/update-gpui/SKILL.md at line 7, Add a top-level “Update GPUI”
heading immediately after the front matter in SKILL.md, before the existing
“Instructions” subsection, while retaining “Instructions” as a level-two
heading.

Source: Linters/SAST tools


Update the GPUI git submodule and all related Cargo.toml references to the latest commit on `origin/main`.
Update GPUI only from a reviewed, supplied full 40-character commit hash. Do
not select a moving ref.

### Steps

1. **Fetch latest from remote**:
```bash
cd vendor/gpui && git fetch origin
```
1. Confirm target hash is exactly 40 lowercase hexadecimal characters and
record current hash and package versions from root `Cargo.toml`.

2. **Identify target commit**: Use the latest commit on `origin/main` (or a specific commit/branch if the user provides one via `$ARGUMENTS`).
```bash
git log --oneline origin/main -5
```
2. Update every `https://github.com/BumpyClock/gpui` dependency declaration in
committed manifests. Keep each declaration's package alias and features, and
set both its `rev` and exact `version = "=X.Y.Z"`. This currently includes
`gpui` (`package = "bumpyclock-gpui"`), `gpui_platform`, `gpui-macros`
(`package = "gpui_macros"`), and `sum-tree` (`package = "sum_tree"`).
Search all `Cargo.toml` files; do not leave a GPUI-family package on a
previous revision.

3. **Update submodule pointer**:
```bash
git -C vendor/gpui checkout <commit-hash>
```

4. **Update `Cargo.toml`**: Find all `rev = "..."` entries pointing to the gpui git repo in the workspace `Cargo.toml` and update them to the new commit hash. The entries look like:
```toml
gpui = { git = "https://github.com/BumpyClock/gpui", rev = "<old-hash>", ... }
gpui_platform = { git = "https://github.com/BumpyClock/gpui", rev = "<old-hash>", ... }
```
Update both `rev` values to the **full** commit hash.
3. Update `[gpui]` and every `[[gpui.packages]]` entry in
`compatibility.toml` with same revision and exact package versions.
Regenerate and verify derived document:

5. **Build and verify**:
```bash
cargo build
cargo xtask compatibility generate
cargo xtask compatibility check
```

6. **If build fails**: Inspect errors and fix any breaking API changes in the codebase. Common issues:
- Borrow checker issues from upstream tree-sitter/API changes
- New/removed/renamed methods in gpui APIs
- Changed trait signatures
4. For coordinated source testing only, a sibling GPUI checkout may be wired
through an uncommitted `.cargo/config.toml` patch. Patch the actual packages
`bumpyclock-gpui`, `gpui_platform`, `gpui_macros`, and `sum_tree`; add
further resolved GPUI packages when needed. The committed manifest's
package identity must already match the checkout. Remove the override
before release checks. Never place it in a committed manifest or config.

5. Build, test, and check release plan:

7. **Run clippy**:
```bash
cargo clippy -- --deny warnings
cargo fmt --all -- --check
cargo metadata --locked
cargo check --workspace --all-targets --locked
cargo test --workspace --all-targets --locked
./script/clippy --locked
cargo xtask publish-plan
cargo xtask release-check
```
Comment on lines +41 to 51

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Include all required validation gates in the skill.

The workflow covers tests, Clippy, publish-plan, and release-check, but omits formatting, spell checking, and dependency checks required by the repository instructions. Add the project’s canonical commands so following this skill cannot skip those gates.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/update-gpui/SKILL.md around lines 41 - 48, Update the “Build,
test, and check release plan” workflow in SKILL.md to include the repository’s
canonical formatting, spell-checking, and dependency-check commands alongside
the existing cargo test, Clippy, publish-plan, and release-check gates. Use the
exact project-standard commands and preserve all existing validation steps.

Source: Coding guidelines


8. **Report summary**: Show old commit, new commit, what changed (list new commits), and whether build/clippy passed.
6. Report old/new revision, package versions, compatibility result, and
validation results. Version selection, tag creation, and publication need
separate owner authorization.

### Notes

- The submodule is at `vendor/gpui` and tracks `https://github.com/BumpyClock/gpui`.
- The `Cargo.toml` at the workspace root has `[workspace.dependencies]` entries for `gpui` and `gpui_platform` that pin to a specific `rev`.
- Always update both the submodule pointer AND the Cargo.toml rev in lockstep.
- **Always use `git + rev` dependencies, never path dependencies.** GPUI lives in its own repo; gpui-component consumes it as a git dependency.
- Use full 40-char commit hashes in `rev = "..."` for reproducibility.
- The submodule may need `git submodule update --init vendor/gpui` if not yet initialized.
- If `$ARGUMENTS` contains a specific commit hash or branch, use that instead of `origin/main`.
- Committed GPUI dependencies use only canonical Git URL, full immutable
revision, and exact version.
- Repository has no GPUI submodule. Local sibling source is a temporary,
uncommitted development override only.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[alias]
xtask = "run --locked --package xtask --"

[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-arg=/STACK:8000000"]
81 changes: 39 additions & 42 deletions .claude/skills/update-gpui/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,62 @@
---
name: update-gpui
description: Update GPUI submodule to the latest commit. Use when asked to update, bump, or upgrade the gpui dependency.
description: Update all immutable GPUI Git pins and compatibility metadata. Use when asked to update, bump, or upgrade GPUI.
user_invocable: true
---

## Instructions

Update the GPUI git submodule and all related Cargo.toml references to the latest commit on `origin/main`.
Update GPUI only from a reviewed, supplied full 40-character commit hash. Do
not select a moving ref.

### Steps

1. **Fetch latest from remote**:
```bash
cd vendor/gpui && git fetch origin
```

2. **Identify target commit**: Use the latest commit on `origin/main` (or a specific commit/branch if the user provides one via `$ARGUMENTS`).
```bash
git log --oneline origin/main -5
```
1. Confirm target hash is exactly 40 lowercase hexadecimal characters and
record current hash and package versions from root `Cargo.toml`.

3. **Update submodule pointer**:
```bash
git -C vendor/gpui checkout <commit-hash>
```
2. Update every `https://github.com/BumpyClock/gpui` dependency declaration in
committed manifests. Keep each declaration's package alias and features, and
set both its `rev` and exact `version = "=X.Y.Z"`. This currently includes
`gpui` (`package = "bumpyclock-gpui"`), `gpui_platform`, `gpui-macros`
(`package = "gpui_macros"`), and `sum-tree` (`package = "sum_tree"`).
Search all `Cargo.toml` files; do not leave a GPUI-family package on a
previous revision.

4. **Update `Cargo.toml`**: Find all `rev = "..."` entries pointing to the gpui git repo in the workspace `Cargo.toml` and update them to the new commit hash. The entries look like:
```toml
gpui = { git = "https://github.com/BumpyClock/gpui", rev = "<old-hash>", ... }
gpui_platform = { git = "https://github.com/BumpyClock/gpui", rev = "<old-hash>", ... }
```
Update both `rev` values to the **full** commit hash.
3. Update `[gpui]` and every `[[gpui.packages]]` entry in
`compatibility.toml` with same revision and exact package versions.
Regenerate and verify derived document:

5. **Build and verify**:
```bash
cargo build
cargo xtask compatibility generate
cargo xtask compatibility check
```

6. **If build fails**: Inspect errors and fix any breaking API changes in the codebase. Common issues:
- Borrow checker issues from upstream tree-sitter/API changes
- New/removed/renamed methods in gpui APIs
- Changed trait signatures
4. For coordinated source testing only, a sibling GPUI checkout may be wired
through an uncommitted `.cargo/config.toml` patch. Patch the actual packages
`bumpyclock-gpui`, `gpui_platform`, `gpui_macros`, and `sum_tree`; add
further resolved GPUI packages when needed. The committed manifest's
package identity must already match the checkout. Remove the override
before release checks. Never place it in a committed manifest or config.

5. Build, test, and check release plan:

7. **Run clippy**:
```bash
cargo clippy -- --deny warnings
cargo fmt --all -- --check
cargo metadata --locked
cargo check --workspace --all-targets --locked
cargo test --workspace --all-targets --locked
./script/clippy --locked
cargo xtask publish-plan
cargo xtask release-check
```
Comment on lines +41 to 51

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Include all required validation gates in this workflow.

The procedure runs tests, Clippy, compatibility, and release commands, but does not explicitly run formatting, spell checking, dependency checks, or locked metadata/workspace validation. Add those checks, or document the exact command that delegates each one, before reporting the update as fully validated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/update-gpui/SKILL.md around lines 41 - 48, Expand the “Build,
test, and check release plan” workflow to include explicit formatting, spell
checking, dependency checks, and locked metadata/workspace validation, or
document the exact delegated command for each gate. Keep the existing test,
Clippy, publish-plan, and release-check commands, and require all validation
gates to pass before reporting the update as fully validated.

Source: Coding guidelines


8. **Version + compatibility bookkeeping** (this skill is the ONLY place a gpui rev changes — see docs/learned/app-platform-plan.md D6):
- Bump `[workspace.package] version` in the root `Cargo.toml` (minor bump for a gpui rev change or breaking API change while pre-1.0; patch otherwise). Keep the `version = "X.Y.Z"` values inside `[workspace.dependencies]` for the path crates (`gpui-component`, `gpui-component-*`) in sync.
- Add a row to `docs/COMPATIBILITY.md` pairing the new workspace version with the new gpui rev.
- After the change lands on `main`, create the annotated tag: `git tag -a v<version> -m "gpui-component v<version> (gpui <shortsha>)"` and push it. Apps pin these tags — never bare revs.

9. **Report summary**: Show old commit, new commit, what changed (list new commits), whether build/clippy passed, and the new workspace version + tag.
6. Report old/new revision, package versions, compatibility result, and
validation results. Version selection, tag creation, and publication need
separate owner authorization.

### Notes

- The submodule is at `vendor/gpui` and tracks `https://github.com/BumpyClock/gpui`.
- The `Cargo.toml` at the workspace root has `[workspace.dependencies]` entries for `gpui` and `gpui_platform` that pin to a specific `rev`.
- Always update both the submodule pointer AND the Cargo.toml rev in lockstep.
- **Always use `git + rev` dependencies, never path dependencies.** GPUI lives in its own repo; gpui-component consumes it as a git dependency.
- Use full 40-char commit hashes in `rev = "..."` for reproducibility.
- The submodule may need `git submodule update --init vendor/gpui` if not yet initialized.
- If `$ARGUMENTS` contains a specific commit hash or branch, use that instead of `origin/main`.
- Committed GPUI dependencies use only canonical Git URL, full immutable
revision, and exact version.
- Repository has no GPUI submodule. Local sibling source is a temporary,
uncommitted development override only.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01_bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Use English with clear and concise description of the bug, if you just have a qu

## Environment

- GPUI: [e.g., v0.2.2]
- GPUI: [e.g., bumpyclock-gpui =0.1.0, commit d1a6019136eb9fb9386eaa047a7445c1032d8668]
- GPUI Component: [e.g., v0.4.0]
- Platform: [e.g., macOS 26, Windows 11, Ubuntu 20.04]

Expand Down
87 changes: 61 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
name: Test
compile:
name: Compile and lint
Comment thread
coderabbitai[bot] marked this conversation as resolved.
strategy:
fail-fast: false
matrix:
Expand All @@ -26,26 +29,28 @@ jobs:
run_on: windows-latest
runs-on: ${{ matrix.run_on }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
with:
components: clippy
- name: Install system dependencies
if: ${{ matrix.run_on != 'windows-latest' }}
run: script/bootstrap
- name: Machete
if: ${{ matrix.run_on == 'macos-latest' }}
uses: bnjbvr/cargo-machete@v0.9.1
uses: bnjbvr/cargo-machete@7959c845782fed02ee69303126d4a12d64f1db18 # v0.9.1
- name: Setup | Cache Cargo
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: test-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
key: compile-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
- name: Typo check
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
Expand All @@ -55,23 +60,51 @@ jobs:
typos
- name: Lint (macOS)
if: ${{ matrix.run_on == 'macos-latest' }}
run: ./script/clippy
run: ./script/clippy --locked
- name: Lint (Linux)
if: ${{ matrix.run_on == 'ubuntu-latest' }}
run: ./script/clippy
run: ./script/clippy --locked
- name: Lint (Windows)
if: ${{ matrix.run_on == 'windows-latest' }}
run: ./script/clippy.ps1
# Tests are intentionally NOT run in CI — they are run locally before
# merge (repo policy; see CLAUDE.md "Testing"). CI gates on lint (which
# compiles all targets), typos, machete, and the native launch smoke below.
run: ./script/clippy.ps1 --locked

unit-and-headless:
name: Unit, doctest, and headless tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
- name: Install system dependencies
run: script/bootstrap
- name: Run maintained unit and headless tests
run: cargo test --workspace --all-targets --locked
- name: Run doctests
run: cargo test --workspace --doc --locked

compatibility-and-packaging:
name: Compatibility and package manifests
needs: unit-and-headless
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
- name: Install system dependencies
run: script/bootstrap
- name: Show publication prerequisites
run: cargo xtask publish-plan
- name: Validate compatibility and package artifacts
run: cargo xtask release-check

# Native launch smoke test for the app-platform conformance examples
# (examples/app_shell single-window, examples/app_shell_background zero-window
# background liveness). Each
# example boots the real shell, opens its window(s), then `--smoke` requests a
# clean quit and exits 0. See docs/learned/app-platform-plan.md §5 Phase 1 and
# §6 gate 7. Keep the matrix in sync with the `test` job above.
# §6 gate 7. Keep the matrix in sync with the `compile` job above.
native-launch-smoke:
name: Native launch smoke
strategy:
Expand All @@ -86,16 +119,18 @@ jobs:
run_on: windows-latest
runs-on: ${{ matrix.run_on }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
- name: Install system dependencies
if: ${{ matrix.run_on != 'windows-latest' }}
run: script/bootstrap
# Build on every OS: this exercises the full D4 identity chain (build.rs +
# include_identity!) cross-platform, even where we do not launch a
# GPU-backed window below.
- name: Build conformance examples
run: cargo build -p app_shell -p app_shell_background
run: cargo build --locked -p app_shell -p app_shell_background
# Launch smoke runs on macOS only. Platform parity (CLAUDE.md) requires
# documenting why the other two are gated off rather than silently skipped:
# - macOS: GitHub arm64 runners provide a working Metal device; the
Expand All @@ -104,18 +139,18 @@ jobs:
# and no Vulkan device, so a native launch needs both xvfb and a
# software driver (lavapipe) that is not guaranteed present. Gated off
# to avoid flaky reds; enable once the runner image ships them:
# xvfb-run -a cargo run -p app_shell -- --smoke
# xvfb-run -a cargo run -p app_shell_background -- --smoke
# xvfb-run -a cargo run --locked -p app_shell -- --smoke
# xvfb-run -a cargo run --locked -p app_shell_background -- --smoke
# - Windows: GPUI renders via DirectX; headless runners have no reliable
# present surface. Gated off pending a WARP-backed offscreen path:
# cargo run -p app_shell -- --smoke
# cargo run -p app_shell_background -- --smoke
# cargo run --locked -p app_shell -- --smoke
# cargo run --locked -p app_shell_background -- --smoke
- name: Native launch smoke (macOS)
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
cargo run -p app_shell -- --asset-smoke
cargo run -p app_shell -- --smoke
cargo run -p app_shell_background -- --smoke
cargo run --locked -p app_shell -- --asset-smoke
cargo run --locked -p app_shell -- --smoke
cargo run --locked -p app_shell_background -- --smoke
# This path opens no window, so it does not require a render surface.
# Windows is included because GPUI's Windows `quit` path exits with status
# zero; AppShell must preserve a transactional startup failure as nonzero.
Expand All @@ -124,7 +159,7 @@ jobs:
shell: bash
run: |
set +e
output="$(cargo run -p app_shell -- --fail-start 2>&1)"
output="$(cargo run --locked -p app_shell -- --fail-start 2>&1)"
exit_code=$?
set -e
printf '%s\n' "$output"
Expand All @@ -147,7 +182,7 @@ jobs:
# native-error promotion, and exit explicitly.
$ErrorActionPreference = 'Continue'
$PSNativeCommandUseErrorActionPreference = $false
cargo run -p app_shell -- --fail-start *> app_shell_fail_start.log
cargo run --locked -p app_shell -- --fail-start *> app_shell_fail_start.log
$exitCode = $LASTEXITCODE
$output = Get-Content app_shell_fail_start.log -Raw
Write-Output $output
Expand Down
Loading
Loading