Skip to content

ui: form-field-tabs 'failed submit scrolls the off-screen tab into view' case fails intermittently in the merge queue #34782

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: a new test that failed in the merge queue on a PR that does not touch ui/**. Dedupe: form-field-tabs; no open card.

Suggested-grade: p2 · domain:ui · tooling. The test came in with PR #34695 (Fixes #34615, under the maintainer's ui theme #34571), so this card belongs with that theme's owner.

What happened

Merge-group run https://github.com/objectstack-ai/objectstack/actions/runs/44058185304 (job "Test UI (6/16)") failed only in ui/packages/components/src/renderers/form/__tests__/form-field-tabs.test.tsx, case "a failed submit that jumps to an off-screen tab scrolls it into view": expected [] to equal [261]. The PR in that group (#34565) changes only docs/adr/**. The test landed on main at e47c1cb2 (#34695) today; this is its first failure seen.

What is wanted

Find why the scroll call is sometimes not observed (an async scroll after the tab switch, layout not measured in the test DOM, or ordering against another case) and make the case deterministic at the root. ⛔ Not a skip, a retry wrapper or a weaker assertion.

Re-check

gh api repos/objectstack-ai/objectstack/actions/jobs/133955361680/logs | grep -c "scrolls it into view"

Activity

  1. added
    bug
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p2 · domain:ui · pm:queue · 2026-11-17T10:21Z

    ⛔ Not a claim.

  3. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs

    Claim: PM loop round 7 · 2026-11-17T14:25Z
    Session: session_01WGufzgwLiKcfujYUug7sPs
    Account: os-support-ai
    Branch: claude/issue-34782-form-tabs-scroll-test
    Worktree: objectstack-issue-34782
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/components/src/renderers/form/form.tsx (the field-tab strip scroll effect, ~:2742-2752) and/or ui/packages/components/src/renderers/form/__tests__/form-field-tabs.test.tsx (the "failed submit that jumps to an off-screen tab" case, :268), root .changeset/ if form.tsx changes; anything wider is reported to the seat before code
    Container & model: S, mode:subagent (area o3-B), model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: introduced by #34695 (Fixes #34615), e47c1cb2
    Thread-read: 6945265364
    Premise: code read on origin/main d947a93 (repro owed before code). The case awaits only data-state="active" on the Activity tab and then asserts writes synchronously. The strip scroll runs in a passive React.useEffect keyed on activeFieldTab (form.tsx ~:2743), and the submit path is async (validation then tab jump), so the commit that sets data-state can be observed by waitFor before the passive effect has flushed: writes reads []. Candidate root fixes, NOT yet measured: run the strip scroll in a layout effect (same commit as the attribute, so no observable gap), or have the test await the write it asserts with the exact value. ⛔ Not a skip, retry wrapper or weaker assertion (card text). If the measured cause is elsewhere (layout stubs, case ordering), the dev stops and reports.
    Serial constraints cleared: overlap-check probe of form.tsx + form-field-tabs.test.tsx vs origin/main d947a93cf8: clean exit 0, 0 open PR heads
    Pre-claim lane: domain:ui — ui/packages/components/src/renderers/form/**, routed to o3-B by seat 3 (theme #34571 owner per the card)
    Pre-claim deps: no Blocked-by:
    Prior rulings read: form-field-tabs,tab strip scroll,uselayouteffect,flaky test → 0 hits; none; thread: none; repo: objectstack-ai/objectstack

    Lease o3-B under seat 3 (seat post #34584).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs

    Delivered · 2026-11-17T16:09Z

    • PR fix(components): scroll the form tab strip in the commit that activates the tab #34892 merged (merge commit 0584eb50d5665debf7676ea3803b22268937772f); the card closed by Fixes. L1 ACCEPT 6952747100, landing 6952771037. Clause-② no, so no L2 was owed.
    • Delivered: the root cause of the merge-queue failure in form-field-tabs.test.tsx ("a failed submit that jumps to an off-screen tab scrolls it into view").
      • What was wrong: a failed submit activates the off-screen tab from react-hook-form's async validation callback, but the strip-scroll ran in a passive useEffect, one task after the commit. On a loaded runner, RTL's waitFor and its setTimeout(0) could resolve before that effect ran, so the assertion read [].
      • The fix: the effect is now useLayoutEffect in form.tsx with its body unchanged, so the scroll lands in the same commit as the active attribute.
      • The test: it adds a MutationObserver snapshot at the activating commit and keeps the exact [620 - 359] assertion. No skip, no retry, no timeout change.
      • Readings: with a 1 ms stall, 50/50 red before the fix and 0/50 after; with no stall, 0/200. Ablation back to useEffect is 5/5 red.
      • User-visible effect: for a failed-submit jump, the active tab is no longer painted off-screen for one task.
    • Left to others: none.
    • State: pm:dispatched removed (card closed).
  7. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:uifindingpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions