Repository navigation
Description
Summary
On KDE Plasma 6.8 (Wayland), every SnapShot with Capture flash or Capture animations turned on lands in the draft about 3 seconds late. The KDE feedback helper's QML fails to load, so T3 waits for a "ready" event that never comes, then kills the helper.
On Plasma 6.7.5 the same build is near-instant.
Environment
| Affected | Not affected | |
|---|---|---|
| T3 Code | t3code-nightly-bin 0.1.7-nightly.20261104.4151 (Linux, Wayland) |
same nightly line |
| KWin | 6.8.1 | 6.7.5 |
| qt6-declarative | 6.12.0 | 6.12.0 |
| Distro | CachyOS (Arch) | CachyOS (Arch) |
Steps to reproduce
- On Plasma 6.8 Wayland, open Settings → SnapShots. Leave Capture flash and/or Capture animations on (the defaults).
- Press the capture shortcut on any window.
- The snapshot shows up in the composer about 3 s later.
- Turn both flash and animations off and capture again. The snapshot appears instantly.
Standalone repro (no UI)
Run the bundled helper's feedback command directly:
import base64, json, os, selectors, subprocess, tempfile, time
exe = os.path.expanduser('~/.local/share/t3code/kde-capture/t3-kde-snap-shot')
with tempfile.TemporaryDirectory(prefix='t3-feedback-timing-') as d:
open(d + '/capture.png', 'wb').write(base64.b64decode(
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+aT1UAAAAASUVORK5CYII='))
opts = {'bounds': {'x': 0, 'y': 0, 'width': 1, 'height': 1}, 'pid': os.getpid(), 'flash': True, 'animate': False}
t = time.monotonic()
p = subprocess.Popen([exe, 'feedback', d, json.dumps(opts)], stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
sel = selectors.DefaultSelector(); sel.register(p.stdout, selectors.EVENT_READ)
print('ready' if sel.select(2) else 'NO ready event', round((time.monotonic() - t) * 1000), 'ms')
p.stdin.write('{"command":"close"}\n'); p.stdin.flush()
p.communicate(timeout=1)On KWin 6.8.1 this prints NO ready event 2000 ms, and the user journal (journalctl --user -o cat) shows:
Component failed to load: QList(file:///tmp/t3-feedback-timing-xxxx/feedback.qml:60:19: Type cannot be created in QML.
delegate: Window {
^)
End to end that is 2 s waiting for readiness plus about 1 s before forced termination: 3,003 ms measured.
Cause
The generated feedback.qml imports:
import QtQuick.Window
import QtQml.Models
import org.kde.kwin
...
delegate: Window {KWin 6.8 exports its own uncreatable Window type (KWin::Window) from org.kde.kwin. Because that import comes last, Window now resolves to KWin's type instead of QtQuick.Window.Window, so the component fails to load. KWin 6.7 didn't expose that name, so it worked there.
Suggested fix
- In the KDE helper's feedback QML (
src/feedback.rs), qualify the Qt type:import QtQuick.Window as QtWindowanddelegate: QtWindow.Window { ... }. - In the desktop app's native feedback startup (
startNativeCaptureFeedback, aroundmain.cjs:130408in the packaged build), fail fast when the helper exits or reports a load error instead of waiting out the readiness timeout. A broken feedback path shouldn't delay the capture itself.
Workaround: turn off both Capture flash and Capture animations.
Diagnosed and filed with Claude Code (Claude Opus 5.5) and Codex (GPT-6.1 Sol).
Activity
shivamhwp commentedon Nov 5, 2026
Handing this issue to Julius’s existing fix in #31247, head 121fbad. At main 67eebac, NativeCaptureFeedback.ts has the reported 2-second readiness deadline, then waits for helper exit with a 1-second forced termination deadline. The PR addresses the QML Window collision and records before/after QML test results. I made no changes and ran no runtime tests; live Plasma 6.8 Wayland behavior remains unverified by this thread.
MattiaPARRINELLO commentedon Nov 14, 2026
Confirming this is still reproducible, and adding two data points that narrow it.
Environment: T3 Code nightly
0.1.10_nightly.20261113.4630, KWin6.8.2-2,qt6-base 6.12.0-5,qt6-declarative 6.12.0-4, Plasma 6.8.2, Wayland session.It is not a helper regression. I pulled the previous helper build out of a Btrfs snapshot (same version shipped before the 2026‑11‑13 nightly) and ran it with identical options. The
feedback.qmlit generates is identical to the current one except for the random bus name and script id, and it fails with the samefeedback.qml:60:19: Type cannot be created in QML.atdelegate: Window {. The breakage lines up with the KWin 6.7.5 → 6.8.0 upgrade on this machine (2026‑10‑16), not with any T3 release.Timings from the desktop OpenTelemetry trace (
desktop.trace.ndjson),desktop.snapShot.prepareCaptureon four successive captures: 3803, 3793, 4782, 6029 ms. Isolating each step:t3-kde-snap-shot capturestarted)t3-kde-snap-shot activate(correct pid)persistCaptureSo the remaining ~2 s is exactly the
readyDeadlineinstartNativeCaptureFeedback, as described above, and it is paid on every capture.Minimal reproduction of the QML side, without T3 at all:
loaded through
org.kde.kwin.Scripting.loadDeclarativeScript+org.kde.kwin.Script.rungivesComponent failed to load: ...main.qml:9:19: Type cannot be created in QML.WithWindowas the root object instead, KWin reports the unrelated-lookingFile name case mismatch. Qualifying the type asimport QtQuick.Window as QtWindowremoves the error, which supports the suggested fix in the report.Workaround confirmed: with
snapShotFlashandsnapShotAnimationsoff, the helper is no longer spawned and capture is fast again.This comment was written by an AI assistant (opencode / DeepSeek V4.1 Flash) running on the reporter's machine. Every command above was executed by the assistant; the human only pressed the shortcut and observed the delay and the missing animation.