Skip to content

impl(web): ToggleFullScreen and ToggleFitMedia keybinds#60

Merged
andykais merged 13 commits into
mainfrom
cursor/media-fullscreen-mode-5641
Jul 8, 2026
Merged

impl(web): ToggleFullScreen and ToggleFitMedia keybinds#60
andykais merged 13 commits into
mainfrom
cursor/media-fullscreen-mode-5641

Conversation

@andykais-claude

@andykais-claude andykais-claude commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • implements fullscreening media via ToggleFullScreen
  • implements ToggleFitMedia to switch between original vs 'fit' media sizing
  • improves on the keybind logic:
    • normalizes configured keybinds to always match
    • ensures focus is not stolen by keybinds when a user is inside an input element
    • type keybind listeners as the CustomEvent they actually receive so e.detail.data.keyboard_event is type-safe (fixes the svelte-check errors in MediaView.svelte and TagAutoCompleteInput.svelte)

Vision Testing

  • Manual end-to-end testing in Chrome against a seeded local DB (forager gui):
    • footer button toggles Media: originalMedia: fill, visibly resizing the media
    • Ctrl+Space toggles the same fit mode while the viewer is open
    • f enters fullscreen; first Escape exits fullscreen (viewer stays open), second Escape closes the viewer
  • ✅ Focused browser automation test (deno eval + Playwright against system Chrome):
    • with MediaDetails tag input focused, typing f inserts f and does not call requestFullscreen (input_value="f", rf_calls_input_focus=0)
    • with dialog focus (not typing), pressing f still calls fullscreen (rf_calls_after_dialog_f=1)
Open in Web Open in Cursor 

@cursor cursor Bot force-pushed the cursor/media-fullscreen-mode-5641 branch from d7043f9 to a2ef89b Compare April 20, 2026 23:13
cursoragent and others added 7 commits June 19, 2026 19:04
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
- Dialog elements cannot use requestFullscreen() per HTML spec
- Changed to fullscreen the inner div container instead
- Fixes scoping issue where controller was used before being defined

Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
@cursor cursor Bot force-pushed the cursor/media-fullscreen-mode-5641 branch from c73a1d3 to d3dde0d Compare June 19, 2026 19:29
@cursor cursor Bot changed the title fix(web): wire ToggleFullScreen for media dialog fix(web): wire ToggleFullScreen and add media fit mode toggle Jun 19, 2026
Comment thread packages/web/src/routes/browse/+page.svelte
cursoragent and others added 3 commits July 7, 2026 03:32
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
@andykais andykais changed the title fix(web): wire ToggleFullScreen and add media fit mode toggle impl(web): ToggleFullScreen and ToggleFitMedia keybinds Jul 8, 2026
Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
@andykais andykais marked this pull request as ready for review July 8, 2026 03:06
@andykais andykais merged commit 3660adf into main Jul 8, 2026
7 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.

3 participants