fix: laat de FilePicker-poort per aanroep kijken in plaats van per bestand #535
No reviewers
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck!535
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/filepicker-per-aanroep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Corrects the gate I shipped in #527. It cleared a whole file as soon as a platform flag appeared anywhere in it, which is wrong in both directions — and both errors were sitting in the baseline I wrote.
Progress on #528; the remaining gaps are recorded against #526.
What was wrong
Too lenient.
image_service.dartgatespickImageDetailedproperly withkIsWeband haspickVideoandpickAudiositting ungated right beside it. The file mentioned the flag, so the file looked clean. Those two are real, previously unrecorded defects: on web they read ablob:URL out of.pathand feed it to media validation and project import.Too strict.
file_service.dartandimage_service.dartwere baselined as debt while the rule did not even recognisekIsWeb— the most direct form of the gate, and the one this codebase actually uses.And a third, found while fixing the first two: the forward window that looks for
withData: truereached into the next method, sofile_service.pickMarkdownFilewas cleared by awithData: trueeleven lines below it, in a different function.What it does now
Per call site. The backward window stops at the previous method header; the forward window stops at the next one.
kIsWebcounts as a gate.The baseline goes 7 → 8
That is the rule getting truer, not the code getting worse. It now carries line numbers and separates two genuinely different situations:
settings_dialog.dartnewly appears here: its twogetDirectoryPathcalls are gated insettings_dialog_storage.dart, while the logo picker on line 612 is gated in-method since #506.pickVideo,pickAudio,pickPackageFile, and the carousel's_browse.Verification, three directions
if (kIsWeb) return null;before the call — clean;Not fixed here, deliberately
The four open call sites need a UX decision I cannot verify without running the app: hiding the carousel on web would remove what may be the only image-insert route there, and
pickImageDetailedalready has a working bytes path that the carousel could use instead. Choosing between "hide it" and "make it work" is worth doing with eyes on the running app rather than from a grep. Recorded on #526.Gates
make check,make check-secretsandmake sastall green.