Skip to content

feat(theseus): Add configurable instance / default symlinks#5898

Closed
R2bEEaton wants to merge 4 commits into
modrinth:mainfrom
R2bEEaton-Minecraft:symlinks
Closed

feat(theseus): Add configurable instance / default symlinks#5898
R2bEEaton wants to merge 4 commits into
modrinth:mainfrom
R2bEEaton-Minecraft:symlinks

Conversation

@R2bEEaton
Copy link
Copy Markdown

@R2bEEaton R2bEEaton commented Apr 23, 2026

Addresses feature request #5407, and bugs related to symlinks in #4280 and #915. These changes were largely completed by ChatGPT's Codex 5.4 and were used and tested manually by me.

Summary

Adds configurable per-instance file links and default file links for new instances, with safer symlink handling across export and deletion paths.

This branch:

  • adds a new File links tab to instance settings
  • adds default File links support in Default Instance Settings for newly created instances
  • persists file link configuration in profile and global settings state
  • supports linking both folders and files to external paths
  • moves the default File Links section to the bottom of Default Instance Settings
  • hardens recursive delete/export behavior so symlinks and junctions are not followed out of scope

User-Facing Changes

  • Instance settings now include a dedicated File links tab where users can:
    • add relative instance paths like screenshots or options.txt
    • choose whether each link points to a Folder or File
    • browse for a target path with the native file/folder picker
  • Default Instance Settings now include File links at the bottom of the page, so new instances can inherit the same links automatically.

Backend / Data Model

  • adds file_links persistence for profiles
  • adds file_links persistence for global default instance settings
  • applies default file links when creating a new profile
  • normalizes and validates file link definitions before applying them
  • keeps Windows support practical by using the existing directory link handling already added on this branch

Symlink Safety

This branch also improves behavior around symlinks/junctions:

  • pack export no longer scans the entire instance before filtering selections
  • pack export now walks only the selected export candidates
  • export candidate discovery skips symlinked directories
  • recursive export traversal skips symlinks instead of following them
  • recursive directory deletion in app-lib is now symlink-aware and removes the link itself rather than deleting the external target contents

This directly fixes the mrpack export issue from #915 and hardens app-side recursive deletion behavior related to #4280.

@modrinth-bot
Copy link
Copy Markdown
Member

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

@R2bEEaton R2bEEaton marked this pull request as ready for review April 23, 2026 18:03
@IMB11
Copy link
Copy Markdown
Member

IMB11 commented Apr 23, 2026

Hi there, thanks for creating a PR - Unfortunately we can’t accept this PR into the Modrinth App as it is too large in scope and requires more planning to align with our overarching design goals. We are happy to accept contributions from outside collaborators, but for large scope changes like these it’s best to discuss with us on Discord to ensure it’s something that would fit well into the app. For the best chances of getting your PRs accepted, we recommend to tackling smaller scoped QOL features and bugs that are more easily reviewable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants