xcl-menu: a themed menu for a controller that starts games with xcl run #3457

Open
ArtuArtaza wants to merge 1 commit from upstream-pr/3457 into main
ArtuArtaza commented 2026-11-29 20:05:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ArtuArtaza on 2026-11-29T20:05:06Z.


A menu for the couch: it lists the games in the folders you add, starts one with xcl run <folder>, and prepares a game's shaders ahead of time with xcl pso-precompile <folder>, with a progress bar, a queue and pause. Keyboard, mouse and controller; five layouts drawn from theme files. It is a program of its own (crates/xcl-menu) that starts xcl.exe from outside: nothing of XCL is linked or changed, and it is not a member of the workspace, so the root Cargo.toml, Cargo.lock and CI time are untouched.

This is a draft, opened to ask whether such a menu is wanted in the tree. It is far over the size target (8,025 lines without its Cargo.lock, in one commit) and is here to be looked at, not merged as it is. If it is wanted I will split it into stacked PRs in this order: the window with the Home layout, settings, library and Play; the shader warm-up; then one PR each for the Cover Flow, Blades, Orb and Classic Blades layouts; controller input; the inspection options; the docs. If it is not, it stays in my fork and this can be closed. It does not bear on the world-load goal (#1833), so it can wait.

Related: #1719 (xcl-gui, an egui window for the log, the settings and updates) asks the same question for a different program, and #1500 adds a developer launcher with presets. This one does neither of those jobs: it is the screen you start a game from with a controller. I am glad to fold it into either, or to drop it in favour of one of them.

What is in it

  • crates/xcl-menu/src/model.rs: the settings file, the library scan (a game is a folder with MicrosoftGame.config), finding xcl.exe, starting xcl run, with tests
  • crates/xcl-menu/src/theme.rs, themes/*.toml: theme files with inherits, the six built-in themes, the user's own from %LOCALAPPDATA%\XCL\menu\themes, with tests
  • crates/xcl-menu/src/warm.rs: running xcl pso-precompile, reading its output into progress, the queue, pause, and each game's last run in warm.toml, with tests
  • crates/xcl-menu/src/pad.rs: controllers through gilrs (stick and D-pad as directions with repeat, the face buttons by position), with tests
  • crates/xcl-menu/src/ui/mod.rs, kit.rs, motion.rs, pages.rs: the window, the targets the arrow keys walk, the buttons' states and eases, the pages every layout shares, with tests
  • crates/xcl-menu/src/ui/home.rs, coverflow.rs, blades.rs, orb.rs, classic.rs, src/gfx.rs: the five layouts, and the radial fills the program paints itself
  • crates/xcl-menu/src/main.rs: the command line (--demo, --theme, --page, and --state, --transition, --offscreen for looking at a state or taking pictures)
  • crates/xcl-menu/README.md, Cargo.toml, Cargo.lock (8,912 lines, generated), and outside the crate only a pointer in README.md and a row in THIRD_PARTY.md
  • New dependencies, of the menu only: gpui-kit (Apache-2.0; the window and drawing), gilrs (controllers), image and smallvec (the fills the program paints itself), toml and serde (themes and settings)
  • No binary files: no pictures and no fonts. The built-in themes have no background picture, and a theme whose font (Hind, Oxanium) is not installed is drawn with Segoe UI

Tested

  • head 8eadbd9, no uncommitted changes, AMD Radeon RX 6700 XT (driver 32.0.21045.29003), AMD Ryzen 5 5600X, Windows 11 Pro build 26200.9974, Rust 1.100.0 (0ef1bc386 2026-11-09), debug
  • in crates/xcl-menu: cargo build: no warnings. cargo test: 38 passed, 0 failed, 0 ignored. The tests open no window and use no GPU
  • cargo tree --target x86_64-pc-windows-msvc -e normal,build: 405 crates, each with a licence of the list in THIRD_PARTY.md (MIT, Apache-2.0, BSD, Zlib, Unicode-3.0, CC0-1.0, MPL-2.0, Unlicense, 0BSD, BSL-1.0, or one of them as an alternative); none is GPL-2.0-only
  • git diff --check: clean

Regression run

  • none: the PR changes no file of crates/xcl, and not the root Cargo.toml or Cargo.lock

Not tested

  • starting a real game from the menu
  • a real warm-up from the menu (xcl pso-precompile run to its end, its progress, pause, the queue)
  • controller input on a real controller
  • the window at this head: it has not been opened since the pictures and fonts of my design were taken out, so the themes without a background picture and the Segoe UI fallback have not been seen on screen
  • cargo test --workspace -- --test-threads=4 was not run: the workspace's code is unchanged and the GPU was in use
  • the branch is on main at fa204595, not rebased onto today's main; git merge-tree finds no conflict with 0fe06eb0
  • NVIDIA and Intel GPUs, Windows 10, a release build
  • CI does not build or test the crate, because it is outside the workspace; I can add a job for it or make it a member if that is preferred

AI use

  • Claude Code: Claude Opus 5.5 agents wrote the code and its tests, and Claude Fable 5.2 planned the work, reviewed it, ran the build and the tests above and wrote this description. The layouts and themes follow my own designs. Claude Code also pushed the branch and filled in this pull request's form from my session, at my request.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5554587825 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3457). Originally posted by [ArtuArtaza](https://github.com/ArtuArtaza) on 2026-11-29T20:05:06Z. --- A menu for the couch: it lists the games in the folders you add, starts one with `xcl run <folder>`, and prepares a game's shaders ahead of time with `xcl pso-precompile <folder>`, with a progress bar, a queue and pause. Keyboard, mouse and controller; five layouts drawn from theme files. It is a program of its own (`crates/xcl-menu`) that starts `xcl.exe` from outside: nothing of XCL is linked or changed, and it is not a member of the workspace, so the root `Cargo.toml`, `Cargo.lock` and CI time are untouched. This is a draft, opened to ask whether such a menu is wanted in the tree. It is far over the size target (8,025 lines without its `Cargo.lock`, in one commit) and is here to be looked at, not merged as it is. If it is wanted I will split it into stacked PRs in this order: the window with the Home layout, settings, library and Play; the shader warm-up; then one PR each for the Cover Flow, Blades, Orb and Classic Blades layouts; controller input; the inspection options; the docs. If it is not, it stays in my fork and this can be closed. It does not bear on the world-load goal (#1833), so it can wait. Related: #1719 (`xcl-gui`, an egui window for the log, the settings and updates) asks the same question for a different program, and #1500 adds a developer launcher with presets. This one does neither of those jobs: it is the screen you start a game from with a controller. I am glad to fold it into either, or to drop it in favour of one of them. **What is in it** - `crates/xcl-menu/src/model.rs`: the settings file, the library scan (a game is a folder with `MicrosoftGame.config`), finding `xcl.exe`, starting `xcl run`, with tests - `crates/xcl-menu/src/theme.rs`, `themes/*.toml`: theme files with `inherits`, the six built-in themes, the user's own from `%LOCALAPPDATA%\XCL\menu\themes`, with tests - `crates/xcl-menu/src/warm.rs`: running `xcl pso-precompile`, reading its output into progress, the queue, pause, and each game's last run in `warm.toml`, with tests - `crates/xcl-menu/src/pad.rs`: controllers through `gilrs` (stick and D-pad as directions with repeat, the face buttons by position), with tests - `crates/xcl-menu/src/ui/mod.rs`, `kit.rs`, `motion.rs`, `pages.rs`: the window, the targets the arrow keys walk, the buttons' states and eases, the pages every layout shares, with tests - `crates/xcl-menu/src/ui/home.rs`, `coverflow.rs`, `blades.rs`, `orb.rs`, `classic.rs`, `src/gfx.rs`: the five layouts, and the radial fills the program paints itself - `crates/xcl-menu/src/main.rs`: the command line (`--demo`, `--theme`, `--page`, and `--state`, `--transition`, `--offscreen` for looking at a state or taking pictures) - `crates/xcl-menu/README.md`, `Cargo.toml`, `Cargo.lock` (8,912 lines, generated), and outside the crate only a pointer in `README.md` and a row in `THIRD_PARTY.md` - New dependencies, of the menu only: `gpui-kit` (Apache-2.0; the window and drawing), `gilrs` (controllers), `image` and `smallvec` (the fills the program paints itself), `toml` and `serde` (themes and settings) - No binary files: no pictures and no fonts. The built-in themes have no background picture, and a theme whose font (Hind, Oxanium) is not installed is drawn with Segoe UI **Tested** - head `8eadbd9`, no uncommitted changes, AMD Radeon RX 6700 XT (driver 32.0.21045.29003), AMD Ryzen 5 5600X, Windows 11 Pro build 26200.9974, Rust 1.100.0 (0ef1bc386 2026-11-09), debug - in `crates/xcl-menu`: `cargo build`: no warnings. `cargo test`: 38 passed, 0 failed, 0 ignored. The tests open no window and use no GPU - `cargo tree --target x86_64-pc-windows-msvc -e normal,build`: 405 crates, each with a licence of the list in `THIRD_PARTY.md` (MIT, Apache-2.0, BSD, Zlib, Unicode-3.0, CC0-1.0, MPL-2.0, Unlicense, 0BSD, BSL-1.0, or one of them as an alternative); none is GPL-2.0-only - `git diff --check`: clean **Regression run** - none: the PR changes no file of `crates/xcl`, and not the root `Cargo.toml` or `Cargo.lock` **Not tested** - starting a real game from the menu - a real warm-up from the menu (`xcl pso-precompile` run to its end, its progress, pause, the queue) - controller input on a real controller - the window at this head: it has not been opened since the pictures and fonts of my design were taken out, so the themes without a background picture and the Segoe UI fallback have not been seen on screen - `cargo test --workspace -- --test-threads=4` was not run: the workspace's code is unchanged and the GPU was in use - the branch is on `main` at `fa204595`, not rebased onto today's `main`; `git merge-tree` finds no conflict with `0fe06eb0` - NVIDIA and Intel GPUs, Windows 10, a release build - CI does not build or test the crate, because it is outside the workspace; I can add a job for it or make it a member if that is preferred **AI use** - [Claude Code](https://claude.com/claude-code): Claude Opus 5.5 agents wrote the code and its tests, and Claude Fable 5.2 planned the work, reviewed it, ran the build and the tests above and wrote this description. The layouts and themes follow my own designs. Claude Code also pushed the branch and filled in this pull request's form from my session, at my request. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Foniass commented 2026-12-01 08:33:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:33:26Z.


Review (head 8eadbd99, diff triaged rather than read line by line; draft, not built or run):

  • Whether XCL wants this in the tree is the first question (the PR asks it too): #1833 doesn't ask for a launcher, main already has a small menu (crates/xcl/src/launcher.rs, run_from_menu), and open #1719 (xcl-gui) and #1500 (developer launcher) cover similar ground.
  • Size: one commit of about 8,025 hand-written lines plus an 8,912-line Cargo.lock, far past the 800-line limit. The author's own split (window + Home + settings / library / Play; warm-up; one PR per layout; controller input; inspection options and docs) would work, with a CI job for the crate first.
  • CI doesn't build or test crates/xcl-menu (it sits outside the workspace via an empty [workspace] table), so the reported tests have only run on the author's machine.
  • Dependencies: the lock brings in 819 packages, including a network / TLS stack (tokio, hyper, rustls, ring) and gpui-pre-* / gpui-fast-* forks. Their licences and provenance can't be read from a lockfile, and nobody has checked what gpui-kit-assets bundles (fonts, icons).
  • The window hasn't been opened at this head, and no real game, warm-up or controller has been tried.

Fine: it doesn't touch crates/xcl, the root Cargo.toml or Cargo.lock; no binaries, fonts or images are committed; THIRD_PARTY.md and README.md were updated.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7305474950 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3457#issuecomment-7305474950). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:33:26Z. --- Review (head 8eadbd99, diff triaged rather than read line by line; draft, not built or run): - **Whether XCL wants this in the tree is the first question** (the PR asks it too): #1833 doesn't ask for a launcher, main already has a small menu (`crates/xcl/src/launcher.rs`, `run_from_menu`), and open #1719 (`xcl-gui`) and #1500 (developer launcher) cover similar ground. - **Size:** one commit of about 8,025 hand-written lines plus an 8,912-line `Cargo.lock`, far past the 800-line limit. The author's own split (window + Home + settings / library / Play; warm-up; one PR per layout; controller input; inspection options and docs) would work, with a CI job for the crate first. - **CI doesn't build or test `crates/xcl-menu`** (it sits outside the workspace via an empty `[workspace]` table), so the reported tests have only run on the author's machine. - **Dependencies:** the lock brings in 819 packages, including a network / TLS stack (`tokio`, `hyper`, `rustls`, `ring`) and `gpui-pre-*` / `gpui-fast-*` forks. Their licences and provenance can't be read from a lockfile, and nobody has checked what `gpui-kit-assets` bundles (fonts, icons). - The window hasn't been opened at this head, and no real game, warm-up or controller has been tried. Fine: it doesn't touch `crates/xcl`, the root `Cargo.toml` or `Cargo.lock`; no binaries, fonts or images are committed; `THIRD_PARTY.md` and `README.md` were updated. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 09:57:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:57:11Z.


Triage (#1607) – head 8eadbd9

Overlaps in purpose with #1500 (PowerShell developer launcher with presets) and #1719 (xcl-gui, an egui window for the log, settings and updates): all three are front-ends that start xcl run. This one is a separate controller-oriented crate kept out of the workspace, so it is a different approach, not the same change. The 67 lines shared with #2500 are Cargo.lock entries.
As the description says, it is far over the size limit (about 8,000 lines plus an 8,912-line lockfile, one commit) and CI does not build it; it needs the maintainer's decision on whether a menu belongs in the tree, then the proposed split.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7307449439 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3457#issuecomment-7307449439). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:57:11Z. --- **Triage (#1607)** – head 8eadbd9 Overlaps in purpose with #1500 (PowerShell developer launcher with presets) and #1719 (`xcl-gui`, an egui window for the log, settings and updates): all three are front-ends that start `xcl run`. This one is a separate controller-oriented crate kept out of the workspace, so it is a different approach, not the same change. The 67 lines shared with #2500 are `Cargo.lock` entries. As the description says, it is far over the size limit (about 8,000 lines plus an 8,912-line lockfile, one commit) and CI does not build it; it needs the maintainer's decision on whether a menu belongs in the tree, then the proposed split. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3457:upstream-pr/3457'
git switch 'upstream-pr/3457'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3457'
git switch 'upstream-pr/3457'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3457'
git switch 'upstream-pr/3457'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3457'
git switch 'main'
git merge --squash 'upstream-pr/3457'
git switch 'main'
git merge --ff-only 'upstream-pr/3457'
git switch 'main'
git merge 'upstream-pr/3457'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3457
No description provided.