Skip to content

feat(workshop): add button for adding .wad.client files/folders#166

Merged
Crauzer merged 1 commit into
mainfrom
workshop-wad-client-button
May 8, 2026
Merged

feat(workshop): add button for adding .wad.client files/folders#166
Crauzer merged 1 commit into
mainfrom
workshop-wad-client-button

Conversation

@Crauzer
Copy link
Copy Markdown
Member

@Crauzer Crauzer commented May 8, 2026

No description provided.

@Crauzer Crauzer requested a review from Copilot May 8, 2026 20:00
@Crauzer Crauzer self-assigned this May 8, 2026
@Crauzer Crauzer added area: backend Rust/Tauri backend area: frontend React/TypeScript UI area: workshop Workshop/mod publishing type: ux User experience improvements priority: high Important, next up labels May 8, 2026
@Crauzer Crauzer moved this from Todo to In Progress in LTK Manager May 8, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a UI affordance (button + drag/drop overlay) to import .wad, .wad.client, and .wad.mobile files/folders into a selected Workshop layer, backed by a new Tauri IPC command that extracts packed WADs or copies WAD directories into the layer content directory with conflict detection and structured error reporting.

Changes:

  • Add “Add WAD” menu actions and OS-level drag/drop handling in the Workshop content browser UI.
  • Introduce a new add_files_to_layer IPC API (+ React Query mutation) returning an AddFilesReport.
  • Add a Workshop-domain error (WORKSHOP code + WorkshopError context) to report file conflicts cleanly to the frontend.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/modules/workshop/components/LayerFileDropOverlay.tsx New drop overlay UI for layer imports.
src/modules/workshop/components/index.ts Re-export the new overlay component.
src/modules/workshop/components/ContentBrowserLayerSection.tsx Add “Add WAD” button/menu to import a file or folder into the layer.
src/modules/workshop/components/ContentBrowser.tsx Wire up drag/drop import and overlay; pass layer display name through.
src/modules/workshop/api/useLayerFileDrop.ts New hook to listen for OS drag/drop events and filter WAD paths.
src/modules/workshop/api/useAddFilesToLayer.ts New React Query mutation for addFilesToLayer + conflict-aware toast errors.
src/modules/workshop/api/index.ts Export the new hooks.
src/lib/tauri.ts Add api.addFilesToLayer IPC wrapper.
src/lib/bindings/WorkshopError.ts New generated TS binding for workshop domain errors.
src/lib/bindings/Severity.ts Clarify ordering semantics in generated doc comment.
src/lib/bindings/index.ts Export new generated bindings (AddFilesReport, WorkshopError).
src/lib/bindings/ErrorCode.ts Add WORKSHOP error code.
src/lib/bindings/EditModMetadataArgs.ts Align generated arg shape with Rust (required nullable fields).
src/lib/bindings/AddFilesReport.ts New generated TS binding for import report payload.
src-tauri/src/workshop/mod.rs Define/export WorkshopError + AddFilesReport for IPC/TS bindings.
src-tauri/src/workshop/layers.rs Implement import logic (extract/copy, conflict detection) + tests.
src-tauri/src/main.rs Register the new add_files_to_layer command.
src-tauri/src/error.rs Add WORKSHOP error code and serialize workshop error context into IPC errors.
src-tauri/src/commands/workshop.rs Add Tauri command handler for add_files_to_layer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +354 to +357
let basename = canonical
.file_name()
.and_then(|s| s.to_str())
.ok_or_else(|| {
@Crauzer Crauzer merged commit 6e8f654 into main May 8, 2026
9 checks passed
@Crauzer Crauzer deleted the workshop-wad-client-button branch May 8, 2026 20:08
@github-project-automation github-project-automation Bot moved this from In Progress to Done in LTK Manager May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Rust/Tauri backend area: frontend React/TypeScript UI area: workshop Workshop/mod publishing priority: high Important, next up type: ux User experience improvements

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants