[PR #2621] [MERGED] launcher: import a file dropped anywhere on the window #4482

Closed
opened 2026-11-03 04:17:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-import-ui


📝 Commits (1)

  • b8b353c launcher: import a file dropped anywhere on the window

📊 Changes

7 files changed (+151 additions, -2 deletions)

View changed files

📝 launcher/README.md (+8 -0)
📝 launcher/src/datapacks_page.rs (+2 -0)
➕ launcher/src/import_page.rs (+132 -0)
📝 launcher/src/instances_page.rs (+1 -1)
📝 launcher/src/main.rs (+5 -0)
📝 launcher/src/modpacks_page.rs (+1 -1)
📝 launcher/src/packs_page.rs (+2 -0)

📄 Description

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

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Launcher features, item 11, part 2: drag and drop a .mrpack or a zip onto the window to import it. Stacked on the PR before it, which holds the library.

  • The window's root takes every drop that no section takes.
    • A shared instance becomes a new instance in the background; it is then selected and Home shows it.
    • A Java modpack opens the Modpacks page and runs its import there.
    • A resource or shader pack goes into the selected instance.
    • A data pack gets a note that points at the world rows.
  • A note in the bottom-right corner says what happened, or why not, until Close.
  • The Packs section and the world rows keep their own drop targets. They now stop the drop there, so a pack dropped on the Packs section is added once, not also by the window.
  • launcher/README.md: an Import bullet.

Proof

  • fmt, clippy -D warnings and the launcher tests: clean and passing (163 + 36).
  • Window run, scratch homes, with a real drag from a source window (NSDraggingSession):
    • Shared world.mrpack dropped on the hero became Hardcore (3), selected, with the note.
    • Dark UI.zip dropped on the hero went into Hardcore (3)'s resource packs as Dark UI (3).zip.
    • The same zip dropped on the Packs section was added once (7 → 8 files). The corner note stayed on the earlier drop, so the window didn't import it again.
Shared instance dropped Pack dropped on the page Pack dropped on Packs: added once

🤖 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/2621 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-import-ui` --- ### 📝 Commits (1) - [`b8b353c`](https://github.com/horizon-rust/horizon/commit/b8b353c92e06d1795b5b51ab7bd5a7e143dbe78b) launcher: import a file dropped anywhere on the window ### 📊 Changes **7 files changed** (+151 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `launcher/README.md` (+8 -0) 📝 `launcher/src/datapacks_page.rs` (+2 -0) ➕ `launcher/src/import_page.rs` (+132 -0) 📝 `launcher/src/instances_page.rs` (+1 -1) 📝 `launcher/src/main.rs` (+5 -0) 📝 `launcher/src/modpacks_page.rs` (+1 -1) 📝 `launcher/src/packs_page.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Launcher features, item 11, part 2: drag and drop a `.mrpack` or a zip onto the window to import it. Stacked on the PR before it, which holds the library. - The window's root takes every drop that no section takes. - A **shared instance** becomes a new instance in the background; it is then selected and Home shows it. - A **Java modpack** opens the Modpacks page and runs its import there. - A **resource or shader pack** goes into the selected instance. - A **data pack** gets a note that points at the world rows. - A note in the bottom-right corner says what happened, or why not, until **Close**. - The Packs section and the world rows keep their own drop targets. They now stop the drop there, so a pack dropped on the Packs section is added once, not also by the window. - launcher/README.md: an Import bullet. ## Proof - fmt, clippy `-D warnings` and the launcher tests: clean and passing (163 + 36). - Window run, scratch homes, with a real drag from a source window (NSDraggingSession): - `Shared world.mrpack` dropped on the hero became **Hardcore (3)**, selected, with the note. - `Dark UI.zip` dropped on the hero went into Hardcore (3)'s resource packs as `Dark UI (3).zip`. - The same zip dropped on the Packs section was added once (7 → 8 files). The corner note stayed on the earlier drop, so the window didn't import it again. | Shared instance dropped | Pack dropped on the page | Pack dropped on Packs: added once | |---|---|---| | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/import/instance.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/import/pack.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/import/section.png) | 🤖 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 04:17:29 +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#4482
No description provided.