[PR #4685] [MERGED] Show the file fixer's progress screen while a world upgrades #5778

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

📋 Pull Request Information

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

Base: main ← Head: parity/42-ui


📝 Commits (1)

  • ffe68c9 Show FileFixerProgressScreen while a world's files are fixed

📊 Changes

8 files changed (+579 additions, -64 deletions)

View changed files

📝 crates/horizon-client-render/src/level_loading.rs (+118 -0)
📝 crates/horizon-client/src/game.rs (+52 -2)
📝 crates/horizon-client/src/game/world_loading.rs (+13 -2)
📝 crates/horizon-client/src/save.rs (+11 -1)
📝 crates/horizon-world/src/datafix/files.rs (+206 -50)
📝 crates/horizon-world/src/datafix/mod.rs (+1 -0)
➕ crates/horizon-world/src/datafix/progress.rs (+169 -0)
📝 tools/port_map/client2-019.tsv (+9 -9)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

What and why

Part of #3518.

Opening a world saved before DataVersion 4899 runs the file fixes with no feedback. This shows vanilla's FileFixerProgressScreen while they run, driven by real progress: a new UpgradeProgress (horizon_world::datafix::progress, from net.minecraft.util.worldupdate.UpgradeProgress) is filled by upgrade_world_with and read by the screen.

Rows:

  • FileFixerProgressScreen.extractRenderState: the upgrade title, then the progress or the scanning line (draw_file_fixer, level_loading.rs), over the menu background.
  • FileFixerProgressScreen.extractProgress: running-fixer bar, totals, stage, type label, type bar and percentage at vanilla's offsets.
  • FileFixerProgressScreen.extractProgressBar: black 200x2 bar, green part round(progress * 200).
  • FileFixerProgressScreen.extractFileStats: upgradeWorld.info.converted / upgradeWorld.info.total.
  • FileFixerProgressScreen.extractFileFixerCount: upgradeWorld.info.file_fix_stage.
  • FileFixerProgressScreen.extractTypeText: upgradeWorld.progress.type.<name> label (regions has no lang entry in vanilla either, so it shows the key).
  • FileFixerProgressScreen.extractTypeProgress: upgradeWorld.progress.percentage, floor(progress * 100).
  • FileFixerProgressScreen.extractScanning: upgradeWorld.info.scanning while no operation is counted.
  • FileFixerProgressScreen.init: Cancel at ((width - 200) / 2, height / 2 + 100), 200x20; pressing it sets the upgrade's cancel and the button goes inactive; Escape does nothing (shouldCloseOnEsc false).

How it follows FileFixerUpper.applyFileFixers: type FILES, count the applicable fixers, setApplicableFixerAmount, incrementRunningFileFixer per fixer, incrementFinishedOperations after each. Horizon's file fixes are whole functions, so a fix counts as one operation. The data upgrade Horizon runs at open (chunks, saved data, players...) reports as type REGIONS with one operation per file.

Limits, stated plainly: vanilla undoes a cancelled upgrade through a copy-on-write filesystem. Horizon's file fixes move files in place, so Cancel is honoured before the first file fix and between files of the data upgrade of a world that needs no file fixing; once the file fixes started they finish. A cancel returns to the title (vanilla then shows an alert and the "join now" confirm after a finished upgrade; those two screens are not part of this PR).

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

FileFixerProgressScreen, UpgradeProgress, FileFixerUpper.applyFileFixers, WorldOpenFlows.upgradeAndOpenWorld. No harness (UI). Unit tests: progress stats and type reset, one operation per file in upgrade_world_with, cancel keeps the DataVersion, Cancel button position. Not run in game.

Self-check

fmt, clippy -D warnings on horizon-world, horizon-client-render, horizon-client (all targets), and the focused tests pass. pr_ready and harnesses not run (CI).

🤖 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/4685 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/42-ui` --- ### 📝 Commits (1) - [`ffe68c9`](https://github.com/horizon-rust/horizon/commit/ffe68c936f1f60341d7dd50c13462ec84f302e06) Show FileFixerProgressScreen while a world's files are fixed ### 📊 Changes **8 files changed** (+579 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/level_loading.rs` (+118 -0) 📝 `crates/horizon-client/src/game.rs` (+52 -2) 📝 `crates/horizon-client/src/game/world_loading.rs` (+13 -2) 📝 `crates/horizon-client/src/save.rs` (+11 -1) 📝 `crates/horizon-world/src/datafix/files.rs` (+206 -50) 📝 `crates/horizon-world/src/datafix/mod.rs` (+1 -0) ➕ `crates/horizon-world/src/datafix/progress.rs` (+169 -0) 📝 `tools/port_map/client2-019.tsv` (+9 -9) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. ## What and why Part of #3518. Opening a world saved before DataVersion 4899 runs the file fixes with no feedback. This shows vanilla's `FileFixerProgressScreen` while they run, driven by real progress: a new `UpgradeProgress` (`horizon_world::datafix::progress`, from `net.minecraft.util.worldupdate.UpgradeProgress`) is filled by `upgrade_world_with` and read by the screen. Rows: - `FileFixerProgressScreen.extractRenderState`: the upgrade title, then the progress or the scanning line (`draw_file_fixer`, `level_loading.rs`), over the menu background. - `FileFixerProgressScreen.extractProgress`: running-fixer bar, totals, stage, type label, type bar and percentage at vanilla's offsets. - `FileFixerProgressScreen.extractProgressBar`: black 200x2 bar, green part `round(progress * 200)`. - `FileFixerProgressScreen.extractFileStats`: `upgradeWorld.info.converted` / `upgradeWorld.info.total`. - `FileFixerProgressScreen.extractFileFixerCount`: `upgradeWorld.info.file_fix_stage`. - `FileFixerProgressScreen.extractTypeText`: `upgradeWorld.progress.type.<name>` label (`regions` has no lang entry in vanilla either, so it shows the key). - `FileFixerProgressScreen.extractTypeProgress`: `upgradeWorld.progress.percentage`, `floor(progress * 100)`. - `FileFixerProgressScreen.extractScanning`: `upgradeWorld.info.scanning` while no operation is counted. - `FileFixerProgressScreen.init`: Cancel at `((width - 200) / 2, height / 2 + 100)`, 200x20; pressing it sets the upgrade's cancel and the button goes inactive; Escape does nothing (`shouldCloseOnEsc` false). How it follows `FileFixerUpper.applyFileFixers`: type FILES, count the applicable fixers, `setApplicableFixerAmount`, `incrementRunningFileFixer` per fixer, `incrementFinishedOperations` after each. Horizon's file fixes are whole functions, so a fix counts as one operation. The data upgrade Horizon runs at open (chunks, saved data, players...) reports as type REGIONS with one operation per file. Limits, stated plainly: vanilla undoes a cancelled upgrade through a copy-on-write filesystem. Horizon's file fixes move files in place, so Cancel is honoured before the first file fix and between files of the data upgrade of a world that needs no file fixing; once the file fixes started they finish. A cancel returns to the title (vanilla then shows an alert and the "join now" confirm after a finished upgrade; those two screens are not part of this PR). ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `FileFixerProgressScreen`, `UpgradeProgress`, `FileFixerUpper.applyFileFixers`, `WorldOpenFlows.upgradeAndOpenWorld`. No harness (UI). Unit tests: progress stats and type reset, one operation per file in `upgrade_world_with`, cancel keeps the DataVersion, Cancel button position. Not run in game. ## Self-check fmt, `clippy -D warnings` on horizon-world, horizon-client-render, horizon-client (all targets), and the focused tests pass. pr_ready and harnesses not run (CI). 🤖 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:14:55 +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#5778
No description provided.