Skip to content

feat(gui): hold preview while space is pressed#112

Merged
StudentWeis merged 2 commits into
mainfrom
feat/hold-space-preview
May 9, 2026
Merged

feat(gui): hold preview while space is pressed#112
StudentWeis merged 2 commits into
mainfrom
feat/hold-space-preview

Conversation

@StudentWeis
Copy link
Copy Markdown
Owner

Summary

Changes Space preview from toggle mode to hold-to-preview mode, and adds a dedicated Space Preview setting so users can disable that shortcut independently of hover preview.

Linked Issue

Closes #111

Changes

  • Show preview on Space key down and hide it on Space key up, while ignoring the shortcut when search input or the clear-confirm dialog owns focus.
  • Add a persisted space_preview_enabled setting with defaults and save/load coverage.
  • Expose a new Space Preview switch in the Settings panel and reset its state from persisted config.
  • Update localized settings/help copy to describe the hold-to-preview behavior.
  • Add tests for hold-only preview visibility and the disabled-setting path.

Testing

  • scripts/precheck.sh passes locally
  • New / updated tests cover the change (test_preview_state_is_visible_only_while_space_is_held, test_space_preview_setting_blocks_space_preview_when_disabled, test_preview_settings_default)

Self-Check

  • PR title follows Conventional Commits
  • No hardcoded user-facing strings — i18n keys added to all locale files
  • New UI components use gpui-component (existing Switch reused; no new component types)
  • Errors defined with thiserror (no new error types)
  • No unrelated changes mixed in

@StudentWeis StudentWeis merged commit ceb93e9 into main May 9, 2026
8 checks passed
@StudentWeis StudentWeis deleted the feat/hold-space-preview branch May 9, 2026 08:21
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.

feat: hold space preview

1 participant