Skip to content

Port Jiffshot capture and editing to Linux - #18

Merged
Marc-André Moreau (mamoreau-devolutions) merged 13 commits into
masterfrom
copilot/linux-port
Nov 1, 2026
Merged

Marc-André Moreau (mamoreau-devolutions) merged 13 commits into
masterfrom
copilot/linux-port

Conversation

@mamoreau-devolutions

@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Port the shared editor and capture workflows to Linux: XDG portal/PipeWire screenshots and recording, clipboard/OCR, library organization, templates/effects, video editing/export, preferences, shortcuts, tray/startup, notifications, sharing, and printing.
  • Isolate platform implementations in app/src/linux/ and app/src/win/, with suffix-free filenames and thin dispatch. Shared canvas/document code remains shared. Windows capture backends live in crates/jiffshot-capture/src/win/, with existing public APIs preserved.
  • Build .tar.gz, .deb, and .rpm for both Linux x64 and ARM64. Detect architecture from the executable and every bundled runtime ELF; reject mixed/unsupported inputs and relabeling. Release assembly requires and verifies all six packages.
  • Use native Ubuntu/Fedora x64/ARM64 CI builds, per-architecture caches/artifacts, package-content tests, and native install/smoke checks. Fedora builds RPMs separately for its OCR-library ABI and explicitly installs verified media, PipeWire, English OCR and font providers.
  • Preserve upstream Windows recorder, packaging, automation CLI and tray/library behavior; add Linux named presets and Source/15/24/30/60 fps recording choices.
  • Share real AAC encoder selection across recording and video editing: prefer voaacenc, support Fedora fdkaacenc, preserve AAC-LC/raw framing and 128 kbit/s, and surface capability/creation errors without aliases or silent fallback. Count actual source samples, retain codec packets and finalize MP4 presentation edits to exclude priming/padding. Preserve source tails, continuous segment encoding and presentation-time offsets across edits.
  • Support Fedora DejaVu font locations in shared document rendering, which reads font files directly rather than through Fontconfig.
  • Fix CI-exposed portable-startup parsing and interval-test coordinate races while retaining GLib, portal-closure and mutual-exclusion assertions.
  • Replace every Python script added by this branch with PowerShell 7: all 18 Linux GUI e2e drivers and the frame-rate portal runner (shared LinuxE2E modules over a C# shim using a SHA256-pinned Tmds.DBus.Protocol), the packaging/assembly/validation scripts, and Pester unit tests. CI installs a pinned, hash-verified pwsh via .github/actions/setup-pwsh and no longer installs python3-dbus-next/python3-gi.

Validation

  • After platform isolation: Linux release workspace tests passed (305 passed, 17 portal-dependent cases ignored by default); Windows release workspace tests passed (160 passed, 3 ignored).
  • Native run 41217762263 at a14a984: complete Ubuntu x64 and ARM64 jobs passed, including GUI, tar/DEB content checks and portable smoke. Windows x64/ARM64 and MSI/MSIX jobs passed. Both Fedora jobs reached runtime tests but failed three AAC timing and three font-dependent cases; package-install rows were consequently skipped.
  • Those failures are repaired at 5f4fb47. Both real VisualOn and private upstream FDK encoders pass 13 AAC, 39 video and 6 recording-pipeline tests each locally (116 targeted executions, no failures/skips). FDK execution was on Ubuntu x64/GStreamer 1.24.2, not native Fedora or ARM. Exact duration, waveform alignment, source boundaries/tails, repeated-edit sync and byte-preserving MP4 edits are tested; duration assertions were strengthened, not widened.
  • Font tests pass on Linux and existing Windows text rendering remains passing. Seven capture-info tests and full_document_recognition_drives_conservative_smart_redaction pass locally.
  • Strict Linux app Clippy, scoped formatting and whitespace checks pass. Windows capture API documentation builds; additional Windows strict Clippy reports pre-existing lints in unchanged/mechanically moved upstream code, not newly silenced warnings.
  • Private-WSL GUI: 5 frame-rate cases, all 4 login-startup scenarios and the repaired interval suite passed. test_mock_recording_cancel_closes_portal_session verifies the labelled control closes the recording portal session without requesting another source.
  • After the PowerShell conversion, native run 41229866234 at d5ec759 passed all 14 jobs: Ubuntu x64/ARM64 build, all GUI e2e drivers, Pester package tests and portable smoke; Fedora x64/ARM64 RPM builds; DEB/RPM install on x64 and ARM64; Windows x64/ARM64 and MSI/MSIX. This includes the interval-cancel and ARM64 autostart cases that failed in 41221973567.
  • Locally, all 18 pwsh drivers pass in private-namespace WSL, and 110 Pester tests pass. pwsh -File returns exit 1 when a driver throws. assemble-release.ps1 verified all six downloaded CI packages, then refused with exit 1 and no output when one RPM artifact was missing.
  • Earlier real frame-rate portal tests passed 3 cases; earlier Ubuntu/Fedora clean-install and broader GUI/preset suites passed. Old real-portal/Fedora local temporary rootfs fixtures no longer exist and were not claimed as rerun for this update.
Requirement Evidence
Exact audible AAC count and alignment selected_encoder_negotiates_lc_stereo_and_decodes_a_resampled_tone: 47,999 actual resampled frames equal decoded frames, contiguous timestamps and waveform correlation >0.98
Exact trim/cut duration trimming_preserves_the_corresponding_audio_from_each_source_interval: 72,000 frames; cutting_preserves_audio_before_and_after_the_removed_range: 96,000 frames, with short source-boundary tone checks
Source tail and repeated-edit sync source_tone_boundaries_and_end_survive_aac_segment_changes; repeated_trimming_keeps_source_tone_boundaries_without_accumulating_aac_delay
Preserve compressed media and reject invalid timing finalization_retains_every_compressed_byte_and_file_offset; malformed_or_unsupported_timing_preserves_the_entire_file
Visible document text and OCR linux_system_fonts_render_default_and_dejavu_text; interactive_effects_capture_info_band_preserves_content_and_undoes; interactive_effects_capture_info_rejects_narrow_images_without_changing_document; full_document_recognition_drives_conservative_smart_redaction

Limitations

  • Broad Linux parity, not every Windows feature: advanced scheduling/recording/editor gaps remain documented.
  • jiffshot-cli automation is Windows-only; Linux retains jiffshot capture options. The Windows workflow engine remains in jiffshot-workflow, with Linux workflows under app/src/linux/.
  • The unpublished macOS branch was unavailable to inspect. Organization follows the user's screenshot, not an asserted exact merge with unseen macOS changes.
  • Native GNOME/KDE consent/global shortcuts and physical audio/webcam/printer hardware remain unvalidated. WSL portal fixtures used virtual sources.
  • Real-portal modes of the frame-rate, shortcut and timed-capture drivers (-RealPortal) were ported but not run; they need a real desktop portal. The PowerShell frame-rate timed portal is a plain mock, and saved images are checked with the shared PNG decoder rather than GStreamer.

Add portal-based capture and recording, Linux desktop integrations, and native distribution packages.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move platform implementations into linux and win directories while preserving shared canvas and capture APIs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Derive package identities from all bundled ELF files, validate six release assets, and test native Ubuntu and Fedora packages on both architectures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use a harmless installed executable for the hidden desktop override because GLib validates Exec even when Jiffshot is not on PATH. Preserve the existing GUI parse assertion and pin the disabled executable.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update architecture references for Windows backends and distinguish Linux portal workflows from the Windows capture engine.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fix the CI-exposed interval GUI coordinate race while retaining portal closure and mutual-exclusion assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Enable verified free codec providers and verify PipeWire, OCR data and fonts before native workspace tests on x64 and ARM64.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Share real AAC factory selection across recording and video editing, preserve AAC-LC and bitrate settings, and verify decoded audio and capability failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Support Fedora DejaVu package directories, retain Ubuntu and Windows lookup order, and require visible default and DejaVu rasterization in Linux tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Count actual source samples, drain VisualOn lookahead, preserve continuous encoder input, finalize bounded MP4 presentation metadata after EOS, and use stream-time offsets when editing. Verify exact decoded duration, source boundaries and repeated-edit alignment with both real encoders.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Port all Linux end-to-end drivers, the frame-rate portal runner, and the
Linux packaging/assembly/validation scripts from Python to pwsh. A shared
C# shim (LinuxE2E.cs) built on Tmds.DBus.Protocol provides the D-Bus,
X11, PNG, process, and OCR primitives used by the PowerShell modules.
Packaging unit tests move to Pester, CI installs a pinned pwsh via a
local setup-pwsh action, and the docs describe the new commands.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reading stops at the tar end marker, so closing the pipe early made
dpkg-deb fail with a broken pipe on slower runners.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) merged commit e8f0550 into master Nov 1, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant