[PR #6026] [MERGED] Keep Creative item tooltips visible between slots #6614

Closed
opened 2026-11-03 06:23:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6026
Author: @oskal675-design
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/inventory-slot-hover


📝 Commits (1)

  • 003985a Keep Creative item tooltips continuous across slot gaps

📊 Changes

3 files changed (+170 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -8)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSlotHoverOracle.java (+45 -0)
➕ tools/creative_hover_e2e.py (+118 -0)

📄 Description

🤖 Opened by oskal675-design's AI agent (Codex, GPT-6), not by oskal675-design personally.

What and why

Creative's item grid and hotbar used separate 16×16 hover checks for highlights and tooltips. Vanilla's slot hit area includes one pixel of padding on every side, so the two-pixel spaces between adjacent items still belong to a slot. Clicking already used the correct padded target in Horizon.

Reuse that same target once per Creative render pass for both highlights and tooltips. This keeps the hovered item continuous across slot boundaries without changing click targeting.

Fixes #5959. Claim confirmed before implementation.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Read actual 26.3 AbstractContainerScreen.isHovering (both overloads) and CreativeModeInventoryScreen.extractRenderState with tools/rea_vanilla.py.

tools/creative_hover_e2e.py invokes actual AbstractContainerScreen.getHoveredSlot through VanillaSlotHoverOracle, then compares its expected tooltip presence with screenshots of a real integrated-server client. Fifty samples cover Creative grid columns, rows, hotbar boundaries at exact/quarter-pixel positions, item centers, Survival and outside-slot controls. The baseline has 24 missing tooltips (26/50 match); the fix passes 50/50.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on omarchy, against origin/main at 4b87c5409, 4 min 24 s)

Check Result
Scope ✅ 3 files, +170 −8
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 522 passed (22 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 6 s)
tests: horizon-client ✅ 1702 passed (2 min 48 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 317 affected, to run in CI (--quick): blending, block_removal, block_survival, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen, chest_pair and 305 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Additional verification:

python3 tools/creative_hover_e2e.py --game launcher/target/fast/horizon-client --ctl launcher/target/fast/horizon-ctl --output .local/hover-after-fixed
# 50/50 rendered tooltip samples match vanilla
python3 tools/port_ledger.py check --base origin/main
# No new gaps or stale citations

The GUI test requires Pillow, as the existing bundle-tooltip render test does, and prepared 26.3 resources. Every game uses fresh isolated homes.

Screenshots

At the same position in the gap between the first two Creative items:

Before
After

Please allow maintainer edits.

🤖 Generated with Codex.


🔄 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/6026 **Author:** [@oskal675-design](https://github.com/oskal675-design) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/inventory-slot-hover` --- ### 📝 Commits (1) - [`003985a`](https://github.com/horizon-rust/horizon/commit/003985afa4d80d0728600d162a769d08fcc2c00e) Keep Creative item tooltips continuous across slot gaps ### 📊 Changes **3 files changed** (+170 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -8) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSlotHoverOracle.java` (+45 -0) ➕ `tools/creative_hover_e2e.py` (+118 -0) </details> ### 📄 Description > 🤖 Opened by oskal675-design's AI agent (Codex, GPT-6), not by oskal675-design personally. ## What and why Creative's item grid and hotbar used separate 16×16 hover checks for highlights and tooltips. Vanilla's slot hit area includes one pixel of padding on every side, so the two-pixel spaces between adjacent items still belong to a slot. Clicking already used the correct padded target in Horizon. Reuse that same target once per Creative render pass for both highlights and tooltips. This keeps the hovered item continuous across slot boundaries without changing click targeting. Fixes #5959. Claim confirmed before implementation. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Read actual 26.3 `AbstractContainerScreen.isHovering` (both overloads) and `CreativeModeInventoryScreen.extractRenderState` with `tools/rea_vanilla.py`. `tools/creative_hover_e2e.py` invokes actual `AbstractContainerScreen.getHoveredSlot` through `VanillaSlotHoverOracle`, then compares its expected tooltip presence with screenshots of a real integrated-server client. Fifty samples cover Creative grid columns, rows, hotbar boundaries at exact/quarter-pixel positions, item centers, Survival and outside-slot controls. The baseline has 24 missing tooltips (26/50 match); the fix passes 50/50. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on omarchy, against origin/main at 4b87c5409, 4 min 24 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +170 −8 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 522 passed (22 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 6 s) | | tests: horizon-client | ✅ 1702 passed (2 min 48 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 317 affected, to run in CI (--quick): blending, block_removal, block_survival, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen, chest_pair and 305 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Additional verification: ```sh python3 tools/creative_hover_e2e.py --game launcher/target/fast/horizon-client --ctl launcher/target/fast/horizon-ctl --output .local/hover-after-fixed # 50/50 rendered tooltip samples match vanilla python3 tools/port_ledger.py check --base origin/main # No new gaps or stale citations ``` The GUI test requires Pillow, as the existing bundle-tooltip render test does, and prepared 26.3 resources. Every game uses fresh isolated homes. ## Screenshots At the same position in the gap between the first two Creative items: ![Before](https://raw.githubusercontent.com/oskal675-design/horizon/1fdbe1ad015b7b203ff88aff22d6b98046bd8c45/before.png) ![After](https://raw.githubusercontent.com/oskal675-design/horizon/1fdbe1ad015b7b203ff88aff22d6b98046bd8c45/after.png) Please allow maintainer edits. 🤖 Generated with [Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:23:49 +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#6614
No description provided.