fix: verberg de logokiezer op web in plaats van een pad te bewaren dat niet bestaat #525
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!525
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/logokiezer-platformpoort"
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
The logo picker stored a path to a file on the user's machine in the theme profile. In a browser that path does not exist:
FilePickerreturns ablob:URL, so the setting appeared to work and was gone after a reload. The other pickers were gated behindsupportsLocalProjectFoldersin #148; this one was missed.Closes #506
Changes
settings_dialog_colors.dart— the whole logo setting (picker, position, size) is behindsupportsLocalProjectFolders. Position and size have no meaning without a logo, so they travel with it. Footer and closing-slide settings deliberately stay: they need no filesystem.settings_dialog.dart—_pickLogocarries the same gate as an early return. Belt and braces on purpose: a silent, unrecoverable setting is worse than a missing button, and it makes the file that contains theFilePickercall name the flag itself, which is what makes it statically checkable by #505.settings_dialog_smoke_test.dart— guards the running half: on a platform with a filesystem the setting is still there, and the footer was not dragged along by the gate. Verified by inverting the gate, which makes it fail.What this PR does not do, and why
No regression test for the reported bug. It cannot exist here:
kIsWebis alwaysfalseunderflutter test, the flag arrives through a conditional import with no injection point, and there is no--platform chrometarget. A widget test would sit green around the broken branch — worse than no test, because it buys confidence that is not there. That half is #505's job, statically.Found while verifying — filed separately
image_carousel_picker_actions.dart:_browse()has the same defect (pickFileswithoutwithData: true, reading.path), and its callers in_editor_field.dartandapp_shell_main_layout.dartcarry no platform gate either. Kept out of this PR because the right fix there is genuinely different: a logo cannot work on web, but the carousel plausibly should, via bytes and the existingmem:pipeline. Different decision, different issue.Gates
make check— green (86.3% coverage, per-file floor 0 below budget).make check-secrets/make sast— still red for the pre-existing reasons in #522 and #521.Principles
Touches no format, storage, dependency or outgoing traffic. It does touch a promise, in the honest direction: the web build now shows fewer controls rather than controls that ignore you. The cost is that web visibly offers less than desktop; unexplained silence is worse than an absence.