[PR #4032] [MERGED] Launcher: the night frame, a sidebar plate and a top bar of tabs (redesign R3, draft) #5369

Closed
opened 2026-11-03 05:12:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4032
Author: @ludovic111
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-night-shell


📝 Commits (4)

  • 71127f9 Launcher: the night frame, a sidebar plate over the sky and a top bar of tabs (redesign R3)
  • 0d322f4 Launcher: hover layers only while hovered, plates painted in one canvas
  • 3887cee Merge origin/main into feat/launcher-night-shell
  • fe89da2 Merge remote-tracking branch 'origin/main' into feat/launcher-night-shell

📊 Changes

7 files changed (+515 additions, -368 deletions)

View changed files

📝 docs/design-system.md (+5 -0)
📝 launcher/src/blocks.rs (+1 -28)
📝 launcher/src/instances_page.rs (+24 -40)
📝 launcher/src/main.rs (+210 -281)
📝 launcher/src/plate.rs (+41 -18)
📝 launcher/src/servers_page.rs (+1 -1)
➕ launcher/src/shell.rs (+233 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

R1 #3635, R1b #3636 and R2 #3637 are merged. Ludovic saw the screenshots and approved the style on 2026-10-30; main merged in since.
Redesign step R3: the launcher's frame (sidebar and top bar) in the night look.

What

  • launcher/src/shell.rs (new) draws the frame's parts in the night tokens:
    • Sidebar: one translucent card plate from the window's top to its bottom, with a 1 px stroke on
      its right edge. It holds the wordmark, instances by group, servers, the launcher's update, the links
      and the version.
    • Rows: 52 px. The selected row sits on card_hi with corners cut in two pixel steps. A hovered row
      gets the same shape at half opacity, eased in (hover_fade). The second line is the row's state,
      after a 6 px square in the state's colour ("Ready · 26.3" green, "Needs preparing" amber, a server's
      Running/Stopped).
    • Top bar: sits over the pages only. It has no plate, only a rule. Tabs are text, without icons;
      the page shown sits on a plate cut in one step. Settings and the sidebar's + are icon buttons of
      the same shape.
    • Account chip: a plate cut in one step. A signed-in account shows its face (its UUID's default
      skin, as the server pages do); offline players keep the person icon.
  • Layout: the sidebar now runs the window's full height and the top bar starts at the sidebar's edge,
    as in the R0 mockup. Before, the top bar ran across the whole window above the sidebar.
  • Java instances say Java 1.21.1 · Fabric 0.16.9 in the sidebar (was Minecraft 1.21.1). They show
    no state square: they have nothing of Horizon's to prepare (before, they showed the amber
    "preparing" dot).
  • Code moved, not added: hover_layer's easing became hover_fade, for layers of any shape;
    blocks::side_item was removed (no other user). The click handlers, can_start guards and every
    page's content are unchanged.
  • docs/design-system.md "Night": a paragraph on the frame.

What it doesn't do yet (next steps, each its own draft):

  • Labels: the tabs keep today's pages and names (Home, Mods, Servers, Versions, Patch notes). R0's
    Browse/Instances names, and moving Versions and Patch notes off the bar, come with the screens that
    give them a new home (R4 Home, R8 Browse), so nothing becomes unreachable in between.

  • Sculk: the partner card stays in the sidebar for now. R0 moves it to Home's lower area and
    Settings → About, in R4.

  • Fewer elements per frame: a row or tab that isn't hovered builds no hover layer, and plate::cut
    paints its rectangles in one canvas instead of one div each (a plate is 2 elements instead of ~25).
    The frame redraws on each sky step, so this keeps it small as more plates arrive (R4+). No measurable
    idle change today (see below).

Size: about +480 −340 over 7 files (shell.rs is 230 lines).

Screenshots (real launcher, scratch homes, 1280×800 at 1x, Mac mini)

  • ~/builds/horizon/launcher-redesign-2/r3-home-night-1280x800.png, r3-home-dawn-1280x800.png
  • ~/builds/horizon/launcher-redesign-2/r3-java-mods-night-1280x800.png (a Fabric instance's installed
    mods with their On/Off switches, #3718)
  • ~/builds/horizon/launcher-redesign-2/r3-servers-night-1280x800.png
  • before: ~/builds/horizon/launcher-redesign-2/r2b-home-night-before-r3.png

Performance (Mac mini M4 Pro, launcher CPU over 45 s at rest after 15 s, release builds)

The first R3 measurement (2.53 % vs R2's 1.33 %) was wrong: the scratch home was downloading a Horizon
nightly in the background (auto-install), under a load average of 35–45. With auto-install off in the
scratch settings, alternating runs:

Build Idle CPU (% of one core) RSS
R2 (main, #3637) 0.91 / 0.91 / 0.84 119 MB
R3, first commit 0.73 / 0.64 119 MB
R3, this head 0.98 / 0.93 / 0.89 119–120 MB

R3 adds no clock: the sky's half-second beat stays the only one, and hover layers animate only while the
pointer moves. Startup (horizon-launcher benchmark --repeats 5): 180–544 ms to the first frame (R2 in
the same session, under heavier load: 544–2240 ms); scrolling median 16.7 ms, p95 17.6–22.7 ms.

Against the brief's list

  • Pixel identity: plates and tabs use the same 4 px steps as the sky; no smooth large radii, no shadows,
    no gradients on the frame.
  • Real content: the sidebar is the instances (their icons, version, loader, state) and servers; no
    decorative cards were added.
  • Restraint: the accent stays on Play only; the frame is ink on plates; two type sizes (UI 14, caption 12)
    plus the wordmark.
  • Copy: unchanged labels; the Java line says what it plays ("Java 1.21.1 · Fabric 0.16.9").
  • Motion: hover fades only (90–150 ms); nothing moves at rest beyond the sky.

Self-check

Launcher: cargo fmt --check ✅, cargo clippy --all-targets -- -D warnings ✅, lib tests ✅ 278,
bin tests for plate and sky ✅ 10 (including a new one for where a plate's rectangles land).

Self-check (after merging main, head fe89da2a2)

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 0a341cc35, 10 min 14 s)

Check Result
Scope ⚠️ 7 files, +515 −368; 878 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (2 min 31 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (4 s)
launcher clippy ✅ (4 min 0 s)
launcher tests ✅ 278 passed (3 min 38 s)
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Scope: the 878 lines counted include the moved code (+515 −368); R3 is one frame and doesn't ship in parts.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4032 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-night-shell` --- ### 📝 Commits (4) - [`71127f9`](https://github.com/horizon-rust/horizon/commit/71127f982f2385f5265cf3875b9f504dad221eb2) Launcher: the night frame, a sidebar plate over the sky and a top bar of tabs (redesign R3) - [`0d322f4`](https://github.com/horizon-rust/horizon/commit/0d322f4fca7b5a7d2ffeccaefe18dbd5ee23d26b) Launcher: hover layers only while hovered, plates painted in one canvas - [`3887cee`](https://github.com/horizon-rust/horizon/commit/3887ceefecbb2c399ffad43a663277d69226cced) Merge origin/main into feat/launcher-night-shell - [`fe89da2`](https://github.com/horizon-rust/horizon/commit/fe89da2a2c295591adc9aa98e0d6a3c30f25b300) Merge remote-tracking branch 'origin/main' into feat/launcher-night-shell ### 📊 Changes **7 files changed** (+515 additions, -368 deletions) <details> <summary>View changed files</summary> 📝 `docs/design-system.md` (+5 -0) 📝 `launcher/src/blocks.rs` (+1 -28) 📝 `launcher/src/instances_page.rs` (+24 -40) 📝 `launcher/src/main.rs` (+210 -281) 📝 `launcher/src/plate.rs` (+41 -18) 📝 `launcher/src/servers_page.rs` (+1 -1) ➕ `launcher/src/shell.rs` (+233 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. R1 #3635, R1b #3636 and R2 #3637 are merged. Ludovic saw the screenshots and approved the style on 2026-10-30; main merged in since. Redesign step R3: the launcher's frame (sidebar and top bar) in the night look. ## What - **`launcher/src/shell.rs`** (new) draws the frame's parts in the night tokens: - **Sidebar:** one translucent `card` plate from the window's top to its bottom, with a 1 px stroke on its right edge. It holds the wordmark, instances by group, servers, the launcher's update, the links and the version. - **Rows:** 52 px. The selected row sits on `card_hi` with corners cut in two pixel steps. A hovered row gets the same shape at half opacity, eased in (`hover_fade`). The second line is the row's state, after a 6 px square in the state's colour ("Ready · 26.3" green, "Needs preparing" amber, a server's Running/Stopped). - **Top bar:** sits over the pages only. It has no plate, only a rule. Tabs are text, without icons; the page shown sits on a plate cut in one step. Settings and the sidebar's `+` are icon buttons of the same shape. - **Account chip:** a plate cut in one step. A signed-in account shows its face (its UUID's default skin, as the server pages do); offline players keep the person icon. - **Layout:** the sidebar now runs the window's full height and the top bar starts at the sidebar's edge, as in the R0 mockup. Before, the top bar ran across the whole window above the sidebar. - **Java instances** say `Java 1.21.1 · Fabric 0.16.9` in the sidebar (was `Minecraft 1.21.1`). They show no state square: they have nothing of Horizon's to prepare (before, they showed the amber "preparing" dot). - **Code moved, not added:** `hover_layer`'s easing became `hover_fade`, for layers of any shape; `blocks::side_item` was removed (no other user). The click handlers, `can_start` guards and every page's content are unchanged. - `docs/design-system.md` "Night": a paragraph on the frame. What it doesn't do yet (next steps, each its own draft): - **Labels:** the tabs keep today's pages and names (Home, Mods, Servers, Versions, Patch notes). R0's Browse/Instances names, and moving Versions and Patch notes off the bar, come with the screens that give them a new home (R4 Home, R8 Browse), so nothing becomes unreachable in between. - **Sculk:** the partner card stays in the sidebar for now. R0 moves it to Home's lower area and Settings → About, in R4. - **Fewer elements per frame:** a row or tab that isn't hovered builds no hover layer, and `plate::cut` paints its rectangles in one canvas instead of one div each (a plate is 2 elements instead of ~25). The frame redraws on each sky step, so this keeps it small as more plates arrive (R4+). No measurable idle change today (see below). Size: about +480 −340 over 7 files (shell.rs is 230 lines). ## Screenshots (real launcher, scratch homes, 1280×800 at 1x, Mac mini) - `~/builds/horizon/launcher-redesign-2/r3-home-night-1280x800.png`, `r3-home-dawn-1280x800.png` - `~/builds/horizon/launcher-redesign-2/r3-java-mods-night-1280x800.png` (a Fabric instance's installed mods with their On/Off switches, #3718) - `~/builds/horizon/launcher-redesign-2/r3-servers-night-1280x800.png` - before: `~/builds/horizon/launcher-redesign-2/r2b-home-night-before-r3.png` ## Performance (Mac mini M4 Pro, launcher CPU over 45 s at rest after 15 s, release builds) The first R3 measurement (2.53 % vs R2's 1.33 %) was wrong: the scratch home was downloading a Horizon nightly in the background (auto-install), under a load average of 35–45. With auto-install off in the scratch settings, alternating runs: | Build | Idle CPU (% of one core) | RSS | |---|---|---| | R2 (main, #3637) | 0.91 / 0.91 / 0.84 | 119 MB | | R3, first commit | 0.73 / 0.64 | 119 MB | | **R3, this head** | **0.98 / 0.93 / 0.89** | 119–120 MB | R3 adds no clock: the sky's half-second beat stays the only one, and hover layers animate only while the pointer moves. Startup (`horizon-launcher benchmark --repeats 5`): 180–544 ms to the first frame (R2 in the same session, under heavier load: 544–2240 ms); scrolling median 16.7 ms, p95 17.6–22.7 ms. ## Against the brief's list - Pixel identity: plates and tabs use the same 4 px steps as the sky; no smooth large radii, no shadows, no gradients on the frame. - Real content: the sidebar is the instances (their icons, version, loader, state) and servers; no decorative cards were added. - Restraint: the accent stays on Play only; the frame is ink on plates; two type sizes (UI 14, caption 12) plus the wordmark. - Copy: unchanged labels; the Java line says what it plays ("Java 1.21.1 · Fabric 0.16.9"). - Motion: hover fades only (90–150 ms); nothing moves at rest beyond the sky. ## Self-check Launcher: `cargo fmt --check` ✅, `cargo clippy --all-targets -- -D warnings` ✅, lib tests ✅ 278, bin tests for plate and sky ✅ 10 (including a new one for where a plate's rectangles land). ## Self-check (after merging main, head fe89da2a2) **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 0a341cc35, 10 min 14 s) | Check | Result | | --- | --- | | Scope | ⚠️ 7 files, +515 −368; 878 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (2 min 31 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (4 s) | | launcher clippy | ✅ (4 min 0 s) | | launcher tests | ✅ 278 passed (3 min 38 s) | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Scope: the 878 lines counted include the moved code (+515 −368); R3 is one frame and doesn't ship in parts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:05 +07:00
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5369
No description provided.