Skip to content

Import panel: folders only, since the sandbox can't read beside a file - #29

Merged
JarlLyng merged 2 commits into
mainfrom
import-folder-only
Nov 11, 2026
Merged

JarlLyng merged 2 commits into
mainfrom
import-folder-only

Conversation

@JarlLyng

Copy link
Copy Markdown
Owner

What & why

File > Import Tracker Project… does nothing useful when you pick the project's project.mt instead of the project folder.

The cause is the sandbox. The app may read only what was picked, so patterns/ and instruments/ beside the file are out of reach, and the import fails with a permission error. Found while testing #28 on a real card. The App Store build has the same problem.

The fix:

  • The panel takes folders only. Its message already says "choose a project, e.g. Projects/User/my song".
  • Picking a folder inside a project gives a clear message. When you pick patterns/, the reader looks one level up, and the sandbox can't read that folder. ProjectBundleReader now treats an unreadable folder as "not a project", so you get the message asking for the project folder itself instead of a permission error.

How to test

  • cd PatternautCore && swift test: 157 tests.
    • The new test, "A folder above that can't be read asks for the project folder", makes the project folder unreadable and picks patterns/. It fails on main with exactly the permission error from the card, and passes with this change.
  • In the app, File > Import Tracker Project…:
    • files can't be picked,
    • the project folder imports.

Checklist

  • Builds and runs; existing tests pass (cd PatternautCore && swift test)
  • App project regenerated with xcodegen if App/project.yml or sources changed (no new files)
  • No new tracking, accounts, subscriptions, or off-device data
  • Docs / CHANGELOG updated if behavior changed

🤖 Generated with Claude Code

JarlLyng and others added 2 commits November 11, 2026 22:22
Picking project.mt granted access to that one file, so patterns/ and
instruments/ beside it could not be read and the import failed. The panel
now takes folders only. Picking a folder inside a project, whose parent the
sandbox can't read, now gives the "choose the project folder" message
rather than a permission error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarlLyng
JarlLyng merged commit bca6a2f into main Nov 11, 2026
2 checks passed
@JarlLyng
JarlLyng deleted the import-folder-only branch November 11, 2026 21:25
JarlLyng added a commit that referenced this pull request Nov 11, 2026
Projects saved on Tracker CE firmware import (#28), the import panel takes
folders only (#29), and the preview moves Micro-move 100 a whole step (#30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant