@sentry/junior-agent-browser 0.262.0 → 0.263.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,48 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: visual-web-qa
|
|
3
3
|
description: Verifies user-visible web changes with scoped browser evidence and reports only what the captured screenshots, videos, or state checks support. Use when frontend, docs, CSS, layout, theme, responsive, navigation, loading, animation, or interaction changes need visual validation; use agent-browser for general automation that is not specifically visual QA.
|
|
4
|
-
spec_hash:
|
|
5
|
-
allowed-tools: bash sendFiles
|
|
4
|
+
spec_hash: 7ef6809d0e08
|
|
5
|
+
allowed-tools: bash sendFiles viewImage publishImage unpublishImage
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Visual Web QA
|
|
9
9
|
|
|
10
|
-
Verify rendered behavior in a browser
|
|
11
|
-
|
|
12
|
-
## Workflow
|
|
13
|
-
|
|
14
|
-
1. Classify the requested behavior as stable, temporal, or exact-state verification.
|
|
15
|
-
2. Resolve a valid local, preview, or explicitly requested target URL.
|
|
16
|
-
3. Choose representative pages, states, viewports, and themes.
|
|
17
|
-
4. Capture browser evidence with meaningful waits and fresh element refs.
|
|
18
|
-
5. Share requested artifacts with `sendFiles` and verify delivery success.
|
|
19
|
-
6. Report the exact target, evidence, result, findings, and limitations.
|
|
20
|
-
|
|
21
|
-
## Choose Evidence
|
|
22
|
-
|
|
23
|
-
| Request | Primary evidence | Optional support |
|
|
24
|
-
| ----------------------------------------- | ---------------------------------- | ------------------------------------------------ |
|
|
25
|
-
| Layout, CSS, content, typography | Screenshot | DOM text or style check |
|
|
26
|
-
| Light and dark themes | Screenshot per relevant theme | Theme attribute check |
|
|
27
|
-
| Responsive behavior | Screenshot per relevant breakpoint | Video only if resize motion matters |
|
|
28
|
-
| Loading state, animation, transition | Short video | Screenshot for a distinct final-state question |
|
|
29
|
-
| Navigation or interaction sequence | Short video | Screenshot for a specific defect |
|
|
30
|
-
| Stable menu, modal, hover, or focus state | Screenshot | Video if the transition matters |
|
|
31
|
-
| Exact text, route, ARIA, or attribute | DOM check | Screenshot or video if the visible state matters |
|
|
32
|
-
|
|
33
|
-
Use screenshots for stable rendered states. Use short videos for timing, motion, loading, or sequence. A purely temporal request may use video without a redundant screenshot. DOM checks support visual evidence; they do not replace it when the user asks how something looks.
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
agent-browser --session visual-qa screenshot /tmp/visual-qa.png
|
|
37
|
-
agent-browser --session visual-qa screenshot --full /tmp/visual-qa-full.png
|
|
38
|
-
agent-browser --session visual-qa screenshot --annotate /tmp/visual-qa-issue.png
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Keep Scope Representative
|
|
42
|
-
|
|
43
|
-
- Check one to four representative pages or states unless the user requests broader coverage or the change spans more templates.
|
|
44
|
-
- Choose the viewport-theme combinations most likely to expose the issue instead of building an exhaustive matrix by default.
|
|
45
|
-
- State clearly when only part of the requested surface was verified.
|
|
10
|
+
Verify rendered behavior in a browser. Never claim a rendered change looks correct from code alone, and never claim more than the captured evidence shows.
|
|
46
11
|
|
|
47
12
|
## Resolve The Target
|
|
48
13
|
|
|
@@ -57,21 +22,29 @@ Use this order:
|
|
|
57
22
|
|
|
58
23
|
Do not check production and claim an unmerged change is present. If no valid target is reachable, report **blocked** and name the missing server, preview, build, or authentication requirement.
|
|
59
24
|
|
|
60
|
-
##
|
|
25
|
+
## Choose Evidence
|
|
26
|
+
|
|
27
|
+
- **Stable states** such as layout, CSS, typography, themes, breakpoints, menus, modals, and focus: take screenshots. Take one for each relevant theme or breakpoint.
|
|
28
|
+
- **Temporal behavior** such as loading, animation, transitions, and interaction sequences: record a short video. A redundant screenshot is not necessary.
|
|
29
|
+
- **Exact text, route, ARIA, or attributes:** use a DOM check. A DOM check supports visual evidence. It does not replace visual evidence when the user asks how something looks.
|
|
61
30
|
|
|
62
|
-
|
|
31
|
+
Check one to four representative pages or states, with the viewport-theme combinations most likely to show the issue. Do not build an exhaustive matrix unless the user asks for it.
|
|
63
32
|
|
|
64
33
|
```bash
|
|
65
|
-
agent-browser --session visual-qa
|
|
66
|
-
agent-browser --session visual-qa
|
|
67
|
-
agent-browser --session visual-qa
|
|
68
|
-
agent-browser --session visual-qa wait 100
|
|
34
|
+
agent-browser --session visual-qa screenshot /tmp/visual-qa.png
|
|
35
|
+
agent-browser --session visual-qa screenshot --full /tmp/visual-qa-full.png
|
|
36
|
+
agent-browser --session visual-qa screenshot --annotate /tmp/visual-qa-issue.png
|
|
69
37
|
```
|
|
70
38
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
39
|
+
## Capture Reliable State
|
|
40
|
+
|
|
41
|
+
Wait for a signal that proves progress, not an arbitrary delay:
|
|
42
|
+
|
|
43
|
+
- `wait --url "**/expected-path"` or `wait --text "Expected text"` for route and content changes.
|
|
44
|
+
- `wait --load networkidle` only when the action makes real network requests.
|
|
45
|
+
- `wait 100` only for an animation that has no completion signal.
|
|
46
|
+
|
|
47
|
+
Run `snapshot -i` after navigation or significant DOM changes before you use element refs.
|
|
75
48
|
|
|
76
49
|
For initial loading behavior, start recording before the first navigation:
|
|
77
50
|
|
|
@@ -86,28 +59,28 @@ For post-load interactions, explore first, then start recording. `record start`
|
|
|
86
59
|
|
|
87
60
|
## Share Evidence
|
|
88
61
|
|
|
89
|
-
|
|
62
|
+
Send every artifact the user should receive with `sendFiles`. Claim an artifact was shared only when `sendFiles` succeeds in this turn. If delivery fails or `sendFiles` is unavailable, report the error and the saved paths.
|
|
90
63
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{ "path": "/tmp/visual-qa.png" },
|
|
95
|
-
{ "path": "/tmp/visual-qa-load.webm" }
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
```
|
|
64
|
+
## Attach Evidence To Pull Requests
|
|
65
|
+
|
|
66
|
+
When the QA is for a pull request, attach screenshots to the PR when you can. Reviewers then see the rendered result without the Slack thread.
|
|
99
67
|
|
|
100
|
-
|
|
101
|
-
|
|
68
|
+
1. Open each screenshot with `viewImage` and check it for sensitive data. See **Protect Sensitive Data**.
|
|
69
|
+
2. If a screenshot shows sensitive data, do not publish it. Recapture it with the data out of view, or skip it.
|
|
70
|
+
3. Publish each safe screenshot with `publishImage`. The URL is public to anyone who has it.
|
|
71
|
+
4. Embed the returned URLs in the PR body or a PR comment, with one short caption for each page, state, viewport, or theme.
|
|
72
|
+
|
|
73
|
+
- `publishImage` accepts only images. Do not publish videos. Describe the temporal result in text instead.
|
|
74
|
+
- Do not link private Slack files or conversation attachment URLs in the PR.
|
|
75
|
+
- If you publish an image by mistake, remove it with `unpublishImage` and remove it from the PR.
|
|
76
|
+
- If `publishImage` or the PR update fails, report the failure and do not claim the PR has screenshots.
|
|
102
77
|
|
|
103
78
|
## Protect Sensitive Data
|
|
104
79
|
|
|
105
|
-
Never capture or share credential entry, session tokens, customer data, or unrelated sensitive UI state. If reaching the target requires exposing that data, use an existing safe authenticated session or report the authentication requirement as a limitation or blocker.
|
|
80
|
+
Never capture or share credential entry, session tokens, customer data, or unrelated sensitive UI state. Apply this rule with more care to published images, because their URLs are public. Look for real emails, names, avatars, customer org or project names, tokens, API keys, DSNs, and private URLs. Seeded or fake local data is safe. If reaching the target requires exposing that data, use an existing safe authenticated session or report the authentication requirement as a limitation or blocker.
|
|
106
81
|
|
|
107
82
|
## Report The Result
|
|
108
83
|
|
|
109
|
-
Report:
|
|
110
|
-
|
|
111
84
|
- **Target:** exact URL verified
|
|
112
85
|
- **Evidence:** screenshots, videos, and state checks gathered, with why each was chosen
|
|
113
86
|
- **Result:** pass, issues found, or blocked
|
|
@@ -115,5 +88,3 @@ Report:
|
|
|
115
88
|
- **Limitations:** requested pages, states, viewports, or themes not verified
|
|
116
89
|
|
|
117
90
|
Use **pass** only when the captured evidence matches the requested behavior without an obvious scoped regression. Use **issues found** for broken layout, incorrect motion, flicker, missing assets, or invalid states. Use **blocked** when no safe reachable target exists.
|
|
118
|
-
|
|
119
|
-
Never generalize beyond the evidence collected, and never claim a rendered change looks correct without opening a browser and gathering supporting evidence.
|
|
@@ -50,6 +50,15 @@ The agent SHALL use a user-provided, local, or preview target for changed code,
|
|
|
50
50
|
- **WHEN** a user asks to verify an unmerged frontend change but the workspace has no runnable page, local server, or preview deployment
|
|
51
51
|
- **THEN** the agent investigates enough to confirm the missing target and reports blocked instead of checking production and claiming the change is present
|
|
52
52
|
|
|
53
|
+
### Behavior: Pull request evidence
|
|
54
|
+
|
|
55
|
+
The agent SHALL attach safe screenshots to the pull request when the QA is for a pull request and image publishing is available. It SHALL inspect each image for sensitive data before it publishes the image.
|
|
56
|
+
|
|
57
|
+
#### Scenario: Visual QA for a pull request
|
|
58
|
+
|
|
59
|
+
- **WHEN** a user asks for visual QA of a frontend change in a pull request
|
|
60
|
+
- **THEN** the agent checks each screenshot for sensitive data, publishes only safe screenshots with `publishImage`, and embeds the URLs in the pull request body or a comment
|
|
61
|
+
|
|
53
62
|
## Constraints
|
|
54
63
|
|
|
55
64
|
### Constraint: Evidence required
|
|
@@ -70,4 +79,4 @@ The agent MUST NOT leave an active video recording running after the target beha
|
|
|
70
79
|
|
|
71
80
|
### Constraint: Sensitive capture
|
|
72
81
|
|
|
73
|
-
The agent MUST NOT record, screenshot, or share credential entry, session tokens, customer data, or unrelated sensitive interface state.
|
|
82
|
+
The agent MUST NOT record, screenshot, or share credential entry, session tokens, customer data, or unrelated sensitive interface state. The agent MUST NOT publish an image that contains this data, because published image URLs are public.
|