Skip to content

Comments

feat: library sort/filter#11

Merged
Crauzer merged 9 commits intomainfrom
library-sorting
Feb 22, 2026
Merged

feat: library sort/filter#11
Crauzer merged 9 commits intomainfrom
library-sorting

Conversation

@Crauzer
Copy link
Member

@Crauzer Crauzer commented Feb 22, 2026

No description provided.

@Crauzer Crauzer requested a review from Copilot February 22, 2026 11:02
@Crauzer Crauzer self-assigned this Feb 22, 2026
@Crauzer Crauzer added the enhancement New feature or request label Feb 22, 2026
@Crauzer Crauzer moved this from Todo to In Progress in LTK Manager Feb 22, 2026
Copy link

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

Adds end-to-end library sorting/filtering (including mod categorization metadata) across the React UI and Tauri backend so users can tag/map/champion-categorize mods and filter/sort the installed library accordingly.

Changes:

  • Introduces a Zustand-backed library filter/sort store plus derived hooks for filter options and filtered/sorted mod lists.
  • Adds UI components for filter controls (MultiSelect-based) and sort dropdown; displays tags/champions/maps in cards and mod details.
  • Extends Tauri/Rust + TS API models to persist and surface tags, champions, and maps, and bumps league-mod crates to support the new metadata.

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/stores/libraryFilter.ts New Zustand store for selected tags/champions/maps and sort config, plus helper hook.
src/stores/index.ts Re-export library filter store.
src/routes/workshop/$projectName/index.tsx Adds workshop project “Categorization” UI and submits tags/champions/maps to backend.
src/pages/Library.tsx Wires FilterBar into the Library page using computed filter options.
src/modules/workshop/components/ProjectCard.tsx Stops click propagation for action/menu areas to prevent unintended card navigation.
src/modules/library/utils/labels.ts Adds tag/map label helpers with fallbacks.
src/modules/library/utils/index.ts Exports new label utilities.
src/modules/library/index.ts Re-exports utils from the library module.
src/modules/library/components/index.ts Exports new filter/sort UI components.
src/modules/library/components/SortDropdown.tsx Adds sort dropdown controlling the filter store sort config.
src/modules/library/components/ModDetailsDialog.tsx Displays tags/champions/maps in the mod details dialog.
src/modules/library/components/ModCard.tsx Shows tag/champion “pills” on mod cards; uses shared InstalledMod type.
src/modules/library/components/LibraryToolbar.tsx Adds SortDropdown to the toolbar.
src/modules/library/components/LibraryContent.tsx Switches to filtered/sorted mods and disables DnD when non-priority sort/search/filters are active.
src/modules/library/components/FilterPopover.tsx Adds (currently unused) popover-based filter UI.
src/modules/library/components/FilterBar.tsx Adds MultiSelect-based filter bar for tags/champions/maps.
src/modules/library/components/ActiveFilterChips.tsx Adds (currently unused) chip display for active filters.
src/modules/library/api/useFilteredMods.ts Adds hook to apply search + store filters + sorting.
src/modules/library/api/useFilterOptions.ts Adds hook to compute available tags/champions/maps from installed mods.
src/modules/library/api/index.ts Exports new filter hooks/types.
src/lib/tauri.ts Extends TS interfaces for InstalledMod, WorkshopProject, and save args with tags/champions/maps.
src/lib/form/index.ts Adds ComboboxField to the app form hook and exports.
src/lib/form/components.tsx Implements a pre-bound ComboboxField for TanStack React Form.
src/components/index.ts Exports new Combobox and MultiSelect components.
src/components/Select.tsx Enhances Select with prefix, positioner props passthrough, and scrollable popup.
src/components/MultiSelect.tsx Adds a MultiSelect component built on Base UI Combobox.
src/components/Combobox.tsx Adds a styled wrapper/compound API around Base UI Combobox plus a simple ComboboxField.
src-tauri/src/workshop/projects.rs Persists tags/champions/maps in project config and import paths; initializes new fields for new projects.
src-tauri/src/workshop/mod.rs Extends workshop structs/serialization to include tags/champions/maps and loads them from config.
src-tauri/src/overlay/modpkg_content.rs Initializes new ModProject metadata fields for modpkg overlay content.
src-tauri/src/overlay/fantome_content.rs Initializes new ModProject metadata fields for fantome overlay content.
src-tauri/src/mods/mod.rs Extends installed mod struct for UI payload with tags/champions/maps.
src-tauri/src/mods/library.rs Populates tags/champions/maps from mod project metadata and fantome/modpkg extraction.
src-tauri/Cargo.toml Bumps league-mod crate versions to support metadata additions.
Cargo.lock Updates lockfile for dependency bumps.

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

Comment on lines 57 to 59
setTags: (tags) => set({ selectedTags: tags }),
setChampions: (champions) => set({ selectedChampions: champions }),
setMaps: (maps) => set({ selectedMaps: maps }),
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

setTags/setChampions/setMaps store the passed-in Set by reference. If the caller mutates that Set later, the Zustand state can change without a set() call and subscribers may not re-render. Prefer cloning (e.g., store new Set(tags) etc.) to keep store state immutable from the outside.

Copilot uses AI. Check for mistakes.
@Crauzer Crauzer merged commit 9fadb87 into main Feb 22, 2026
5 checks passed
@Crauzer Crauzer deleted the library-sorting branch February 22, 2026 11:17
@github-project-automation github-project-automation bot moved this from In Progress to Done in LTK Manager Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat(workshop): project tags, sorting, and filtering

1 participant