Skip to content

test(console): pin the kept form's refocus, the refusal's description and the note's resize reset - #2952

Merged
freeqaz merged 2 commits into
mainfrom
fix-1019d-ns
Oct 19, 2026
Merged

freeqaz merged 2 commits into
mainfrom
fix-1019d-ns

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Bughunt finding 2039: a mutation run on apps/controller/src/console/agents/create.mjs (after #2944) left four mutants alive in console-namespace-recheck and console-namespace-not-ready:

  1. context.onResume no longer calls onRefocus(recheckNamespace). On a kept form whose pending tick ran while it was away, a hidden tab then never restarts the 10 s poll when it is shown again. The hidden-tab case and the kept-form case were only pinned separately.
  2. Create Agent loses aria-describedby (the status line) for a missing, failed, deleting or adopted-provisioning Namespace. No case read it on a draft plan, where provisioningWaitsForNamespace() no longer covers it.
  3. The resize listener that clears the note's reserved min-height is removed.
  4. The submit handler's Namespace guard is removed.

On main, mutant 1 is not a live bug: onResume does re-register the recheck. It was just unpinned.

Change

Test-only, in tests/browser/console-namespace-recheck.test.mjs:

  • Kept form: after the return, the case runs one poll, then hides the tab, lets three ticks pass with no read, and shows the tab again. It now expects a read and the ready plan.
  • Refusing Namespaces: the failed, deleting, missing and adopted-provisioning cases assert aria-describedby="create-agent-capability-status" on the Embedded draft plan.
  • Resize: the in-place note case asserts the reserved min-height is set. It then adds its own resize listener (the product listener, added earlier, runs first), resizes to 390 px, waits for the event, and expects the min-height gone.

Mutant 4 is left alive on purpose: it is equivalent. The button is disabled in every state the guard covers, so neither a click nor implicit submission (Enter) reaches the handler.

Verification

  • console-namespace-recheck.test.mjs: 14/14; 20/20 pinned to 2 CPUs (taskset -c 2,3).

  • console-namespace-not-ready.test.mjs: 11/11, untouched.

  • Mutants against the changed file:

    mutant before after
    resume_no_refocus survives fails: kept-form case, no read after the tab is shown (waitForResponse timeout)
    describedby_no_refuses survives fails: failed, deleting, adopted-provisioning and missing cases
    no_resize_reset survives fails: in-place note case
    submit_guard_no_refuses survives survives (both files 25/25): equivalent, see above
  • prettier --check and eslint --max-warnings 0 on the touched file: clean.

  • No open PR touches this test file, so it adds no new conflicts. No product code changes, so no UI media.

  • Internal review: approve. Its nits are applied: the resize listener is registered before the viewport changes, and this table is corrected.

Risks

Low; test-only. The kept-form case now takes about 30 more simulated seconds on the page clock, but no wall-clock time.

… and the note's resize reset

Three create.mjs mutants survived the Namespace recheck files (finding 2039):

- a return to a kept form that no longer registers its refocus recheck:
  after a hidden tab is shown again, the poll never restarts. The kept-form
  case now hides the tab, lets ticks pass, shows it again and expects a read.
- Create Agent losing aria-describedby for a refusing Namespace: the failed,
  deleting, missing and adopted-provisioning cases now read it on the
  Embedded draft plan too, where nothing else waits.
- the resize listener that clears the reserved note height: the in-place
  note case now resizes to 390 px and expects the min-height gone.

The fourth survivor, the submit handler's Namespace guard, is equivalent
while the button is disabled (no click, no implicit submission), so it is
left as is.
@freeqaz
freeqaz requested a review from a team as a code owner October 19, 2026 17:25
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

Review nit: the listener was added by an unawaited evaluate racing the
viewport change, so a resize that fired first would stall the case.
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR extends browser tests for retained-form refocus, accessible Namespace refusal descriptions, and note-height reset after resizing.

Example: Return to the retained Create Agent form, hide the tab for three 10-second ticks, then show it after the Namespace becomes ready.

  • Before: Separate tests covered retention and hidden-tab recovery, leaving their interaction unprotected.
  • After: The combined test requires a Namespace read, an enabled Create Agent button, and the preserved name Probe Agent.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, credible coverage with passing browser CI; evidence consists of a controlled browser harness and reported mutation checks.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored, test-only PR changes no shipped behavior; browser CI and reported mutation checks support the coverage additions, while historical screenshots provide implementation context only.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Future regressions could strand a retained form's readiness check, remove accessible refusal explanations, or leave unnecessary note space after resizing.
Reason: The maintainer-authored change protects existing intended behavior with narrow additions and no product-direction change.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR adds focused coverage for three distinct regressions in existing console behavior. No actionable defect was found, and the reviewed head passes Console Browser and CI Required.

Priority: P3
Reviewed head: 8a02d04986955299e580e34304ae7ebe4d4fb3aa

Before merge

None.

Findings

None.

Agent review details

How this fits together

The console's Create Agent form reads Namespace status and uses it to update creation availability, accessible explanations, and the status note without discarding the draft.

flowchart LR
  A[Create Agent form] --> B[Namespace recheck]
  B --> C[Namespace API]
  C --> D[Creation gate and status note]
  D --> A
  E[Browser regression tests] --> A
Loading

Technical review

Best possible solution:

Retain these focused extensions to the existing browser scenarios.

Do we have a high-confidence way to reproduce the issue?

This test-only PR reports coverage gaps rather than a live bug; source inspection confirms the protected behavior exists, and the body records targeted mutation failures.

Is this the best way to solve the issue?

Extending existing browser cases is proportional: each addition protects a distinct failure without introducing new fixtures, hooks, or production behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fcc969fd9a55.

Provenance checked

  • Namespace recheck browser scenarios keeps the original intent (7b972ca: Protect failed-read recovery, terminal Namespace refusals, stable note placement, and polling lifecycle behavior.)
  • Retained-form refocus behavior keeps the original intent (40676a7: Recheck Namespace readiness on refocus and retained-form resume while preserving the draft.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit 7b972ca adds apps/controller/src/console/agents/create.mjs:1892 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7b972caeda55; files: apps/controller/src/console/agents/create.mjs)

Review metrics

Metric Value Why it matters
Change scope Production +0/-0; tests +29/-2 The small increase extends existing scenarios without adding production seams or parallel scaffolding.

Labels

Label changes:

  • add P3: This is regression-coverage maintenance for behavior already present on main, with no current product failure established.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is regression-coverage maintenance for behavior already present on main, with no current product failure established.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 1:45 PM ET / 17:45 UTC.

@freeqaz
freeqaz merged commit 7144ace into main Oct 19, 2026
59 of 60 checks passed
@freeqaz
freeqaz deleted the fix-1019d-ns branch October 19, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant