Adds inspect-live skill and e2e-dev-inspect script for UI inspection with Playwright#5070
Adds inspect-live skill and e2e-dev-inspect script for UI inspection with Playwright#5070
Conversation
🤖 Augment PR SummarySummary: Introduces a new Changes:
Technical Notes: The script reuses the E2E runner’s test-server bridge approach (via Playwright Electron internals) and prints structured stdout markers (e.g. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Adds a new “live inspection” workflow for running GitLens inside a real VS Code instance and inspecting/interacting with the UI via Playwright, documented as an agent skill.
Changes:
- Adds
scripts/e2e-dev-inspect.mjs, a CLI for launching VS Code + GitLens and running ordered inspection actions (ARIA snapshots, DOM queries, clicks, screenshots, log search, optional evaluator bridge). - Adds a new
/inspect-liveskill documenting how to use the script for UI/log/runtime inspection. - Updates
AGENTS.mdto reference the new skill.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/e2e-dev-inspect.mjs | New Playwright-based VS Code launcher + inspection CLI (actions, optional evaluator bridge, log search, screenshots). |
| AGENTS.md | Adds /inspect-live to the available skills table. |
| .claude/skills/inspect-live/SKILL.md | Documents the new skill, modes, and common usage recipes for the inspection script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0de6de4 to
eb20df9
Compare
|
augment review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eb20df9 to
6ae55c2
Compare
|
augment review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
afe4046 to
c623406
Compare
|
augment review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c42f5b9 to
21bd4a8
Compare
ramin-t
left a comment
There was a problem hiding this comment.
Looks neat - looking forward to trying it
| function findVSCode(explicit) { | ||
| if (explicit) return explicit; | ||
| const candidates = [ | ||
| '/Applications/Visual Studio Code.app/Contents/MacOS/Electron', | ||
| `${os.homedir()}/Applications/Visual Studio Code.app/Contents/MacOS/Electron`, | ||
| // Linux — Electron binaries (not wrapper scripts like /usr/bin/code) | ||
| '/usr/share/code/code', // deb/rpm install | ||
| `${os.homedir()}/.local/share/code/code`, // user-local install | ||
| '/snap/code/current/usr/share/code/code', // snap install | ||
| ]; | ||
| if (process.env.LOCALAPPDATA) { | ||
| candidates.push(`${process.env.LOCALAPPDATA}/Programs/Microsoft VS Code/Code.exe`); | ||
| } | ||
| if (process.env.ProgramFiles) { | ||
| candidates.push(`${process.env.ProgramFiles}/Microsoft VS Code/Code.exe`); | ||
| } | ||
| for (const c of candidates) { | ||
| if (existsSync(c)) return c; | ||
| } | ||
| throw new Error('Could not find VS Code. Provide --vscode-path.'); | ||
| } |
There was a problem hiding this comment.
Would be nice to detect and use insiders if the user prefers it (it lives in a different folder)
Adds
/inspect-live— Playwright-based live extension inspectionAdds a CLI tool (
scripts/e2e-dev-inspect.mjs) that launches a real VS Code instance with GitLens and lets you programmatically inspect it via Playwright — read UI text, query webview DOM, check accessibility trees, search extension logs, take screenshots, and evaluate runtime values.Why: There was no lightweight way to answer "what does the running extension actually show?" without manually launching VS Code or writing a throwaway E2E test. This is especially useful for AI-assisted workflows where an agent needs to verify UI state, feature flag behavior, or debug output.
What's included:
scripts/e2e-dev-inspect.mjs— the CLI with composable, ordered actions (--command,--query-frame,--aria,--logs,--screenshot,--eval, etc.).claude/skills/inspect-live/SKILL.md— skill doc for AI agentsAGENTS.md— registers the new skillCLI examples:
AI agent examples:
Agent runs
/inspect-live, builds the extension, executes--command gitlens.showHomeView --query-frame ".banner h2", and reports back the text content — or confirms the element doesn't exist.Agent runs
/inspect-livewith--env dev --command gitlens.showWelcomeView --query-frame h1 --logs FeatureFlagServiceto see both the rendered heading and the flag evaluation logs, pinpointing whether the issue is in the flag config or the rendering logic.Two modes: Development (default, respects
gitkraken.env) and Test (--with-evaluator, enablesevaluate()for runtime inspection). Each run uses an isolated temp directory — no interference with your real VS Code.