Skip to content

Fix Linux QA findings: export after cancel, i18n, app-audio grouping, export validation - #767

Merged
CaYatur merged 5 commits into
mainfrom
fix/qa-export-i18n-audio
Oct 16, 2026
Merged

CaYatur merged 5 commits into
mainfrom
fix/qa-export-i18n-audio

Conversation

@CaYatur

@CaYatur CaYatur commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes the findings from the Linux QA pass (PC Agent). One PR, no behaviour change outside these paths.

Fixes

  1. Export right after a cancel failed ("Render penceresi yüklenemedi."). The old ffmpeg's late exit/close checked the current exportState and finalized the new export, destroying its render window. All ffmpeg handlers (exit, close, error, stderr) and the render window's closed/render-process-gone handlers are now bound to their own job (isMine()); the old window's closed no longer nulls the new exportWin. If the job ends while the window is loading, the job is not sent.
  2. Timeline-follow recording via MCP/config did nothing until the Output card rendered. onExternalConfig now calls SVRecordPanel.ensureFollow(cfg.recording.followTimeline).
  3. EN queue heading showed "Tail". Kuyruk is also a mode parameter (Tail), so the heading is now Dışa Aktarma Kuyruğu → "Export Queue".
  4. Turkish strings in EN UI / MCP replies. Export errors in startExportJob/finalizeExport paths use trUi (already running, audio not found, render window, ffmpeg start/exit, output path, read errors, encoder pipe). svToast now passes messages through SVI18n.t, so toasts like Kaydedilemedi: … (studio) are translated.
  5. Linux app-audio picker merged apps sharing one binary (two pacat clients → "ToneB · 2 processes"). Streams are keyed by binary + application.name when they differ (pacat|ToneA), so each is its own row and capture selects only its streams. Plain keys saved earlier (pacat, chrome) still match by binary.
  6. Invalid export args silently replaced (8k, 144 fps → 1080p60). New exportFormats.validateOptions; sv_start_export returns e.g. Invalid resolution: "8k". Allowed: 720p, 1080p, …. The panel path is unchanged (stale saved values still fall back to defaults).
  7. Quit blocked on SIGTERM (unconfirmed). SIGTERM/SIGINT now skip the confirm-close dialog (forceQuitApp), stop the queue, cancel the export, and force app.exit(0) after 5 s; a second signal exits immediately.

Tests

  • npm test: 3154 → 3163 (round 1), all passing.
  • New tests/qa-linux-findings.test.js (9 tests): job-bound handlers + simulated late close, localized errors, MCP validation, validateOptions, follow on config change, EN strings/toasts, Linux grouping/selection/back-compat, signal quit.
  • tests/app-audio-linux.test.js expectation updated for the new pacat|toneA key.
  • README / README.tr / ROADMAP test counts updated (now 3165).

Note on language: MCP error replies follow the app language setting (trUi), not the panel's display language. This is intended.

Round 2

Retest results: fixes 1, 2, 3, 4 and 6 passed.

  • Fix 7, SIGTERM with confirmClose on and the output window open: Chromium installs its own SIGTERM handler at startup. That handler wins over Node's, closes the windows (the admin close handler then blocks on confirm), and our handler never ran. I reproduced this with a minimal Electron app under Xvfb: with the handler registered early, the window closes and the process stays alive. With the handler re-registered after ready, Node's handler runs and the app exits.
    • SIGTERM/SIGINT/SIGHUP handlers are now registered early and again on ready (and 1 s later).
    • signalQuit is checked in the admin close handler, before-quit and confirmCloseIfNeeded.
    • The 5 s fallback (app.exit then process.exit) is no longer unref'd.
    • A second signal calls process.exit(0).
  • Fix 5, legacy keys: a plain saved key (pacat, python3) now resolves to itself, so capture keeps every stream of that binary again. The picker matches it with the shared sameApp instead of an exact baseName, so it shows as running, not "çalışmıyor".
  • Tests: 3163 → 3165 (+2 new, 1 rewritten); doc counts updated.

