代码复审 p2-2items / 视觉复审 p2-2items 的修复轮(配色重拍等 M70 定案)。
M69 迁移(2 行)
- nav 轨宽:nav_rail_width(metrics) 函数体改用 metrics.nav_rail_width
- theme::STROKE_PX 改为 pub use unlucky_design::stroke::HAIRLINE as STROKE_PX
P2-1 零硬编码守门补洞(reviewer 造样 5 个漏网样本全部补上,并进自检正向断言)
- COLOR 调用表补 from_rgb8 / rgb8 / rgba(`from_rgb(` 子串匹配不到 `from_rgb8(` 是根因)
- 新增 `Color { r: .., g: .. }` 结构体字面量检查
- 尺寸规则遇到 Length::Fixed( / Padding::from( / Size::new( 往里剥一层再判数字
- 新增渲染层回归守门 pill_never_overrides_its_size_with_fill(禁 nav.rs 出现 center_*( ):
视觉复审 P2-1 的病根就是 center_*(Length::Fill) 把容器尺寸覆盖成 Fill
视觉 P2-1 药丸 88×32 → 56×32(实测 x=16..71)
- 去掉 center_x/center_y(Fill);居中改由父 column 的 align_x + 显式 width(轨宽) 完成
(只去掉 center_* 还不够:column 会 shrink 到 56,药丸贴左缘 x=0..55,是同一个坑的第二层)
视觉 P2-2 / 用户点名 caption 图标 46 → 24(按钮容器保持 46×48)
- button 内包 container(...).width(24).height(24).center(Length::Fill):
只设 width/height 会让容器缩到 24 并贴 button 内容左上角;center(Fill) 才既撑满又居中
视觉 P3-1 东侧/南侧缩放热区改成叠层
- 原来是 row 的兄弟列,吃掉 4px 布局宽(右留白 28、关闭键离窗角 4px);
现在用 stack! + 对齐容器叠在工作区上,布局宽回到 1180(卡片右缘 x=1155 = 右留白 24)
P3 清单
1. --data-dir 接受并忽略(翻牌前 CI 兼容;现役 smoke 命令行可原样跑,exit 0)+ 单测
2. --diff 内建 ±N px 平移扫描(--diff-scan),CI 不再依赖 numpy
3. 截图模式等 SystemTheme 到达才出图(否则暗色系统上会拍到浅色)
4. (Auto, 未编入 wgpu) 返回 tiny-skia,不再把 wgpu 写进候选列表
5. --renderer=gpu 也跳过适配器枚举(决策与探测无关,省 ~0.6~1.2s)
6. icons::handle 加 debug_assert_eq!(IconKind::ALL[kind as usize], kind)
7. 轨顶留白改 container padding-top,实测 24(原来 spacer + column spacing = 28)
顺带:shot.rs 拆成 shot/mod.rs + shot/diff.rs(≤400 行门禁)
门禁:fmt OK / clippy -D warnings 干净 / 46+5 测试全过 / cargo check --workspace --all-targets OK
体积:双后端 6,769,664 B(6.46 MiB)、仅 CPU 3,955,712 B(3.77 MiB)
截图:r1 代码验证图(r1-verify / hover / pressed / compare-nav-rail)已出;4 张交付主图待 M70 定案后重拍
Unlucky Launcher (ULL)
English · 简体中文
Official project home: https://github.com/AskaEth/Unlucky-Launcher
Unlucky Launcher (ULL) is a free, open-source Minecraft: Java Edition launcher written in Rust (Apache-2.0, non-commercial), with a Slint + Metro UI. It embeds an AI agent client (chat / configuration / crash diagnosis) and integrates with the broader agent tooling ecosystem via MCP. Minimum baseline: Windows 10.
- Runtime: a single native Rust binary — no JVM, no WebView, no external runtime
- UI: Slint (Royalty-Free 2.0; GL preferred, CPU software-rendering fallback so older machines without a usable GPU still get the full UI)
- License: Apache-2.0 © AskaEth (YeiJ)
Compliance statement
Authentication uses only official Microsoft/Mojang endpoints — Microsoft OAuth 2.0 device code flow, Xbox Live, XSTS, and api.minecraftservices.com — so players sign in with their own Microsoft account and launch the game they already own. Account tokens are stored only on the user's local machine and are never sent to any server operated by the project. ULL does not distribute, mirror, proxy or modify any Minecraft game files. Online play always requires a Microsoft account with valid entitlements. Local offline profiles never contact Microsoft or Mojang services and cannot join online-mode servers. Not affiliated with Mojang or Microsoft.
Status
The core engine is complete (workspace: 983+ tests passing):
- Microsoft sign-in: OAuth 2.0 device code flow → Xbox Live → XSTS → Minecraft Services, with entitlement verification
- Account credentials are stored only on the local machine — never uploaded, and inaccessible to the AI features
- Mod loaders: Forge / NeoForge / Fabric / Quilt, verified on real machines
- Java management: Temurin / Oracle / Microsoft / Zulu with a regional fallback chain
- Multi-source download engine; YAML rule-based crash diagnosis
- Usable as an MCP server for external agent tooling (
ull agent serve) - Local offline profiles: for local / isolated-network testing only; they perform no Microsoft authentication and cannot join servers with online-mode enabled
CLI (ull) is fully usable: install / launch / accounts / java / diagnose / agent.
GUI in development: crates/app is currently a Slint + Metro skeleton; the theme system and
the full interface ship with subsequent versions — use the CLI until then.
Module map
Unlucky-Launcher (cargo workspace)
├── crates/core # domain library, zero UI dependencies, eight modules
├── crates/agent # AI agent: ToolSpec registry + built-in client + MCP server (one shared core)
├── crates/app # Slint UI: the only crate allowed to depend on a UI framework
├── crates/cli # CLI (bin `ull`): headless, zero UI, depends on core + agent
└── packaging # single-file artifact matrix and packaging assets (planned)
The eight modules of crates/core:
| Module | Responsibility |
|---|---|
setting |
three data-directory modes, schema-based config, atomic writes, migrations |
download |
multi-source health scoring, mirrors, chunked downloads, hash-while-downloading |
game |
version / instance repository, snapshots and inheritance resolution |
launch |
10-stage launch pipeline, processes, JSONL event stream |
auth |
Microsoft sign-in / local offline profiles |
addon |
mod loader installation, modpacks, CurseForge / Modrinth |
diagnose |
five signal collectors, YAML rule engine, hs_err parsing |
platform |
OS abstraction: paths, processes, file locks, capability probing, runtime OS detection |
Building
Prerequisites:
- Rust stable (
rust-toolchain.tomlselects the toolchain automatically; componentsrustfmt/clippy) - Windows: MSVC toolchain (used by CI) or MinGW-w64 (
x86_64-pc-windows-gnu) - Linux:
libxkbcommon-dev libfontconfig1-dev libgl1-mesa-dev libegl1-mesa-dev libwayland-dev libxcb1-dev(Slint winit backend + femtovg build dependencies)
cargo fmt --all --check # formatting
cargo clippy --workspace --all-targets -- -D warnings # lints (zero-warning gate)
cargo test --workspace # tests
cargo build --release # artifact: target/release/unlucky-launcher[.exe]
Software-rendering switch (machines without a usable GPU / with broken drivers):
unlucky-launcher --software-renderer (equivalent to SLINT_BACKEND=winit-software).
Dependency license check (optional locally, required in CI):
cargo deny check licenses bans sources.
CI gates
| Workflow | Content |
|---|---|
.github/workflows/ci.yml |
fmt + clippy + test + build, Windows / Linux matrix |
.github/workflows/guards.yml |
zero-UI guard for core, 400-line-per-file guard, cargo-deny license guard |
Platform baseline
Minimum baseline: Windows 10. Windows 8.1 / 8 / 7 are not supported:
- Windows 10/11 builds use the standard toolchain (MSVC / GNU) — no custom target specs, no
-Zbuild-std, no import-table allowlists - Other platforms: macOS 12+ first class; Linux x64 with X11 preferred, Wayland as the long-term direction; Android Termux experimental, not committed
- UI fallback: Slint software rendering (fully usable on machines without a GPU or with broken drivers)
- Platform independence is expressed through separate test matrices, not separate artifact pipelines; capability differences use feature gates with runtime probing
License and acknowledgements
- This project: Apache License 2.0, see LICENSE; third-party notices in NOTICE
- The GUI uses Slint (Royalty-Free 2.0 track). Per the RF 2.0 obligations an
AboutSlintwidget will be placed on the about page (P2); until then NOTICE and this section serve the attribution duty.
Thanks to HMCL and PCL2 (both GPL-3.0) — these two launchers have accompanied the vast majority of Minecraft players for many years. ULL learned a great deal about design and implementation from them, and this project is dedicated to those two pioneers.