Skip to content

Fix API capability check for partial File System Access API support - #4

Merged
sgjholt merged 1 commit into
mainfrom
fix/api-capability-check
Apr 18, 2026
Merged

Fix API capability check for partial File System Access API support#4
sgjholt merged 1 commit into
mainfrom
fix/api-capability-check

Conversation

@sgjholt

@sgjholt sgjholt commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • The previous guard used !showOpenFilePicker as a proxy for all three File System Access APIs
  • Opera Mobile exposes showOpenFilePicker but not showSaveFilePicker, so "Create new board" appeared enabled but crashed on click with showSaveFilePicker is not a function
  • Each button is now disabled against the specific API it actually calls:
    • new-btnshowSaveFilePicker
    • open-btnshowDirectoryPicker + showOpenFilePicker
    • CSS/icon pickers → showOpenFilePicker

Test plan

  • Open in Chrome 86+ — all buttons enabled, no warning
  • Open in a browser without File System Access API (e.g. Firefox) — both buttons disabled, warning shown
  • Simulate partial support in devtools console: delete window.showSaveFilePicker then reload — "Create new board" disabled, "Open project folder" still enabled

https://claude.ai/code/session_018ZdAC8waAK19WE1ReL9UGc

The previous guard used !showOpenFilePicker as a proxy for all three
File System Access APIs. Opera Mobile exposes showOpenFilePicker but not
showSaveFilePicker, so 'Create new board' appeared enabled but crashed
on click with 'showSaveFilePicker is not a function'.

Now each button is disabled against the specific API it needs:
- new-btn  → showSaveFilePicker
- open-btn → showDirectoryPicker + showOpenFilePicker
- CSS/icon pickers → showOpenFilePicker

https://claude.ai/code/session_018ZdAC8waAK19WE1ReL9UGc
@sgjholt
sgjholt merged commit e0bcf50 into main Apr 18, 2026
2 checks passed
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.

2 participants