Skip to content

feat(flatpak): add runtime fallbacks for sandbox - #47

Merged
TimInTech merged 4 commits into
mainfrom
spike/flatpak-runtime-fallback
Jul 5, 2026
Merged

feat(flatpak): add runtime fallbacks for sandbox#47
TimInTech merged 4 commits into
mainfrom
spike/flatpak-runtime-fallback

Conversation

@TimInTech

Copy link
Copy Markdown
Owner

Adds runtime fallbacks so Blitztext can degrade gracefully inside a future Flatpak sandbox without introducing packaging files.

Summary:

  • Uses Qt Clipboard as fallback when wl-copy and xclip are unavailable.
  • Marshals Qt Clipboard writes from worker threads to the GUI thread.
  • Shows a Flatpak-specific global-hotkey limitation message when evdev/input access is unavailable in the sandbox.
  • Skips Auto-Paste gracefully when ydotool is unavailable while preserving Clipboard copy.
  • Adjusts dependency checks so host tools are not reported as hard failures inside Flatpak.
  • Adds focused tests for Flatpak dependency handling, HotkeyService hinting, Auto-Paste fallback, Qt Clipboard fallback behavior, and real non-GUI-thread Clipboard writes.

Verification:

  • python3 -m compileall app tests
  • QT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1 python -m pytest -q
  • bash -n scripts/install.sh
  • bash -n scripts/verify.sh
  • git diff --check

Scope:

  • No Flatpak manifest.
  • No desktop file.
  • No AppStream file.
  • No icons.
  • No packaging changes.
  • No version bump.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13e20bba66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/paste_service.py
Comment thread app/paste_service.py
@TimInTech
TimInTech marked this pull request as draft July 5, 2026 22:32
…from host ydotool

Addresses both Codex review findings on PR #47:

- P2: _restore_clipboard now handles the Qt clipboard backend, mirroring
  _copy_to_clipboard's Wayland/X11/Qt order. Previously a Qt-only host
  wrote the new text via Qt but left the transcribed text in the clipboard
  after autopaste instead of restoring the original.
- P1: TestPasteClipboardRestore autopaste cases now mock
  app.paste_service.shutil.which so the paste() ydotool guard no longer
  short-circuits on CI runners that lack the host ydotool binary.
@TimInTech
TimInTech marked this pull request as ready for review July 5, 2026 23:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f5ab822c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/paste_service.py
@TimInTech
TimInTech merged commit 4f9292a into main Jul 5, 2026
7 checks passed
@TimInTech
TimInTech deleted the spike/flatpak-runtime-fallback branch July 5, 2026 23:50
TimInTech added a commit that referenced this pull request Jul 6, 2026
GUI-only MVP scope: Qt6 shell, Qt clipboard fallback, PulseAudio
recording, OpenAI cloud calls. Global hotkeys (evdev) and ydotool
auto-paste stay visibly disabled inside the sandbox, matching the
existing graceful-degradation code from PR #47. Local Whisper/torch
transcription is deferred to keep the build check lightweight.

Structural validation only (--show-manifest/--show-deps); no full
flatpak-builder run since org.kde.Platform//6.8 + Sdk would need a
~1.5 GB download not in scope for this spike.
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.

1 participant