Skip to content

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

Draft
ArtuArtaza wants to merge 1 commit into
xcl-dev:mainfrom
ArtuArtaza:feat/xcl-menu
Draft

ArtuArtaza wants to merge 1 commit into
xcl-dev:mainfrom
ArtuArtaza:feat/xcl-menu

Conversation

@ArtuArtaza

Copy link
Copy Markdown

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

A program of its own in crates/xcl-menu, drawn with gpui-kit. It lists the
games in the folders the user adds, starts one with `xcl run <folder>` and
prepares its shaders ahead of time with `xcl pso-precompile <folder>`. It
links nothing of XCL and is not a member of the workspace, so the root
Cargo.lock and `cargo build --workspace` stay as they are, and CI neither
builds nor tests it.

Five layouts (home, coverflow, blades, orb, classic) drawn from theme
files, six of them built in; keyboard, mouse and controller. The tree
holds no pictures and no fonts: the built-in themes have no background
picture, and a theme whose font is not installed is drawn with Segoe UI.
The network setting is on by default, as with `xcl run`; off, the menu
passes XCL_NETWORK=0.

In crates/xcl-menu, debug, Rust 1.100.0, RX 6700 XT / Ryzen 5 5600X:
cargo build has no warnings; cargo test: 38 passed, 0 failed, 0 ignored.
Not done by hand yet: starting a real game, a real warm-up, controller
input.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Review (head 8eadbd9, 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): Roadmap: retail title past world load #1833 doesn't ask for a launcher, main already has a small menu (crates/xcl/src/launcher.rs, run_from_menu), and open xcl-gui: a window to run XCL, read its log, edit settings and update #1719 (xcl-gui) and Scripts: add a developer launcher with saved presets #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

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs-ci Documentation, scripts, workflows, repo governance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants