docs(spike): screenshot + KWin scripting feasibility reports#21
docs(spike): screenshot + KWin scripting feasibility reports#21isac322 wants to merge 2 commits into
Conversation
📝 Docs & SEO ReviewSource files changed in this PR: Consistency check results:
|
|
I think the current conclusion in this spike needs to be corrected before this PR is used as design evidence. The current PR says that, on this host with KWin 6.6.4, all 30 ScreenShot2 attempts failed and therefore Concrete results from the successful experimentsEnvironment: 1. Baseline virtual session, no appI started a normal virtual KWin session and called ScreenShot2 directly. Observed result: This proves that ScreenShot2 itself is reachable and functional in a normal empty virtual KWin session on this host. 2. Baseline virtual session with an appI started a normal virtual KWin session, launched Observed result: This proves the success is not just an empty-desktop artifact. ScreenShot2 captures the virtual workspace with an actual app window present. 3. App manipulation captured by ScreenShot2I started virtual KWin, launched Observed result: This proves ScreenShot2 can capture not only an app window, but also the result of an input/action performed inside the virtual session. 4. Full workspace captureI called both Observed result: This proves 5. Multiple windows in one workspace captureI started virtual KWin, launched multiple windows, and captured the workspace with Observed result: This proves ScreenShot2 6. Re-running this PR's probeI also re-ran the probe from this PR on the same host. The current result is not 30/30 failures. Observed result: So the current probe result is 21/30 OK, with failures concentrated in forced compositor settings. What is wrong with the current PR design/report1. It treats forced compositor failures as baseline virtual-session failuresThe important distinction is:
The report currently collapses these into one feasibility conclusion. That makes the conclusion too broad. 2. It does not validate the user-facing artifactThe probe checks whether bytes arrive from the ScreenShot2 pipe, but the report does not require converting those bytes into PNG and validating the image. Also, the script says For this project, the important question is not only “did D-Bus return bytes?” It is:
The current probe does not answer that strongly enough. 3. It misses app/action/workspace scenariosThe current matrix mostly tests raw ScreenShot2 method calls. It should include at least:
Without those cases, it is too easy to draw the wrong design conclusion. 4. It uses the result as policy evidence for
|
8a36e19 to
c48759d
Compare
Correction applied based on review feedbackFollowing @isac322's review feedback, I re-ran What was wrongThe original commit reported 30/30 ScreenShot2 attempts fail in virtual KWin sessions and recommended keeping
What was changedForce-pushed
Cascading fixes to downstream PRs
Verification
Sorry for the wrong conclusion in the original spike — fork-resource exhaustion and a portal/D-Bus boot race during the original run produced misleading results that I should have caught. |
c48759d to
a245d99
Compare
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Wave 1 of kwin-mcp backend overhaul. Combines two pre-implementation
spikes into one docs-only PR.
ScreenShot2 virtual-session feasibility (`docs/design/screenshot2-virtual-feasibility.md`):
- Probe runs `kwin_wayland --virtual` with 10 env-var combos x 3 ScreenShot2
methods, plus Phase 2 app scenarios (kcalc, kcalc + kdialog x2 multi-window)
and Phase 3 forced-compositor stress
- Conclusion: ScreenShot2 is the primary fast path in normal virtual KWin
sessions; spectacle remains a compatibility fallback for forced-compositor
failures (KWIN_COMPOSE=O/Q)
- Reproduction: `bash scripts/screenshot2_probe.sh`
KWin scripting feasibility on KDE Plasma 6 (`docs/design/kwin-scripting-feasibility.md`):
- Probe verifies KWin 6.6.4 /Scripting D-Bus interface, JS templates rewritten
from KDE Plasma 6 scripting docs (no kdotool GPL-3.0 copy)
- Decision recorded: scripting blocked on KWin 6.6.x because
`loadScriptFromText` is unavailable; window backend will use
`loadScript(tempfile)` pattern instead
- Reproduction: `bash scripts/kwin_scripting_probe.sh`
README arch diagram + How It Works section keep ScreenShot2 D-Bus as primary
with spectacle fallback (no spectacle-only wording).
Affected files:
- README.md
- scripts/{screenshot2_probe.sh, kwin_scripting_probe.sh}
- docs/design/{screenshot2-virtual-feasibility.md, kwin-scripting-feasibility.md}
a245d99 to
d2e3932
Compare
Wave 1 of the kwin-mcp backend overhaul. Combines two pre-implementation spikes into a single docs-only PR.
ScreenShot2 virtual-session feasibility
docs/design/screenshot2-virtual-feasibility.md+scripts/screenshot2_probe.shProbe runs
kwin_wayland --virtualwith 10 env-var combinations × 3 ScreenShot2 methods, plus Phase 2 app scenarios (kcalc, kcalc + kdialog ×2 multi-window) and Phase 3 forced-compositor stress.Conclusion: ScreenShot2 is the primary fast path in normal virtual KWin sessions on KWin 6.6.x.
spectacleremains a compatibility fallback for forced-compositor failures (KWIN_COMPOSE=O/KWIN_COMPOSE=Q).Correction note: This replaces an earlier (force-pushed away) commit that incorrectly reported 30/30 ScreenShot2 failures. See @isac322's review feedback for the original ground-truth that triggered re-running the probe.
KWin scripting feasibility on KDE Plasma 6
docs/design/kwin-scripting-feasibility.md+scripts/kwin_scripting_probe.shProbe verifies KWin 6.6.4
/ScriptingD-Bus interface. JS templates rewritten from KDE Plasma 6 scripting docs (no kdotool GPL-3.0 copy).Decision recorded: in-memory script loading via
loadScriptFromTextis unavailable on KWin 6.6.x. The downstream window backend (PR #26) uses theloadScript(tempfile_path, name)pattern instead.README
Architecture diagram + How It Works → Screenshot Capture both reflect "KWin ScreenShot2 D-Bus (spectacle fallback)".
Reproduction
Files
README.mddocs/design/screenshot2-virtual-feasibility.md(new)docs/design/kwin-scripting-feasibility.md(new)scripts/screenshot2_probe.sh(new)scripts/kwin_scripting_probe.sh(new)