Add ui manual smoke playbook
ab0be26ecd22f5c032787ba52008f941d92ed641
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
- Parent 1: 2a7b4df1aabc
bugabingas pi extensions
ab0be26ecd22f5c032787ba52008f941d92ed641
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
+144 / −0 text lines
new file mode 100644+52 / −0 text lines
# UI manual smoke playbook## Host ruleUse zellij on win32.Do not invoke tmux on win32.Use tmux only on non-win32 hosts where it is installed.## win32 zellij```shnode extensions/ui/scripts/zellij-smoke.mjszellij attach <printed-session>```Checkpoints:1. Run `pi -e extensions/ui/index.ts` inside the zellij pane if the script did not launch it.2. Send `/ui`.3. Verify the terminal widget shows a token URL and QR.4. Open the exact URL in Chrome or Firefox.5. Verify `/api/status` without the token returns `401`.6. Try `/`, `/skill:`, `!`, `!!`, Esc, Ctrl+O, and Ctrl+P from the browser composer.7. Ask for card, form, and raw HTML widgets.8. Click one widget action and verify a visible attribution row appears before any widget-originated prompt reaches the agent.9. Scroll, click, select text, background the tab, return, and send one prompt.10. Verify the digest indicator appears and the digest is attached once only.11. Send `/ui off` in Pi.12. Verify browser disconnect and terminal UI restores as far as Pi exposes.Cleanup:```shzellij kill-session <printed-session>```## non-win32 tmux```shnode extensions/ui/scripts/tmux-smoke.mjstmux attach -t <printed-session>```Use the same checkpoints.## Evidence to capture- zellij/tmux session name.- `/ui` URL redacted to origin plus `token=[redacted]`.- 401 result for tokenless request.- Browser stream screenshot for widget + attribution + digest.- `/ui off` terminal state.new file mode 100644+38 / −0 text lines
#!/usr/bin/env nodeimport { spawnSync } from "node:child_process";if (process.platform === "win32") { console.error( "tmux-smoke is disabled on win32. Use scripts/zellij-smoke.mjs.", ); process.exit(2);}const tmux = process.env.TMUX_BIN ?? "tmux";const session = "ui-" + "smoke-" + Date.now().toString(36);run(tmux, ["-V"]);run(tmux, ["new-session", "-d", "-s", session, "pi -e extensions/ui/index.ts"]);console.log(`tmux session: ${session}`);console.log(`attach: ${tmux} attach -t ${session}`);console.log("manual checkpoints:");console.log("1. Send /ui and verify terminal widget shows URL + QR.");console.log( "2. Open URL in browser; verify exact URL works and /api/status without token returns 401.",);console.log( "3. Try /, /skill:, !, !!, Esc, Ctrl+O, Ctrl+P, card/form/raw widget, click widget action.",);console.log( "4. Scroll/click/select/background/return/send next prompt; verify digest appears once.",);console.log( "5. Send /ui off; verify browser disconnect and terminal UI restored as far as Pi exposes.",);console.log(`kill: ${tmux} kill-session -t ${session}`);function run(command, args) { const result = spawnSync(command, args, { stdio: "inherit", shell: false }); if (result.status !== 0) process.exit(result.status ?? 1);}new file mode 100644+54 / −0 text lines
#!/usr/bin/env nodeimport { spawnSync } from "node:child_process";if (process.platform !== "win32") { console.error( "zellij-smoke is the win32 smoke path. Use scripts/tmux-smoke.mjs on non-win32.", ); process.exit(2);}const zellij = process.env.ZELLIJ ?? "zellij";const session = "ui-" + "smoke-" + Date.now().toString(36);const cwd = process.cwd();run(zellij, ["--version"]);run( zellij, [ "--session", session, "--new-session-with-layout", "default", "options", "--default-cwd", cwd, ], { allowFailure: true },);console.log(`zellij session: ${session}`);console.log(`attach: ${zellij} attach ${session}`);console.log("manual checkpoints:");console.log("1. In the zellij pane run: pi -e extensions/ui/index.ts");console.log("2. Send /ui and verify terminal widget shows URL + QR.");console.log( "3. Open URL in browser; verify exact URL works and /api/status without token returns 401.",);console.log( "4. Try /, /skill:, !, !!, Esc, Ctrl+O, Ctrl+P, card/form/raw widget, click widget action.",);console.log( "5. Scroll/click/select/background/return/send next prompt; verify digest appears once.",);console.log( "6. Send /ui off; verify browser disconnect and terminal UI restored as far as Pi exposes.",);console.log(`kill: ${zellij} kill-session ${session}`);function run(command, args, options = {}) { const result = spawnSync(command, args, { stdio: "inherit", shell: false }); if (!options.allowFailure && result.status !== 0) process.exit(result.status ?? 1); return result;}