[Bug] Logo picker is not platform-gated and yields an unusable path on web #506

Closed
opened 2026-07-22 08:47:42 +00:00 by brenno · 0 comments
Owner

Describe the bug

The "Kiezen" button for the presentation logo is not behind a platform gate,
unlike the other file pickers fixed in #148. On web a dialog does open, so this
is not the silence reported in #150 — but the result is unusable: file_picker
returns a blob: URL in path, while the rest of the app expects mem: keys
for web images (lib/services/image_service.dart:127,
lib/models/asset_origin.dart:88).

To reproduce

  1. Open the web demo → Settings → Presentation.
  2. Click "Kiezen" next to the logo.
  3. Pick an image. The logo does not appear.

Expected behaviour

Either the button is absent on web, consistent with the other pickers, or it
works end to end.

Environment

Applies to the web build only. Found by reading
lib/widgets/dialogs/settings_dialog.dart:527 (_pickLogo, which reads
result?.files.single.path without withData: true) and the unconditional
button at lib/widgets/dialogs/parts/settings_dialog_colors.dart:417 on main.

Additional context

Deliberately not proposed: a web variant that stores the logo as bytes or
base64 in the theme profile. That would put binary data in our own format and
lock the user in. Absent is better than locked in.

Same class of mistake as #150; the guard proposed there should catch this one
too.

**Describe the bug** The "Kiezen" button for the presentation logo is not behind a platform gate, unlike the other file pickers fixed in #148. On web a dialog does open, so this is not the silence reported in #150 — but the result is unusable: `file_picker` returns a `blob:` URL in `path`, while the rest of the app expects `mem:` keys for web images (`lib/services/image_service.dart:127`, `lib/models/asset_origin.dart:88`). **To reproduce** 1. Open the web demo → Settings → Presentation. 2. Click "Kiezen" next to the logo. 3. Pick an image. The logo does not appear. **Expected behaviour** Either the button is absent on web, consistent with the other pickers, or it works end to end. **Environment** Applies to the web build only. Found by reading `lib/widgets/dialogs/settings_dialog.dart:527` (`_pickLogo`, which reads `result?.files.single.path` without `withData: true`) and the unconditional button at `lib/widgets/dialogs/parts/settings_dialog_colors.dart:417` on `main`. **Additional context** Deliberately *not* proposed: a web variant that stores the logo as bytes or base64 in the theme profile. That would put binary data in our own format and lock the user in. Absent is better than locked in. Same class of mistake as #150; the guard proposed there should catch this one too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
LibreKAT/Ocideck#506
No description provided.