fix(lasso): stop using PluginFileAPI.getPageSize, it's FILE:READ-gated now - #53
Merged
Conversation
…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>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
3.29.43_betasilently deniesPluginFileAPI.getPageSize(filePath, page)(adb logcat:PluginSec: DENY reason=sdcard_no_read) for a plugin without declaredFILE:READ. No error is thrown — the call just resolves unavailable, soloadContext()returned null andrunCutbailed out beforelassoElementswas ever called. Looked exactly like "the lasso selects nothing."PluginCommAPI.getPageDisplaySize()— current-page context (same category aslassoElements/setLassoBoxState), nofilePathargument, not permission-gated. Also drops the now-pointlessgetCurrentFilePath/getCurrentPageNumcalls that existed only to buildgetPageSize's arguments.console.loginindex.jsdeliberately not gated behind__DEV__(every other log call is silent on a real sideload sincebuildPlugin.shalways bundles--dev false) — printsversionName/versionCodeat startup so a stale reinstall is never mistaken for "the fix didn't work" (which is exactly what happened mid-debug — see doc updates).make-space.md§12 postmortem,setup-and-build.mdnote on theMyStyle/Plugins/vsMyStyle/reinstall trap.Test plan
npm run typecheck/lint/format/test:ci— all clean, 18/18 tests passing🤖 Generated with Claude Code