oh-my-opencode 5.1.81 → 5.1.83
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/dist/cli/index.js +443 -276
- package/dist/cli-node/index.js +443 -276
- package/dist/hooks/claude-code-hooks/handlers/empty-hook-config.fixture.d.ts +1 -0
- package/dist/index.js +650 -431
- package/dist/shared/opencode-message-dir.d.ts +1 -1
- package/dist/skills/browser/references/owned-engine/README.md +4 -2
- package/dist/skills/browser/references/owned-engine/frames-and-humans.md +9 -3
- package/dist/skills/browser/runtime/omowright/index.js +8 -8
- package/dist/skills/browser/runtime/omowright/manifest.json +4 -4
- package/dist/skills/frontend/SKILL.md +4 -2
- package/dist/skills/frontend/references/perfection/state-and-flow.md +120 -0
- package/dist/skills/visual-qa/AGENTS.md +2 -1
- package/dist/skills/visual-qa/SKILL.md +43 -11
- package/dist/skills/visual-qa/references/behaviour-evidence.md +189 -0
- package/dist/tui.js +15 -15
- package/package.json +15 -15
- package/packages/lsp-core/src/lsp/client-key.ts +14 -0
- package/packages/lsp-core/src/lsp/client-startup.ts +139 -0
- package/packages/lsp-core/src/lsp/client-wrapper.ts +4 -4
- package/packages/lsp-core/src/lsp/config-loader.ts +15 -0
- package/packages/lsp-core/src/lsp/directory-diagnostics-group-scan.test.ts +388 -0
- package/packages/lsp-core/src/lsp/directory-diagnostics-mixed-typescript.test.ts +124 -0
- package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +4 -4
- package/packages/lsp-core/src/lsp/directory-diagnostics.ts +38 -41
- package/packages/lsp-core/src/lsp/directory-group-scan.ts +124 -0
- package/packages/lsp-core/src/lsp/directory-server-groups.ts +84 -0
- package/packages/lsp-core/src/lsp/manager-acquisition.test.ts +115 -0
- package/packages/lsp-core/src/lsp/manager-lifecycle.test.ts +9 -9
- package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +41 -16
- package/packages/lsp-core/src/lsp/manager-reaping.test.ts +119 -0
- package/packages/lsp-core/src/lsp/manager-test-support.ts +108 -0
- package/packages/lsp-core/src/lsp/manager.ts +80 -249
- package/packages/lsp-core/src/lsp/native-typescript.ts +88 -0
- package/packages/lsp-core/src/lsp/server-installation.ts +15 -7
- package/packages/lsp-core/src/lsp/server-resolution-typescript-native.test.ts +327 -0
- package/packages/lsp-core/src/lsp/server-resolution.ts +28 -2
- package/packages/lsp-core/src/lsp/timer-provider.ts +17 -0
- package/packages/lsp-core/src/lsp/typescript-project-test-support.ts +52 -0
- package/packages/lsp-daemon/dist/cli.js +486 -310
- package/packages/lsp-daemon/dist/client.js +472 -296
- package/packages/lsp-daemon/dist/index.js +476 -300
- package/packages/lsp-tools-mcp/dist/cli.js +467 -291
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +160 -193
- package/packages/lsp-tools-mcp/dist/mcp.js +467 -291
- package/packages/lsp-tools-mcp/dist/tools.js +467 -291
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +478 -313
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +4 -2
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +9 -3
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +8 -8
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +4 -4
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +4 -2
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/state-and-flow.md +120 -0
- package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +2 -1
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +43 -11
- package/packages/omo-codex/plugin/skills/visual-qa/references/behaviour-evidence.md +189 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/browser/references/owned-engine/README.md +4 -2
- package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +9 -3
- package/packages/shared-skills/skills/browser/runtime/omowright/index.js +8 -8
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +4 -4
- package/packages/shared-skills/skills/frontend/SKILL.md +4 -2
- package/packages/shared-skills/skills/frontend/references/perfection/state-and-flow.md +120 -0
- package/packages/shared-skills/skills/visual-qa/AGENTS.md +2 -1
- package/packages/shared-skills/skills/visual-qa/SKILL.md +43 -11
- package/packages/shared-skills/skills/visual-qa/references/behaviour-evidence.md +189 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
3
|
-
"sourceDigest": "
|
|
2
|
+
"version": "0.3.2",
|
|
3
|
+
"sourceDigest": "c723f2a6dc33c2adb3e74ad9e31ca92653fa5ac3aa342df6c606ffc6b20e82f0",
|
|
4
4
|
"files": {
|
|
5
|
-
"index.js": "
|
|
5
|
+
"index.js": "d955f8a811637fad81f1d1219ffe8e474f1b8767f865589bf230957edd20bc10",
|
|
6
6
|
"page-bundle.js": "c517fa11a62a1b83dc79f72b288159a420831426418b1d4d9d492fc6c414f78c",
|
|
7
7
|
"LICENSE": "b083425948376611de9b92b0aeb7377e604505756ea427e541a34d9b030d4dc1"
|
|
8
8
|
},
|
|
9
|
-
"stagedAtUtc": "2026-11-
|
|
9
|
+
"stagedAtUtc": "2026-11-24T02:36:08.390Z"
|
|
10
10
|
}
|
|
@@ -19,6 +19,7 @@ Before the first edit, name the references the request routes to and one reason
|
|
|
19
19
|
| Greenfield with no concrete reference | `references/design/README.md` in full: the gate, the greenfield research lanes (`_INDEX.md` shortlist, `lazyweb.md`, `stylegallery.md`, imagen drafts), and the style routing. One Layer A + one Layer B, read in full. |
|
|
20
20
|
| A concrete visual reference: screenshot, mockup, Figma export, Stitch or imagen output | `references/design/image-to-code-skill.md`; a live site or URL to clone: `references/design/clone-from-url.md`. The reference is the contract and `/visual-qa` runs in reference-fidelity mode. |
|
|
21
21
|
| Any layout or structure change: a new or reshaped region, shell, panel, split, list or grid, sticky bar, or scroll container; "what goes where"; "this layout breaks at X" | `references/design/layout-skill.md` for the mechanics, then `references/design/stylegallery.md` for the pattern contract. Write the `Layout:` line (Brief, below) before the code; `/visual-qa` A12 checks the build against it. |
|
|
22
|
+
| Any state or flow change: a screen that loads, saves, signs in, or runs a multi-step flow; a request, a precondition, or saved and restored state | `references/perfection/state-and-flow.md`. Write the state table (Brief, below) before the code; `/visual-qa` H12-H19 check the build against it. |
|
|
22
23
|
| Paged output: a PDF report, print stylesheet, headless-Chrome print pipeline, a deck printed to paper, "why is this page half empty" | `references/design/print-paged-media.md`: page box, fragmentation properties, the atomic-block set, the keep-together side effect that strands a block. |
|
|
23
24
|
| Interaction or motion: micro-interactions, transitions, gestures, hover/press/state feedback | `references/design/interaction-skill.md`. The beui.dev catalog is the reference: read the nearest pattern's real source through its curl recipe, adapt the mechanism to `DESIGN.md` motion tokens. |
|
|
24
25
|
| Ambience, only when the brief asks: an animated, shader, particle, or grid background; a typographic reveal; scroll storytelling; spotlight, tilt, or glowing-border cards | `references/design/ambience-skill.md`. The react-bits catalog is the reference: nearest pattern, real source, its retrofit checklist (reduced motion, off-screen pause, compositor-only, tokens, budget); never vendor its code. |
|
|
@@ -44,6 +45,7 @@ Write this for every screen you build or change, into `DESIGN.md` section 5 besi
|
|
|
44
45
|
- **Required content.** Every input, datum, label, and piece of copy the request, the reference, or the existing screen requires, listed by name. Subtraction is checked against this list; nothing on it may disappear or merge.
|
|
45
46
|
- **Data shape -> component** (data screens): several things to compare -> table; a ranking -> ordered list; one verdict -> conclusion banner first, evidence under it; many items -> filter + results grid; one object -> detail view with its primary action. Choose from this before reaching for cards.
|
|
46
47
|
- **Layout line** (any layout or structure change, an existing `DESIGN.md` included): one `Layout:` line in the format and with the unreachable-host form given in `references/design/stylegallery.md`, written before the code.
|
|
48
|
+
- **State table** (any state or flow change): one row per state the changed path can reach, unknown included, in the format of `references/perfection/state-and-flow.md`: what decides it, what the user sees, the next action, the requests that run, what must not show. Written before the code.
|
|
47
49
|
- **Before captures** (changing an existing UI): fix the cases now, states x widths, and capture `before` through `/visual-qa` Before/after mode BEFORE the first edit. A baseline reconstructed later is not a baseline.
|
|
48
50
|
|
|
49
51
|
## 2. Build
|
|
@@ -52,7 +54,7 @@ Take the branch in `references/design/README.md` Phase 0 first (a small change o
|
|
|
52
54
|
|
|
53
55
|
- **Hit targets.** Touch layouts: at least 44x44 pt (44 CSS px) per interactive element, 8-12 pt between neighbours. Pointer-only: at least 24x24 CSS px (WCAG 2.5.8), about 10 px beyond the glyph. Grow the hit area with padding or a pseudo-element, never the glyph; adjacent bar buttons share continuous hit areas.
|
|
54
56
|
- **Hierarchy.** The brief's primary action is the one prominent control; the most important content sits top-leading in reading order; each screen's title says what it is; neither a destructive action nor Cancel is the Enter default.
|
|
55
|
-
- **States.** A control ships with hover, pressed, focus-visible, and disabled states beside its default. It keeps one box in every state: the label, icon, and spinner swap inside slots that exist in all states (a min-width sized to the longest label, a spinner overlaying the hidden label), so width, height, and padding never change when the state does, and an arrow or spinner never adds padding when it appears. A data view ships empty (offering the next action), loading (a placeholder at once, a spinner only past about a second), error (cause beside the object), and offline.
|
|
57
|
+
- **States.** A control ships with hover, pressed, focus-visible, and disabled states beside its default. It keeps one box in every state: the label, icon, and spinner swap inside slots that exist in all states (a min-width sized to the longest label, a spinner overlaying the hidden label), so width, height, and padding never change when the state does, and an arrow or spinner never adds padding when it appears. A data view ships empty (offering the next action), loading (a placeholder at once, a spinner only past about a second), error (cause beside the object), and offline. Each state is the true one: a read that failed or has not finished shows as unknown with a retry, never as empty or signed out; when an action settles, every region shows the new state and the old spinner, error and form are gone; a response updates only the request and target that asked for it; every pending state ends in success, failure or a deadline.
|
|
56
58
|
- **Keyboard.** Every action reachable in reading order with a visible focus ring that no sticky bar or overlay covers; Escape closes the topmost overlay; Enter triggers the non-destructive default; standard shortcuts keep their meaning; icon-only controls carry an accessible name and a tooltip.
|
|
57
59
|
- **Motion.** Only for a cause (an interaction, a state change, an arrival), on `transform`, `opacity`, `filter`; interruptible, never gating input; movement becomes a cross-fade under `prefers-reduced-motion`. A hover that changes nothing or motion on a non-interactive element is slop: leave it out.
|
|
58
60
|
- **Icons.** One SVG set (Lucide, Heroicons, Radix, Phosphor); never an emoji.
|
|
@@ -85,7 +87,7 @@ After the draft renders and the lint exits 0, walk every element on the screen a
|
|
|
85
87
|
|
|
86
88
|
## 4. Verify
|
|
87
89
|
|
|
88
|
-
Done is the `/visual-qa` gate, not your own glance. It owns the visual checks; this skill keeps build rules. Hand it the brief (B7 checks the primary action and priorities), the `Layout:` line (A12), the required-content list (Pass A), and, for a changed surface, the `before` set so it runs Before/after mode and the pair shows what improved. Its review loop is bounded (its Step 4 sets the budget): defects earn another round, and taste findings are recorded and stop it. A concrete reference runs reference-fidelity mode. Fix passes are scoped: after the first build, each fix names one change and the regions it owns (a token fix may own every region) and leaves everything else untouched, because a whole-page "make it better" pass breaks what was already right. Pass design-system decisions, evidence, and unresolved debt into `/review-work` for significant work.
|
|
90
|
+
Done is the `/visual-qa` gate, not your own glance. It owns the visual checks; this skill keeps build rules. Hand it the brief (B7 checks the primary action and priorities), the `Layout:` line (A12), the state table (H12-H19), the required-content list (Pass A), and, for a changed surface, the `before` set so it runs Before/after mode and the pair shows what improved. Its review loop is bounded (its Step 4 sets the budget): defects earn another round, and taste findings are recorded and stop it. A concrete reference runs reference-fidelity mode. Fix passes are scoped: after the first build, each fix names one change and the regions it owns (a token fix may own every region) and leaves everything else untouched, because a whole-page "make it better" pass breaks what was already right. Pass design-system decisions, evidence, and unresolved debt into `/review-work` for significant work.
|
|
89
91
|
|
|
90
92
|
Every UI or design-system deliverable states its WCAG 2.2 AA result. Probe the built surface in the real browser and put a table in the deliverable (PR body, change description, or reply): one row per item below, PASS / FAIL / N/A, with its evidence. A FAIL is fixed, or recorded as accepted debt in `DESIGN.md` section 8 with the user's sign-off.
|
|
91
93
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# State and flow
|
|
2
|
+
|
|
3
|
+
For a screen that reads or writes over a request, depends on a precondition, keeps saved or
|
|
4
|
+
restored state, or runs a multi-step flow. The build rule "a data view ships empty, loading, error
|
|
5
|
+
and offline" says which states exist. This file says how to make each one true, and what a change
|
|
6
|
+
of state must keep and clear. `/visual-qa` checks the result as H12-H19.
|
|
7
|
+
|
|
8
|
+
## The state table (write it before the code)
|
|
9
|
+
|
|
10
|
+
One row per state the changed path can reach. Put it in `DESIGN.md` section 5 beside the screen,
|
|
11
|
+
or in the change description when the project has none.
|
|
12
|
+
|
|
13
|
+
| State, and what decides it | The user sees | Next action offered | Requests that run | Must not show or run | Leaves by |
|
|
14
|
+
|---|---|---|---|---|---|
|
|
15
|
+
| Unknown: the first read is pending | placeholder for the list | none | the read | "No items", a count of 0 | read settles |
|
|
16
|
+
| Unknown: the read failed | "Could not load items" beside the list | Retry | none until retry | the empty state, the old list presented as current | retry |
|
|
17
|
+
| Empty: the read returned zero | what belongs here and how to add the first one | Add | none | an error, a retry | add |
|
|
18
|
+
| Loaded | the items | the primary action | none | a spinner, the previous error | refresh, select |
|
|
19
|
+
| Saving | the form, locked, with the typed values | Cancel when safe | one write | a second write, a success notice | write settles, or a deadline |
|
|
20
|
+
| Save failed | the typed values and the cause beside the field or object | Retry or edit | none until retry | "Saved", a cleared form | retry |
|
|
21
|
+
|
|
22
|
+
Rows that are often missing: unknown (pending and failed), a precondition not met, waiting on
|
|
23
|
+
someone else, a conflict with something that already exists, and partial success across several
|
|
24
|
+
targets. What decides a state is a stored fact or a response, never a default value: `false`,
|
|
25
|
+
`[]`, `0` and `null` before the first answer mean "not known yet".
|
|
26
|
+
|
|
27
|
+
## Rules for states
|
|
28
|
+
|
|
29
|
+
- **Unknown is a state.** A read that has not finished or that failed is never drawn as empty,
|
|
30
|
+
zero, signed out, "none" or "not set up". Each of those tells the user something false and
|
|
31
|
+
offers the wrong next action.
|
|
32
|
+
- **The message fits the cause.** A missing precondition says what to prepare and where; it does
|
|
33
|
+
not offer Retry, because retrying cannot help. Waiting on another party says who acts and that
|
|
34
|
+
the user has nothing to do. A real failure says so and offers the retry that can work.
|
|
35
|
+
- **Every region agrees.** When an action settles, the header, the row, the badge, the count, the
|
|
36
|
+
button label and the toast show the new state, and the previous spinner, error, success notice
|
|
37
|
+
and form are gone. One fact has one owner; regions read it, they do not keep copies.
|
|
38
|
+
- **Do not block what still works.** A precondition that stops creating does not stop reading
|
|
39
|
+
what exists. Guard the action, not the page.
|
|
40
|
+
- **Keep what the user typed.** A validation failure or a failed save leaves every value in place
|
|
41
|
+
and points at the field to change.
|
|
42
|
+
- **A conflict leads somewhere.** "Already exists" or "already pending" opens the existing thing
|
|
43
|
+
or shows its status. It is not turned into success, and it does not invite the same request
|
|
44
|
+
again.
|
|
45
|
+
- **Every pending state ends.** Success, failure, or a deadline with a message and a way out. An
|
|
46
|
+
indicator that can say "starting" forever is a defect.
|
|
47
|
+
|
|
48
|
+
## Rules for requests
|
|
49
|
+
|
|
50
|
+
- **A response belongs to the request and the target that asked.** Before applying it, check that
|
|
51
|
+
the target (item, account, project, session, route) is still the current one and that no newer
|
|
52
|
+
request for it has been sent. Key caches by target. A late response for a target the user left
|
|
53
|
+
is dropped: it does not update the screen, open a dialog or raise an error there.
|
|
54
|
+
- **Cancelling is not undoing.** An aborted request may still have taken effect on the server.
|
|
55
|
+
After a cancel, a timeout or a lost response, read the result back before showing either
|
|
56
|
+
outcome.
|
|
57
|
+
- **An optimistic write rolls back only itself.** A rollback restores the value that write
|
|
58
|
+
replaced. It does not overwrite a later edit or a newer confirmed value.
|
|
59
|
+
- **One press, one request.** Lock the action while its request is pending, in the handler and not
|
|
60
|
+
only in the button's look. A retry after a refusal sends a new request: a guard keyed on the
|
|
61
|
+
refused attempt's id blocks it.
|
|
62
|
+
- **Leaving is a case.** A write still in flight when the user navigates away or closes the window
|
|
63
|
+
either completes or is reported as not done on return.
|
|
64
|
+
|
|
65
|
+
## Re-entry
|
|
66
|
+
|
|
67
|
+
The screen is entered more ways than the one you built it from. Check where each piece of state
|
|
68
|
+
lives (the server, the URL, local storage, memory) and that these paths restore it:
|
|
69
|
+
|
|
70
|
+
- reload, and quit and restart for a desktop app
|
|
71
|
+
- close and reopen from the normal entry point
|
|
72
|
+
- back and forward
|
|
73
|
+
- the deep link, opened cold
|
|
74
|
+
- a second window or device, when the product syncs
|
|
75
|
+
- reconnect after the connection or the host dropped
|
|
76
|
+
|
|
77
|
+
State held only in memory is gone after the first of these. A control that depends on a live
|
|
78
|
+
connection (Send, a row menu, a status) needs its own "reconnecting" state so it does not vanish.
|
|
79
|
+
|
|
80
|
+
## What a change of state keeps
|
|
81
|
+
|
|
82
|
+
Server data, request status, the user's selection and input, and view state (an open panel, a
|
|
83
|
+
tab) change independently. Keep them in separate values: one combined value resets the user's
|
|
84
|
+
work whenever the data refreshes.
|
|
85
|
+
|
|
86
|
+
Across a refetch or a state change, the selection, typed input, focus and scroll position stay
|
|
87
|
+
unless the requirement says otherwise, and the region the user is working in does not move.
|
|
88
|
+
Reserve the space a notice or a result will take, and keep the previous data on screen with a
|
|
89
|
+
separate progress mark when the same target is refetched. Replace the data at once when the
|
|
90
|
+
target changed or the old data must not be shown.
|
|
91
|
+
|
|
92
|
+
## Reviewing client code for these defects
|
|
93
|
+
|
|
94
|
+
Follow one user action from the handler through local state, the request, the response and the
|
|
95
|
+
render, and read the guards above it before claiming a defect.
|
|
96
|
+
|
|
97
|
+
| Look at | The defect it produces |
|
|
98
|
+
|---|---|
|
|
99
|
+
| What each of start, success, rejection and cancel sets | an error turned into an empty success; a success that leaves the old failure up |
|
|
100
|
+
| Two inputs with their responses in reverse order; identity checks, abort handling, cache keys | a stale response over the current target; a rollback over a newer edit |
|
|
101
|
+
| Effect dependencies and cleanup, timers, subscriptions, listeners, keys | state that outlives its owner; a stale closure acting on the old target |
|
|
102
|
+
| Submit, Enter, click, IME composition, paste, autofill; empty, null and omitted values | a double submit; lost input; a field that flips between controlled and not |
|
|
103
|
+
| Refs and focus across conditional rendering and unmount | focus lost or sent to the wrong control; a dialog that cannot close |
|
|
104
|
+
| Storage errors and quota, server and client initial values, hydration, back and forward, another tab | a screen that differs after reload; a session change another tab never sees |
|
|
105
|
+
| Dates and zones, locale, units and ids between display, draft, storage and payload | a value that does not survive a round trip; "no value" turned into 0 |
|
|
106
|
+
| The endpoint, the current id and credentials, the error contract, cache invalidation | a call for the wrong resource; a failure that never reaches the screen; a list that stays stale |
|
|
107
|
+
|
|
108
|
+
Mark each finding as traced in source or executed in a browser. A source trace locates a cause; it
|
|
109
|
+
does not prove what the screen shows.
|
|
110
|
+
|
|
111
|
+
## Tests for these rules
|
|
112
|
+
|
|
113
|
+
- Put the rule in the fastest layer that can fail for it: transition logic in a unit or component
|
|
114
|
+
test, the wiring in an integration test, the visible result in a browser test.
|
|
115
|
+
- Control the order. Hold the response, assert the pending state, then release it; for a race,
|
|
116
|
+
start A, start B, finish B, then finish A, and assert the screen shows B. A fake that answers
|
|
117
|
+
in call order cannot fail this test.
|
|
118
|
+
- Wait for the event or the state, never for a fixed time.
|
|
119
|
+
- Prove the test can fail: revert the fix and watch it go red for that reason.
|
|
120
|
+
- The `visual-qa` skill's `references/behaviour-evidence.md` has the hold recipe and the capture cases.
|
|
@@ -11,7 +11,8 @@ The visual-QA skill's executable core: a zero-dependency Node CLI that produces
|
|
|
11
11
|
```
|
|
12
12
|
visual-qa/
|
|
13
13
|
├── SKILL.md # reviewer workflow (dual oracle, evidence gates) — the prose contract
|
|
14
|
-
├── references/browser-setup.md
|
|
14
|
+
├── references/browser-setup.md # capture engines and the viewport/theme matrix
|
|
15
|
+
├── references/behaviour-evidence.md # state and flow cases behind checklist H12-H19
|
|
15
16
|
└── scripts/
|
|
16
17
|
├── visual-qa.mjs # SHIPPED RUNTIME: bun-build bundle of cli.ts (+ embedded modules)
|
|
17
18
|
├── cli.ts # development source; dispatches image-diff / tui-check
|
|
@@ -66,13 +66,17 @@ The verdict is per page. One failing page fails the whole surface, so "most page
|
|
|
66
66
|
|
|
67
67
|
Every gate runs on captures produced AFTER the last edit to the rendered source. If any screenshot, PDF, capture, or QA JSON is older than the source file it claims to verify, it is stale and invalid - regenerate it before trusting it. Never report a PASS from an artifact you did not just produce against the current build. Between review rounds, re-capture only the pages a fix touched; the final approving round always judges a complete fresh set. The one deliberately old artifact is the `before` set of Step 6, which is dated to the pre-edit build on purpose.
|
|
68
68
|
|
|
69
|
+
### Evidence must be real
|
|
70
|
+
|
|
71
|
+
Under every capture name what it ran on: packaged app, dev server or fixture page; seeded, mocked or real-account data. A hold or a failure you inject at the network boundary is the condition of the Held, Failed and Switch cases, not a mock: the case is EXECUTED when the client under test is the real build. What an injected answer cannot prove is success: a success path answered by a stub, a mock or a fixture proves the stub, so run it once against the real backend and data, or mark it UNVERIFIED. Mark each behaviour claim EXECUTED (you ran it and saw it) or TRACED (read in source); only EXECUTED is a PASS. A tool's "visible" is true for a covered, transparent or off-viewport element, so check its box or capture the region. Wait for the event or the state, never a fixed time, and never loosen a wait, tolerance, locator or expected value to pass. A pass on retry does not erase the first failure: keep its capture.
|
|
72
|
+
|
|
69
73
|
### Machine pre-check - the detect SDK before any reviewer
|
|
70
74
|
|
|
71
75
|
On a web surface, run the `frontend` skill's detect SDK on every enumerated page before capturing for reviewers (`frontend/references/perfection/detect.md`: `detectPage({ kind: "url", url }, { reflow: true })`, or `bun <frontend skill dir>/scripts/detect/cli.ts --reflow --json <url>`). It reads the rendered page and reports contrast against the painted background, the type scale and heading order, overflow at 320-1440 px under an unbroken stress string, and decoration and copy tells. An error or warning is a FAIL on the matching checklist item (E2 contrast, B8 type scale, A9 or A13 layout, F8/F9 surfaces and scaffolds, C4 wrapping) before either reviewer looks; fix it and rerun. Keep the JSON beside the captures and hand it to both reviewers as evidence. Advisories go to the verdict's taste findings.
|
|
72
76
|
|
|
73
77
|
### Capture hygiene - validate before dispatching reviewers
|
|
74
78
|
|
|
75
|
-
Before any reviewer sees an image, verify each capture yourself: the file signature matches its extension (a JPEG named `.png` is invalid), the frame is fully composited (no black or missing regions from the screenshot compositor), dimensions match the requested viewport, and the frame holds only the page - a capture showing the browser's tabs or address bar, or the capture tool's own UI, is a window grab, not evidence. A defective capture wastes an entire review round on the pipeline instead of the product - fix the capture tooling and re-shoot before dispatch, and record the tooling defect in the QA log instead of looping the reviewer on it.
|
|
79
|
+
Before any reviewer sees an image, verify each capture yourself: the file signature matches its extension (a JPEG named `.png` is invalid), the frame is fully composited (no black or missing regions from the screenshot compositor), dimensions match the requested viewport, and the frame holds only the page - a capture showing the browser's tabs or address bar, or the capture tool's own UI, is a window grab, not evidence. It must also show the build, theme and state you meant: a blank window from the wrong build, an unpainted theme, or a locator that hit a caption instead of its control is an `[evidence]` defect, and any product finding read off it is withdrawn. A defective capture wastes an entire review round on the pipeline instead of the product - fix the capture tooling and re-shoot before dispatch, and record the tooling defect in the QA log instead of looping the reviewer on it.
|
|
76
80
|
|
|
77
81
|
### Web
|
|
78
82
|
|
|
@@ -137,9 +141,21 @@ Static screenshots miss what moves. For every interactive element and every anim
|
|
|
137
141
|
|
|
138
142
|
**Animation is never an excuse to skip or pass a region.** A high `diffRatio` from an in-flight animation means: compare the settled frame to the settled frame for pixel fidelity, and judge the motion itself against the reference's motion or, with no reference, against checklist section G.
|
|
139
143
|
|
|
140
|
-
|
|
144
|
+
### State and flow capture
|
|
145
|
+
|
|
146
|
+
Static frames miss a failed read drawn as an empty list, an error left up after the retry worked, and a late response painted over the item the user moved to. When the change touches a request, saved or restored state, or a multi-step flow, capture these cases by pressing the real control (a typed route, a scripted event, a forced click or an API call proves a different path):
|
|
147
|
+
|
|
148
|
+
- **Held:** hold the request, confirm it is pending, capture; release it, capture the settled state.
|
|
149
|
+
- **Failed:** the same with an error or a dropped response.
|
|
150
|
+
- **Re-entry:** reload or restart, close and reopen, back and forward, the deep link.
|
|
151
|
+
- **Switch:** hold a request for item A, move to item B, release A, capture B.
|
|
152
|
+
- **Twice:** press again while pending; retry after a refusal.
|
|
141
153
|
|
|
142
|
-
|
|
154
|
+
Record the requests sent beside each capture: a success notice is not a saved result. `$SKILL_DIR/references/behaviour-evidence.md` scopes the cases to the change and has the hold recipe, the keep-and-clear table and the first-use walk. A case you cannot produce here is UNVERIFIED, with the reason.
|
|
155
|
+
|
|
156
|
+
## The checklist - every item PASS, FAIL, UNVERIFIED or N/A, proven by a named capture
|
|
157
|
+
|
|
158
|
+
This is the platform baseline, distilled from Apple's Human Interface Guidelines and the `frontend` skill's visually checkable rules. Run it yourself on the capture matrix before dispatching and fix what you can; then both reviewers run it again independently (Pass A owns sections G-J, Pass B owns A-F). An item the surface has no instance of is N/A, never PASS. An item whose condition you could not produce or observe is UNVERIFIED with the reason, never PASS and never N/A. H12-H19 are behaviour checks, proven by the state and flow captures. `(mac)` marks macOS desktop items, `(phone)` marks items judged on the 390 captures; unmarked items apply everywhere.
|
|
143
159
|
|
|
144
160
|
**A. Layout and alignment**
|
|
145
161
|
- A1 Content is anchored by intent, centred or on the layout grid; nothing sits in the top-left of an otherwise empty canvas.
|
|
@@ -225,6 +241,14 @@ A13, B8, E7, F8 and F9 are adapted from the craft floor of [pbakaus/impeccable](
|
|
|
225
241
|
- H9 Sign-in is deferred until needed and its benefit stated; the auth method is named ("Sign in with GitHub", not "Sign in"); no license text in onboarding; password fields are masked and never pre-filled.
|
|
226
242
|
- H10 Search, when present: one search location, scope visible in the placeholder or a scope bar, recents or suggestions offered.
|
|
227
243
|
- H11 Settings, when present: labels say what ON does; system-wide settings are not duplicated; (mac) the settings window title names the visible pane.
|
|
244
|
+
- H12 The state shown is true: a read that failed or has not finished is never drawn as empty, zero, signed out or "none"; unknown has its own state with a retry.
|
|
245
|
+
- H13 When an action settles every region agrees (header, row, badge, count, button, toast), and the previous spinner, error, notice and form are gone.
|
|
246
|
+
- H14 Every pending state ends in success, failure or a deadline message with a way out.
|
|
247
|
+
- H15 A late response lands only on the target that asked: after Switch the screen shows nothing from the item the user left.
|
|
248
|
+
- H16 The result survives re-entry: the same state, data and controls after reload or restart, reopen, back and forward, and the deep link.
|
|
249
|
+
- H17 A second press while pending sends nothing twice, a retry after a refusal sends again, and leaving mid-request loses nothing without a message.
|
|
250
|
+
- H18 Across a refetch or state change the selection, typed input, focus and scroll stay, and the region being worked in does not move (box read before, while held, after).
|
|
251
|
+
- H19 First-use walk: at each step of the changed flow a first-time user can tell what to do, find the control, predict the result from its label, and see whether it worked; a control that looks actionable does something.
|
|
228
252
|
|
|
229
253
|
**I. Keyboard and accessibility**
|
|
230
254
|
- I1 A visible focus ring on every interactive element; focus order equals reading order; focus never moves without user action and never lands on a destructive or approve action by default.
|
|
@@ -275,6 +299,9 @@ SOURCE CODE:
|
|
|
275
299
|
CAPTURES:
|
|
276
300
|
{Web: actual screenshot path(s) plus your described observations. TUI: paste terminal.txt and terminal-ansi.txt inline.}
|
|
277
301
|
|
|
302
|
+
STATE AND FLOW EVIDENCE:
|
|
303
|
+
{The state table for each changed screen; per case (held, failed, re-entry, switch, twice) the capture paths, requests sent, build and data, and EXECUTED or TRACED. Write NONE if the change touches no request, saved state or multi-step flow.}
|
|
304
|
+
|
|
278
305
|
SHARED SCRIPT EVIDENCE (reference, not verdict):
|
|
279
306
|
{Paste the image-diff or tui-check JSON. Use alphaChannelIntact for the transparency check.}
|
|
280
307
|
|
|
@@ -285,15 +312,15 @@ CHECK EACH:
|
|
|
285
312
|
1. Real design system vs ad-hoc/mock-only: are styles driven by coherent design tokens and reused primitives, or one-off hardcoded values scattered per element? When a reference packet exists, the implementation must encode the reference's colors, type, spacing, radii, shadows, component anatomy, and states as reusable tokens/primitives that can extend to new pages. Treat mock-only screens, static compositions, or one-page hardcoded styling with no reusable system as BLOCKING unless the user explicitly requested a throwaway mock.
|
|
286
313
|
2. Faked-with-an-image anti-pattern: is the UI a real DOM/component tree, or a pasted raster/screenshot or background-image standing in for live elements? For TUI: a real layout that reflows, or hardcoded pre-rendered text at fixed widths?
|
|
287
314
|
3. Alpha and transparency: handled correctly, with no unexpected opaque or black fills and correct PNG/CSS alpha? Cross-check alphaChannelIntact.
|
|
288
|
-
4. Do the user-intended FEATURES actually work: interactions, states, navigation (web); input handling, resize, scroll (TUI)?
|
|
315
|
+
4. Do the user-intended FEATURES actually work on the path a user takes: interactions, states, navigation (web); input handling, resize, scroll (TUI)? Judge from the executed captures. A code trace locates a cause; it does not prove what the screen shows.
|
|
289
316
|
5. Required content: every item on the required-content list is present by name with its own control, field, or text. A merged input (two required fields collapsed into one), a dropped datum, or shortened required copy is BLOCKING. Reference packet coverage: every reference page, state, viewport, and annotated requirement is implemented or explicitly marked out of scope by the user; missing copy, swapped hierarchy, or unimplemented reference states are BLOCKING.
|
|
290
|
-
6. Checklist sections G-J, item by item: PASS, FAIL or N/A with the capture or clip that proves it.
|
|
317
|
+
6. Checklist sections G-J, item by item: PASS, FAIL, UNVERIFIED or N/A with the capture or clip that proves it. An item the captures do not show is UNVERIFIED: name the capture that would prove it, and add what the code path suggests, labelled TRACED. Every FAIL is BLOCKING.
|
|
291
318
|
|
|
292
319
|
OUTPUT:
|
|
293
320
|
VERDICT: PASS | REVISE | FAIL
|
|
294
321
|
CONFIDENCE: HIGH | MEDIUM | LOW
|
|
295
322
|
SUMMARY: 1-3 sentences
|
|
296
|
-
CHECKLIST: one line per item in G-J - id, PASS/FAIL/N/A, proving capture
|
|
323
|
+
CHECKLIST: one line per item in G-J - id, PASS/FAIL/UNVERIFIED/N/A, proving capture
|
|
297
324
|
FINDINGS: for each, [product|evidence] [defect|taste] [dimension] [severity] what is wrong, where (file/line or capture region), and the concrete fix
|
|
298
325
|
WHAT IS GOOD: correct aspects that must not regress
|
|
299
326
|
BLOCKING: items that must be fixed; empty if PASS
|
|
@@ -346,7 +373,7 @@ USE THE EVIDENCE:
|
|
|
346
373
|
- TUI (tui-check): inspect maxWidth vs expectedColumns, every overflowLines[] entry, borderMisaligned, and wideCharColumns[].
|
|
347
374
|
|
|
348
375
|
CHECK:
|
|
349
|
-
1. Checklist sections A-F, item by item, on the 390, 1440 and (for page layouts) 1920 captures in BOTH themes and on the scrolled-to-end shots: PASS, FAIL or N/A with the capture that proves it. Every FAIL is BLOCKING.
|
|
376
|
+
1. Checklist sections A-F, item by item, on the 390, 1440 and (for page layouts) 1920 captures in BOTH themes and on the scrolled-to-end shots: PASS, FAIL, UNVERIFIED or N/A with the capture that proves it. Every FAIL is BLOCKING.
|
|
350
377
|
2. When a reference packet exists, compare ACTUAL against REFERENCE pixel-perfectly, region by region: page bounds, header/nav, hero, cards, grids, charts, media, typography, copy, color tokens, radius, shadow, border, icon size, spacing, alignment, scroll position, and state. Anything off beyond unavoidable rasterization/rounding is a finding. The overview text is part of the target: missing or rearranged reference content is a finding even if the screenshot looks plausible.
|
|
351
378
|
3. When before/after pairs exist, judge each pair side by side: the after must show the brief's primary action and priorities more legibly than the before, carry fewer elements without a job, and lose nothing from the required-content list. A pair with no change a reader can point to, or a required input, datum, or copy present in before and missing or merged in after, is a BLOCKING [defect].
|
|
352
379
|
4. CJK precision:
|
|
@@ -362,7 +389,7 @@ OUTPUT:
|
|
|
362
389
|
VERDICT: PASS | REVISE | FAIL
|
|
363
390
|
CONFIDENCE: HIGH | MEDIUM | LOW
|
|
364
391
|
SUMMARY: 1-3 sentences
|
|
365
|
-
CHECKLIST: one line per item in A-F - id, PASS/FAIL/N/A, proving capture
|
|
392
|
+
CHECKLIST: one line per item in A-F - id, PASS/FAIL/UNVERIFIED/N/A, proving capture
|
|
366
393
|
EVIDENCE TRACE: each hotspot or overflow line mapped to its visual cause
|
|
367
394
|
FINDINGS: for each, [product|evidence] [defect|taste] [severity] what is wrong, where (hotspot grid or capture line:col), and the concrete fix
|
|
368
395
|
BLOCKING: items that must be fixed; empty if PASS
|
|
@@ -372,7 +399,7 @@ BLOCKING: items that must be fixed; empty if PASS
|
|
|
372
399
|
|
|
373
400
|
## Step 4 - Synthesize one verdict
|
|
374
401
|
|
|
375
|
-
When both passes return, merge them into a single report: one row per checklist item with its verdict and proving capture, then the non-checklist dimensions. For each FAIL or bad item, state what is wrong, where (file/line, hotspot grid, or capture line), and the concrete fix. Call out what is genuinely good so it is not regressed later. Any `[defect]` FAIL makes the verdict NEEDS WORK.
|
|
402
|
+
When both passes return, merge them into a single report: one row per checklist item with its verdict and proving capture, then the non-checklist dimensions. For each FAIL or bad item, state what is wrong, where (file/line, hotspot grid, or capture line), and the concrete fix. Call out what is genuinely good so it is not regressed later. Any `[defect]` FAIL makes the verdict NEEDS WORK. So does an UNVERIFIED item on a state or flow the change touches that you can still produce here; one that this environment cannot produce makes it NEEDS HUMAN REVIEW, naming the item and who can verify it.
|
|
376
403
|
|
|
377
404
|
### Completion gate - bounded independent review on fresh evidence
|
|
378
405
|
|
|
@@ -381,6 +408,7 @@ This is a hard stop rule, not a guideline. The UI is done when ALL of these hold
|
|
|
381
408
|
- An independent read-only reviewer returned PASS, or only `[taste]` findings, on the current build.
|
|
382
409
|
- That reviewer judged a FRESH capture of every enumerated page from Step 2 - no stale artifacts, no skipped pages.
|
|
383
410
|
- Every `[defect]` finding is resolved in the rendered output, not merely noted.
|
|
411
|
+
- No item on a state or flow the change touches is UNVERIFIED.
|
|
384
412
|
|
|
385
413
|
The loop is bounded. The initial dual-oracle pass is round 1; each fresh re-review increments it. A low-risk surface (one component, a figure, a report page, a copy change) gets 2 rounds; a product surface gets 3. Record the round count and the wall-clock time per round in the report.
|
|
386
414
|
|
|
@@ -393,12 +421,13 @@ The final approving round judges a complete fresh capture set. Do not stop becau
|
|
|
393
421
|
```markdown
|
|
394
422
|
# Visual QA - Verdict: GOOD | NEEDS WORK | NEEDS HUMAN REVIEW
|
|
395
423
|
|
|
396
|
-
Captured: {N pages} x {390, 1440[, 1920]} x {light, dark} + scrolled-end + motion frames, fresh as of {build}. Pages: {ids}.
|
|
424
|
+
Captured: {N pages} x {390, 1440[, 1920]} x {light, dark} + scrolled-end + motion frames + state and flow cases {held, failed, re-entry, switch, twice}, fresh as of {build}. Pages: {ids}.
|
|
425
|
+
Ran on: {packaged app | dev server | fixture page}, {seeded | mocked | real account} data.
|
|
397
426
|
Rounds: {k} of {budget} ({time per round}). Brief: {primary action; priorities 1-3} or NONE.
|
|
398
427
|
|
|
399
428
|
| Item | Verdict | Capture | Finding |
|
|
400
429
|
|---|---|---|---|
|
|
401
|
-
| A1 ... J2 | PASS / FAIL / N/A | path#region | [product|evidence] [defect|taste] what, where, fix - empty on PASS |
|
|
430
|
+
| A1 ... J2 | PASS / FAIL / UNVERIFIED / N/A | path#region | [product|evidence] [defect|taste] what, where, fix - empty on PASS |
|
|
402
431
|
|
|
403
432
|
| Dimension | Pass | Verdict | Evidence |
|
|
404
433
|
|---|---|---|---|
|
|
@@ -413,6 +442,9 @@ Rounds: {k} of {budget} ({time per round}). Brief: {primary action; priorities 1
|
|
|
413
442
|
## Must fix
|
|
414
443
|
[Blocking defects, each with location and fix, in priority order]
|
|
415
444
|
|
|
445
|
+
## Not verified
|
|
446
|
+
[Each UNVERIFIED item: the condition that could not be produced, why, and who can verify it]
|
|
447
|
+
|
|
416
448
|
## Recorded taste findings
|
|
417
449
|
[Noted, not re-reviewed; the user decides]
|
|
418
450
|
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Behaviour evidence (state, flow, transition)
|
|
2
|
+
|
|
3
|
+
A screen can pass every static capture and still be wrong: a failed read drawn as an empty list, an
|
|
4
|
+
error left up after the retry worked, a late response painted over the item the user moved to, a
|
|
5
|
+
saved value that is gone after a reload. This file is the procedure behind checklist items H12-H19
|
|
6
|
+
and the "State and flow capture" step in `SKILL.md`.
|
|
7
|
+
|
|
8
|
+
## Scope: pick the cases the change can break
|
|
9
|
+
|
|
10
|
+
Run the cases the changed code path can reach, not every case on every screen.
|
|
11
|
+
|
|
12
|
+
| The change touches | Run |
|
|
13
|
+
|---|---|
|
|
14
|
+
| A read: a list, a detail view, a status, a count | Held, Failed, Switch (when the target can change) |
|
|
15
|
+
| A write: save, send, delete, sign in, rename | Held, Failed, Twice, Re-entry |
|
|
16
|
+
| Stored or restored state: session, draft, selection, layout, scroll | Re-entry |
|
|
17
|
+
| A multi-step flow: onboarding, pairing, checkout, a wizard | Re-entry at each step, Failed on the step that calls out, the first-use walk |
|
|
18
|
+
| Copy, colour, spacing only | none; say so in the report |
|
|
19
|
+
|
|
20
|
+
The expected result comes from the state table (the `frontend` skill's Brief), the requirement, or
|
|
21
|
+
an agreed product rule. What the current build happens to do is not the expected result. With no
|
|
22
|
+
rule to check against, the item is UNVERIFIED and the report names the missing decision.
|
|
23
|
+
|
|
24
|
+
## Hold a request, then look
|
|
25
|
+
|
|
26
|
+
The pending state lasts milliseconds in a normal run, so a capture taken "while loading" is
|
|
27
|
+
usually a capture of the settled screen. Hold the response, confirm it is held, then capture.
|
|
28
|
+
|
|
29
|
+
In a Playwright suite:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
let release!: () => void
|
|
33
|
+
const held = new Promise<void>((resolve) => { release = resolve })
|
|
34
|
+
let seen!: () => void
|
|
35
|
+
const intercepted = new Promise<void>((resolve) => { seen = resolve })
|
|
36
|
+
|
|
37
|
+
await page.route("**/api/items**", async (route) => {
|
|
38
|
+
seen()
|
|
39
|
+
await held
|
|
40
|
+
await route.continue() // or route.fulfill({ status: 500 }) for the Failed case
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
await page.getByRole("button", { name: "Refresh" }).click()
|
|
44
|
+
await intercepted // the request really left and really is held
|
|
45
|
+
// capture: the pending text, what is locked, typed input, selection, focus, scroll, the working region's box
|
|
46
|
+
release()
|
|
47
|
+
// wait for the state that says it settled, then capture again
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Confirm the intercept fired before trusting the pending capture: a service worker or a different
|
|
51
|
+
transport can carry the request around the route. On the owned engine omowright's
|
|
52
|
+
`createRoutes(page)` does the same (the `browser` skill's `references/owned-engine/network.md`): a
|
|
53
|
+
handler that awaits your release promise before `continue`, or answers with
|
|
54
|
+
`fulfill({ status, body })` or `abort()`. For a packaged desktop app, or any client you cannot
|
|
55
|
+
intercept, point it at a fixture server whose handler waits for a release signal. A case you
|
|
56
|
+
cannot hold in this environment is UNVERIFIED, with that reason.
|
|
57
|
+
|
|
58
|
+
Wait for the event or the state, never for a fixed time. A longer sleep, a wider tolerance, or a
|
|
59
|
+
changed locator or expected value that turns a red check green hides the defect it found.
|
|
60
|
+
|
|
61
|
+
## Three kinds of evidence per case
|
|
62
|
+
|
|
63
|
+
One kind does not stand in for another.
|
|
64
|
+
|
|
65
|
+
1. **Text and state.** The title, count, selected value, button label and enabled state, typed
|
|
66
|
+
input, focus, and the absence of the previous state's notice.
|
|
67
|
+
2. **What the user can see.** The element inside the viewport and not covered. A locator's
|
|
68
|
+
"visible" is true for an element that is covered, transparent or scrolled out of view, so read
|
|
69
|
+
its box against the viewport and what is on top of it, or capture the region.
|
|
70
|
+
3. **What happened.** The requests sent (count and target) and the stored result. A success
|
|
71
|
+
notice is not a saved result: read the value back, or reload.
|
|
72
|
+
|
|
73
|
+
## Keep and clear
|
|
74
|
+
|
|
75
|
+
For each transition name what must stay and what must go, then read the values at three moments:
|
|
76
|
+
before the action, while the request is held, after it settles. Two matching end points can hide
|
|
77
|
+
a jump in between.
|
|
78
|
+
|
|
79
|
+
| Must stay | How to read it |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Selected item | the selected id or the `aria-selected` row |
|
|
82
|
+
| Typed input | the field's value |
|
|
83
|
+
| Focus | `document.activeElement` |
|
|
84
|
+
| Scroll position | `scrollTop` of the scroller |
|
|
85
|
+
| The region being worked in | `getBoundingClientRect()` of the toolbar, composer or row |
|
|
86
|
+
|
|
87
|
+
| Must go | Read it as |
|
|
88
|
+
|---|---|
|
|
89
|
+
| The previous spinner or "loading" text | absent, not merely hidden behind the new content |
|
|
90
|
+
| The previous error | absent after the retry succeeds |
|
|
91
|
+
| The previous success notice | absent once the next action starts |
|
|
92
|
+
| The previous form or dialog | closed, and not reopened by a late response |
|
|
93
|
+
|
|
94
|
+
A move the user asked for (opening a sidebar, expanding a row) is not a defect. Check that it
|
|
95
|
+
lands inside the designed layout and that it did not reset input or selection on the way.
|
|
96
|
+
|
|
97
|
+
## Switch: a late response and the wrong target
|
|
98
|
+
|
|
99
|
+
1. Start a request for item A and hold it.
|
|
100
|
+
2. Move to item B (another row, account, project, tab or session) and let B load.
|
|
101
|
+
3. Release A.
|
|
102
|
+
4. The screen still shows B's data, B's selection and no dialog or error that belongs to A.
|
|
103
|
+
|
|
104
|
+
Checking only that "the last response is on screen" misses this, because A is the last response.
|
|
105
|
+
A fake that answers in call order cannot show it either.
|
|
106
|
+
|
|
107
|
+
## Re-entry
|
|
108
|
+
|
|
109
|
+
After the action settles, come back the way a user would and capture each:
|
|
110
|
+
|
|
111
|
+
- reload the page, or quit and restart a desktop app
|
|
112
|
+
- close the item and open it again from its normal entry point
|
|
113
|
+
- back, then forward
|
|
114
|
+
- the deep link, opened cold
|
|
115
|
+
- a second window or device, when the product syncs
|
|
116
|
+
|
|
117
|
+
The same state, data and controls are there. Nothing saved is gone, nothing discarded is back, and
|
|
118
|
+
a control that was there before (Send, Reopen, the row menu) is there again.
|
|
119
|
+
|
|
120
|
+
## Twice, and leaving
|
|
121
|
+
|
|
122
|
+
- Press the action again while the first request is held: one request leaves, or the second is
|
|
123
|
+
refused with a reason on screen.
|
|
124
|
+
- After a refusal, press retry: a new request leaves. A retry that does nothing is a defect.
|
|
125
|
+
- Leave mid-request (navigate away, close the dialog, close the window): the write either
|
|
126
|
+
completed or is reported as not done on return. Nothing is lost without a message.
|
|
127
|
+
- Every pending indicator ends: success, failure, or a deadline message with a way out.
|
|
128
|
+
|
|
129
|
+
## The path a user takes
|
|
130
|
+
|
|
131
|
+
Reach each state by the controls a user has. A route typed into the address bar, an event
|
|
132
|
+
dispatched from script, a forced click, or an API call in place of the click proves a different
|
|
133
|
+
path, and the entry point you skipped is where the defect lives. When a bypass is needed for
|
|
134
|
+
diagnosis, record its result apart from the user path.
|
|
135
|
+
|
|
136
|
+
Name what the check ran on: the build (packaged app, dev server, fixture page) and the data
|
|
137
|
+
(seeded, mocked, real account). The client under test is the real build. A hold or a failure you
|
|
138
|
+
inject at the network boundary is the condition of the Held, Failed and Switch cases, not a mock:
|
|
139
|
+
that case is EXECUTED. What an injected answer cannot prove is success. A success path answered
|
|
140
|
+
by a stub, a mock or a fixture proves the stub: run it once against the real backend and data,
|
|
141
|
+
or leave it UNVERIFIED.
|
|
142
|
+
|
|
143
|
+
Before filing a product finding from a capture, confirm the capture shows what you meant: the
|
|
144
|
+
right build loaded, the theme repainted, the locator resolved the control and not its caption. A
|
|
145
|
+
finding read off a blank or wrong frame is an `[evidence]` defect and is withdrawn.
|
|
146
|
+
|
|
147
|
+
## A new check must be able to fail
|
|
148
|
+
|
|
149
|
+
When you add a behaviour test, put the fault back (revert the fix, or inject the defect in an
|
|
150
|
+
isolated copy) and watch the test fail for that reason. A timeout or an unrelated error is not a
|
|
151
|
+
detection. A test that passes with the fault present guards nothing: the usual causes are a fake
|
|
152
|
+
that drops the call it should record, a loop that skips the element it cannot reach, and a wait
|
|
153
|
+
that matches the previous render. Record the three runs: clean, faulted, restored.
|
|
154
|
+
|
|
155
|
+
An intermittent failure is a defect until it is explained. A pass on retry does not erase the
|
|
156
|
+
first failure: keep the first capture and the request log and report both runs.
|
|
157
|
+
|
|
158
|
+
## First-use walk (H19)
|
|
159
|
+
|
|
160
|
+
Walk the changed flow one step at a time as someone who has never seen it. At each step:
|
|
161
|
+
|
|
162
|
+
1. Can they tell what to do now?
|
|
163
|
+
2. Can they find where to do it?
|
|
164
|
+
3. Can they predict the result from the label?
|
|
165
|
+
4. After acting, can they tell whether it worked?
|
|
166
|
+
|
|
167
|
+
Write down the first control that looks like the right one before pressing it, then compare with
|
|
168
|
+
what happened. A control that looks actionable and does nothing (an empty menu, a dead row), a
|
|
169
|
+
result that only shows after expanding something, and a label that names the mechanism instead of
|
|
170
|
+
the outcome are findings. This is a review, not a user test: report what the screen shows and
|
|
171
|
+
what a person could not know from it, and do not report user reactions, rates or quotes nobody
|
|
172
|
+
observed.
|
|
173
|
+
|
|
174
|
+
## Report words
|
|
175
|
+
|
|
176
|
+
- **EXECUTED**: you ran it and saw it. **TRACED**: you read it in source. Only EXECUTED supports a
|
|
177
|
+
PASS for a rendered behaviour.
|
|
178
|
+
- **UNVERIFIED**: the condition could not be produced or observed. Give the reason (no way to hold
|
|
179
|
+
the request, packaged build unavailable, a second device needed, not run in the time budget)
|
|
180
|
+
and who can verify it.
|
|
181
|
+
- One cause, one finding: the same cause seen on three screens is one finding with three
|
|
182
|
+
locations.
|
|
183
|
+
- Keep what you saw apart from what you think causes it.
|
|
184
|
+
|
|
185
|
+
## Safety
|
|
186
|
+
|
|
187
|
+
Use data you created for the check. Do not send, publish, pay, delete or change permissions on
|
|
188
|
+
real accounts to produce a state: stop one step short and mark the last step UNVERIFIED. Release
|
|
189
|
+
every held request, and remove the test data, servers and tabs you created.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// omo-codex-install:
|
|
2
|
+
// omo-codex-install:ce0d400dac6e88454d7ec56c087298b04cb2c34cf12db77faa3d59a7352b6a2a:ca23a536dfdd39b89ec4c50bcaef1e9df05c65f110c55a5882b003dd90cdbd9c
|
|
3
3
|
var __esm = (fn, res, err) => () => {
|
|
4
4
|
if (fn)
|
|
5
5
|
try {
|
|
@@ -10206,7 +10206,7 @@ var package_default;
|
|
|
10206
10206
|
var init_package = __esm(() => {
|
|
10207
10207
|
package_default = {
|
|
10208
10208
|
name: "@oh-my-opencode/omo-codex",
|
|
10209
|
-
version: "5.1.
|
|
10209
|
+
version: "5.1.83",
|
|
10210
10210
|
type: "module",
|
|
10211
10211
|
private: true,
|
|
10212
10212
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -24,8 +24,10 @@ try {
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
`connectPipe` launches over `--remote-debugging-pipe`: no listening port, stdio drained, the
|
|
27
|
-
process reaped on `close()`. `connect("http://127.0.0.1:<port>")` attaches to
|
|
28
|
-
else launched
|
|
27
|
+
process reaped on `close()`. `connect("http://127.0.0.1:<port>")` attaches to the DevTools endpoint
|
|
28
|
+
of a browser something else launched; attaches to the same browser in one process share one
|
|
29
|
+
connection, and `close()` releases only your handle (the last release disconnects).
|
|
30
|
+
`connectCloakProfile({ profileDir })` launches CloakBrowser with a pinned
|
|
29
31
|
fingerprint seed — the stealth path for WAF and bot-scored targets, where the attached engine's
|
|
30
32
|
console capture would be a signal.
|
|
31
33
|
|
|
@@ -20,9 +20,15 @@ miss has another cause and you climb the ladder instead.
|
|
|
20
20
|
## Dialogs never block
|
|
21
21
|
|
|
22
22
|
`alert`, `confirm`, `prompt`, and `beforeunload` are answered at the protocol layer, before the
|
|
23
|
-
page sees them: by a `dialog` listener that answers, otherwise by the `dialogPolicy` passed
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
page sees them: by a `dialog` listener that answers, otherwise by the `dialogPolicy` passed when
|
|
24
|
+
the connection is made (`connectPipe`, `connect(url, { dialogPolicy })` or `connectNamed(name, {
|
|
25
|
+
dialogPolicy })`). Default to accepting (`{ accept: true }`; a policy function receives a plain
|
|
26
|
+
`{ type, message, defaultPrompt, url }` and returns `{ accept, promptText }`).
|
|
27
|
+
|
|
28
|
+
Pass the policy at connect time rather than calling `browser.setDialogPolicy` later. Attaches made
|
|
29
|
+
with `connect(url)` or `connectNamed` in one process share one connection per browser, and on a
|
|
30
|
+
connection with two or more holders `setDialogPolicy` throws `SharedConnectionError` (code
|
|
31
|
+
`shared_connection`). Passing `dialogPolicy` when attaching gives you a connection of your own.
|
|
26
32
|
|
|
27
33
|
`page.on("dialog", (dialog) => ...)` hands each listener a Playwright-style `Dialog` object, not a
|
|
28
34
|
plain object: read it through methods (`dialog.type()`, `dialog.message()`, `dialog.defaultValue()`,
|