- Bind ffmpeg exit/close/error and render-window handlers to their own job so a cancelled export's late close no longer finalizes the next one.
- Localize export error messages (trUi).
- sv_start_export rejects unknown resolution/fps/quality/speed/encoder instead of silently rendering 1080p60.
- SIGTERM/SIGINT skip the confirm-close dialog, cancel the export and force-exit after 5 s.
Key streams by binary + application.name (e.g. pacat|ToneA) when they differ; plain saved keys still match by binary.
@cayadraft

cayadraft Bot commented Oct 16, 2026

Copy link
Copy Markdown

@CaYatur

CaYaDraft — pull request

Summary
Fix Linux QA findings: export after cancel, i18n, app-audio grouping, export validation

Files
README.md (modified, +2/-2)
@@ -17,7 +17,7 @@ layers and 40 GPU effects, an OBS overlay, Spout / Syphon, **project
Downloads
License: MIT
[![Platform](https://img.shields.io/badge/platform-Windows%20%…

README.tr.md (modified, +2/-2)
@@ -18,7 +18,7 @@ destesi**, ve MCP üzerinden yapay zekâ kontrolü.
İndirme
Lisans: MIT
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-111997.sv…

ROADMAP.md (modified, +1/-1)
@@ -131,7 +131,7 @@ npm test
npm start -- --smoke


-- **3154 unit tests, all passing** on `main`. 703 of those shipped in v3.1.0;
+- **3163 unit tests, all passing** on `main`. 703 of those shipped in v3.1.0;
  105 came with v3.1.1; 163 came with v3.1.2; 157 came with v3.1.3 — 1128 at
  that tag — 469 more with v3.1.4, most of them from the MilkDrop work — 1597 at
  that tag — 1402 more…

src/admin/admin.js (modified, +8/-2)
@@ -264,7 +264,8 @@
      host = el('div', { class: 'toast hidden', id: 'toast' });
      document.body.appendChild(host);
    }
-    host.textContent = message;
+    // Messages from the main process and modules are Turkish source text
+    host.textContent = window.SVI18n && window.SVI18n.t ? window.SVI18n.t(String(message)) : message;
    host.className = 'toast' + (kind ? ' ' + kind : '')…

src/main/main.js (modified, +49/-23)
@@ -4620,21 +4620,21 @@ async function startExportJob(opts, bench, extra) {
  /* Sahne yapılandırması: kuyruk işi eklendiği anın kopyasını taşıyor
     (#526); sonradan yapılan değişiklik sıradaki işleri değiştirmesin. */
  const jobCfg = (extra && extra.cfg) || currentConfig;
-  if (exportState) return { ok: false, error: 'Zaten bir dışa aktarma sürüyor.' };
+  if (exportState) return { ok: f…

src/shared/app-audio-linux.js (modified, +27/-3)
@@ -137,7 +137,24 @@
     hedef ancak adla yeniden bulunur. İkili adı bildirmeyen istemcilerde
     uygulamanın kendi verdiği ad kullanılıyor. */
  function streamName(s) {
-    return (s && (s.binary || s.appName)) || '';
+    if (!s) return '';
+    /* Generic hosts (pacat…

**Note**
The local model is unavailable, so this is only the title and file list.

---
Stopping here. I will not merge, push, or change this pull request until you ask.

`/caya explain` describes the diff. `/caya plan` previews the next edit. `/caya revise` adds a commit.

<!-- cayadraft -->

- Re-register SIGTERM/SIGINT/SIGHUP handlers after ready: Chromium installs its own handler at startup that closes windows (blocked by confirm-close) and Node's handler never ran. Force flag is honoured by the admin close handler, before-quit and confirmCloseIfNeeded; fallback exit no longer unref'd.
- A legacy plain app key (pacat, python3) resolves to itself so capture keeps every stream of that binary; the picker shows such a selection as running using the shared sameApp matcher.
- Tests; test count 3165.
@CaYatur
CaYatur merged commit e31d39e into main Oct 16, 2026
5 checks passed
@CaYatur
CaYatur deleted the fix/qa-export-i18n-audio branch October 16, 2026 06:04
CaYatur added a commit that referenced this pull request Oct 19, 2026
…ess (#768)

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
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