test(plan-design-with-ui): expand AUQ-detection tail from 2.5KB to 5KB

The harness slices visibleSince(since).slice(-2500) for AUQ detection,
but /plan-design-review Step 0's mode-selection AUQ renders larger than
that: cursor `❯1. <label>` line plus per-option descriptions plus box
dividers plus the footer prompt blow past 2.5KB after stripAnsi
resolves TTY cursor-positioning escapes.

When the cursor `❯1.` line was captured but the `2.` line was sliced
off the top, isNumberedOptionListVisible returned false even though
the AUQ was fully rendered on-screen — outcome=timeout 3x in a row
on both main and the contributor wave branch.

5KB comfortably covers the full Step 0 AUQ block without dragging in
stale scrollback from upstream permission grants.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-05-11 09:47:30 -07:00
parent 86bc2e993c
commit 561594f54a
+8 -1
View File
@@ -84,7 +84,14 @@ describeE2E('/plan-design-review with UI scope (gate)', () => {
// Classify the recent tail only — old permission text persists
// in visibleSince(since) and would otherwise re-trigger forever.
const recentTail = visible.slice(-2500);
// 5KB window: plan-design-review Step 0 renders a numbered AUQ with
// box dividers + per-option descriptions + footer prompt. The full
// rendering frequently exceeds 2.5KB, especially after TTY cursor-
// positioning escapes resolve through stripAnsi. A 2.5KB tail can
// capture the cursor `1.` line without capturing the line that has
// `2.`, defeating isNumberedOptionListVisible. 5KB comfortably
// covers the full AUQ block without including stale scrollback.
const recentTail = visible.slice(-5000);
// Real skill AskUserQuestion visible (not a permission dialog)?
if (