fix: restyle QA annotations to avoid misleading AI reviewer

- Annotations now use cyan dashed border + monospace "QA:" prefix
  instead of red solid labels that look like UI error messages
- Video review prompts explicitly tell reviewer to ignore QA annotations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-03-26 22:34:51 +00:00
parent d756c362e3
commit 511fdf1b24
2 changed files with 11 additions and 9 deletions

View File

@@ -746,22 +746,22 @@ async function executeAction(
await page.evaluate(
({ text, x, y, ms }) => {
const el = document.createElement('div')
el.textContent = text
el.textContent = 'QA: ' + text
Object.assign(el.style, {
position: 'fixed',
left: x + 'px',
top: y + 'px',
zIndex: '2147483646',
padding: '4px 10px',
borderRadius: '4px',
background: 'rgba(255, 60, 60, 0.9)',
color: '#fff',
fontSize: '13px',
fontWeight: '600',
fontFamily: 'system-ui, sans-serif',
padding: '3px 8px',
borderRadius: '3px',
background: 'rgba(0, 0, 0, 0.6)',
border: '1.5px dashed rgba(120, 200, 255, 0.8)',
color: 'rgba(120, 200, 255, 0.9)',
fontSize: '11px',
fontWeight: '500',
fontFamily: 'monospace',
pointerEvents: 'none',
whiteSpace: 'nowrap',
boxShadow: '0 2px 8px rgba(0,0,0,0.3)',
transform: 'translateY(-100%) translateX(-50%)',
animation: 'qa-ann-in 200ms ease-out'
})

View File

@@ -353,6 +353,7 @@ function buildComparativePrompt(
' that were NOT present in the BEFORE video?',
'',
'Note: Brief black frames during page transitions are NORMAL.',
'Note: Small cyan/purple dashed labels prefixed with "QA:" are annotations placed by the automated test script — they are NOT part of the application UI. Do not treat them as bugs or evidence.',
'Report only concrete, visible differences. Avoid speculation.',
'',
'Return markdown with these sections exactly:',
@@ -466,6 +467,7 @@ function buildSingleVideoPrompt(
'The video shows the full test session — analyze it chronologically.',
'Focus on UI regressions, broken states, visual glitches, unreadable text, missing labels/i18n, and clear workflow failures.',
'Note: Brief black frames during page transitions are NORMAL and should NOT be reported as issues.',
'Note: Small cyan/purple dashed labels prefixed with "QA:" are annotations placed by the automated test script — they are NOT part of the application UI. Do not treat them as bugs or evidence.',
'Report only concrete, visible problems and avoid speculation.',
'If confidence is low, mark it explicitly.',
'',