Skip to content

add modrinth discovery to content tabs #13

Description

@objz

summary

right now the content tabs are only local views. mods, resource packs, and shaders show what is already installed in the selected instance, and that part should stay exactly as it is. the next step is to add a discovery mode on top of those existing tabs so users can search modrinth and install content directly from rmcl.

the intended flow is that the user stays in the content page. when they are on Mods, Resource Packs, or Shaders, pressing Tab toggles that current tab between the installed list and a discovery list. this should not replace the local list or change how local toggling works. it is just another mode for the same content type. h/l should stay responsible for switching tabs, and Shift+Tab can go away.

behavior

mods discovery should be strict about compatibility. if the selected instance is fabric on minecraft 1.20.1, the discovery list should only show modrinth projects that support that minecraft version and fabric. forge-only, neoforge-only, quilt-only, or wrong-version projects should not show up in that list.

resource packs and shaders can be looser. they should still use modrinth project types and allow the user to pick a version, but they do not need loader filtering. for those tabs, showing available versions and letting the user pick one is enough.

selecting a discovery result should not immediately download it. it should open a version list first. the version list should be filtered for mods by the current instance version and loader, while resource packs and shaders can show available versions without loader restrictions. pressing enter on a version downloads the primary file into the right folder.

download rules

mods should download into .minecraft/mods, resource packs into .minecraft/resourcepacks, and shaders into .minecraft/shaderpacks.

for mod versions, required dependencies should be resolved and installed automatically using the same compatibility rules. optional dependencies can be skipped for the first version of this feature. if a dependency cannot be resolved cleanly, the install should fail with a useful error instead of silently installing a broken mod set.

when choosing files from a modrinth version, use the primary file first and fall back to the first file if no primary file is marked. if the target filename already exists, do not overwrite it. show an “already installed” style notification instead.

implementation notes

net::modrinth currently mostly supports modpack import. it should grow proper project discovery helpers for searching projects, fetching project versions, resolving dependencies, and downloading version files.

the UI should reuse the existing content list style where possible, but discovery results should have their own data model instead of pretending they are local installed files. local content entries have paths, enabled state, watcher behavior, and .disabled toggling; discovery results are remote projects with metadata, downloads, versions, and install state.

a later follow-up can add a detail view for project descriptions. for now, the important pieces are search, version selection, download, dependency handling, and keeping the installed/discovery modes separate.

acceptance criteria

  • Tab toggles installed/discovery mode on mods, resource packs, and shaders.
  • h/l still switches content tabs.
  • mod search only returns projects compatible with the selected instance minecraft version and loader.
  • resource pack and shader search use the right modrinth project types.
  • selecting a project opens a version list.
  • selecting a version downloads the right file into the right instance folder.
  • required mod dependencies are installed automatically.
  • duplicate filenames are not overwritten.
  • after download, the installed list updates so the new content is visible.
  • tests cover modrinth query construction, version filtering, dependency handling, and the content tab mode/key behavior.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions