Skip to content

fix(lasso): stop using PluginFileAPI.getPageSize, it's FILE:READ-gated now - #53

Merged
gorlix merged 1 commit into
mainfrom
fix/permission-gate-page-size
Sep 1, 2026
Merged

fix(lasso): stop using PluginFileAPI.getPageSize, it's FILE:READ-gated now#53
gorlix merged 1 commit into
mainfrom
fix/permission-gate-page-size

Conversation

@gorlix

@gorlix gorlix commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • The v0.5.2 SDK bump broke the entire cut flow on-device: firmware Chauvet 3.29.43_beta silently denies PluginFileAPI.getPageSize(filePath, page) (adb logcat: PluginSec: DENY reason=sdcard_no_read) for a plugin without declared FILE:READ. No error is thrown — the call just resolves unavailable, so loadContext() returned null and runCut bailed out before lassoElements was ever called. Looked exactly like "the lasso selects nothing."
  • Fix: switch to PluginCommAPI.getPageDisplaySize() — current-page context (same category as lassoElements/setLassoBoxState), no filePath argument, not permission-gated. Also drops the now-pointless getCurrentFilePath/getCurrentPageNum calls that existed only to build getPageSize's arguments.
  • Add one console.log in index.js deliberately not gated behind __DEV__ (every other log call is silent on a real sideload since buildPlugin.sh always bundles --dev false) — prints versionName/versionCode at startup so a stale reinstall is never mistaken for "the fix didn't work" (which is exactly what happened mid-debug — see doc updates).
  • Doc updates: SKILL.md gotchas chore(ci): bump github/codeql-action from 3 to 4 #38–40, make-space.md §12 postmortem, setup-and-build.md note on the MyStyle/Plugins/ vs MyStyle/ reinstall trap.

Test plan

  • npm run typecheck / lint / format / test:ci — all clean, 18/18 tests passing
  • Verified on-device (Nomad, firmware Chauvet 3.29.43_beta): lasso now selects everything below the cut line again

🤖 Generated with Claude Code

…d now

The 0.1.65 bump broke the entire cut flow on-device: firmware Chauvet
3.29.43_beta silently denies PluginFileAPI.getPageSize(filePath, page)
(adb logcat: `PluginSec: DENY reason=sdcard_no_read`) for a plugin that
hasn't declared FILE:READ. The call didn't throw, it just resolved
unavailable, so loadContext() returned null and runCut bailed out before
lassoElements was ever invoked — symptom looked like "the lasso selects
nothing", no hint a permission check was involved.

Switch to PluginCommAPI.getPageDisplaySize(): current-page context like
lassoElements/setLassoBoxState, no filePath argument, not gated. This also
drops the now-pointless getCurrentFilePath/getCurrentPageNum calls that
existed only to build getPageSize's arguments.

Also add one console.log line in index.js that is deliberately NOT gated
behind __DEV__ (buildPlugin.sh always bundles with --dev false, so every
other log() call is silent on a real device) — it prints the running
versionName/versionCode so a stale sideload is never mistaken for a fix
that "didn't work". Verified on-device (Nomad): lasso now selects
everything below the cut line again.

Doc updates: SKILL.md gotchas #38-40, make-space.md §12 postmortem,
setup-and-build.md note on MyStyle/Plugins/ vs MyStyle/ reinstall trap
(a second, unrelated snag hit while debugging this).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gorlix
gorlix merged commit 925fae4 into main Sep 1, 2026
4 checks passed
@gorlix
gorlix deleted the fix/permission-gate-page-size branch September 1, 2026 14:22
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