[PR #4788] [MERGED] Toasts for chunk load and save failures and low disk space #5851

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

📋 Pull Request Information

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

Base: main ← Head: parity/U-chunk-toast


📝 Commits (1)

  • 0580d26 Toast chunk load and save failures and low disk space from the integrated server

📊 Changes

5 files changed (+196 additions, -3 deletions)

View changed files

➕ crates/horizon-client/src/chunk_io.rs (+125 -0)
📝 crates/horizon-client/src/game/server_packs.rs (+31 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/save.rs (+11 -1)
📝 crates/horizon-client/src/toasts.rs (+28 -2)

📄 Description

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

Part of #3518

Rows

  • IntegratedServer.reportChunkLoadFailure: a region record that fails to read is logged, checked for low disk space (MinecraftServer.warnOnLowDiskSpace) and queued for the window, which toasts SystemToast.onChunkLoadFailure (red chunk.toast.loadFailure title, chunk.toast.checkLog).
  • IntegratedServer.reportChunkSaveFailure: a failed region write on the writer thread does the same for every chunk of the batch (SystemToast.onChunkSaveFailure).

Also SystemToast.onLowDiskSpace (LOW_DISK_SPACE, ten second display time). A repeated report resets the toast it already shows (addOrUpdate), so only the newest chunk of each kind is kept. The queue is horizon_client::chunk_io, a process-wide static the server thread writes and the window drains each frame in draw_pack_toasts.

Vanilla followed

IntegratedServer.reportChunkLoadFailure/reportChunkSaveFailure/sendLowDiskSpaceWarning, MinecraftServer.warnOnLowDiskSpace, SystemToast.onLowDiskSpace/onChunkLoadFailure/onChunkSaveFailure, SystemToast.SystemToastId.

Tests

chunk_io::tests (newest chunk kept per kind, display times). cargo clippy -p horizon-client --all-targets -D warnings clean. Not covered: dedicated servers do not send ClientboundLowDiskSpaceWarningPacket yet.

🤖 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/4788 **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/U-chunk-toast` --- ### 📝 Commits (1) - [`0580d26`](https://github.com/horizon-rust/horizon/commit/0580d262daaf9e7406b0e5bcbff856deb3475edf) Toast chunk load and save failures and low disk space from the integrated server ### 📊 Changes **5 files changed** (+196 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client/src/chunk_io.rs` (+125 -0) 📝 `crates/horizon-client/src/game/server_packs.rs` (+31 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/save.rs` (+11 -1) 📝 `crates/horizon-client/src/toasts.rs` (+28 -2) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3518 ## Rows - `IntegratedServer.reportChunkLoadFailure`: a region record that fails to read is logged, checked for low disk space (`MinecraftServer.warnOnLowDiskSpace`) and queued for the window, which toasts `SystemToast.onChunkLoadFailure` (red `chunk.toast.loadFailure` title, `chunk.toast.checkLog`). - `IntegratedServer.reportChunkSaveFailure`: a failed region write on the writer thread does the same for every chunk of the batch (`SystemToast.onChunkSaveFailure`). Also `SystemToast.onLowDiskSpace` (`LOW_DISK_SPACE`, ten second display time). A repeated report resets the toast it already shows (`addOrUpdate`), so only the newest chunk of each kind is kept. The queue is `horizon_client::chunk_io`, a process-wide static the server thread writes and the window drains each frame in `draw_pack_toasts`. ## Vanilla followed `IntegratedServer.reportChunkLoadFailure/reportChunkSaveFailure/sendLowDiskSpaceWarning`, `MinecraftServer.warnOnLowDiskSpace`, `SystemToast.onLowDiskSpace/onChunkLoadFailure/onChunkSaveFailure`, `SystemToast.SystemToastId`. ## Tests `chunk_io::tests` (newest chunk kept per kind, display times). `cargo clippy -p horizon-client --all-targets -D warnings` clean. Not covered: dedicated servers do not send `ClientboundLowDiskSpaceWarningPacket` yet. 🤖 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:15:26 +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#5851
No description provided.