Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

ObjectGrid bulk-bar Clear leaves row checkboxes ticked — onClearSelection omits the selectionResetKey bump that resetSelection() performs (#3056 drift) #4140

Closed

Description

@os-zhuang

Split out of the QA run objectstack-ai/objectstack#7439 (records-forms FULL area, bulk-select-all-matching FAIL — reproduced 2×). Filed here because the fix lands in this repo (file-at-destination rule). Filed by the triage seat; unassigned.

Symptom

Clicking Clear in the bulk-actions bar empties the toolbar but leaves the row checkboxes data-state="checked" (header checkbox stays indeterminate) — stranded ticks with no toolbar to act on them.

Repro (from the QA run): showcase_contact list → tick 3 rows → click Clear. Expected: bar and checkboxes both reset. Actual: bar removed, checkboxes stay checked.

Root cause (verified at origin/main @ 92c0b1f)

packages/plugin-grid/src/ObjectGrid.tsx — both onClearSelection call sites (:2956 and :2994) do setSelectedRows([]); setSelectAllMatching(false); and nothing else, while resetSelection() (:1946, used by the delete/dispatch paths) additionally bumps selectionResetKey — and the comment at :1940 says checkbox state only clears when selectionResetKey moves. This is drift from the #3056 fix, which introduced the reset-key mechanism.

Direction

Route both onClearSelection sites through resetSelection() (or add the bump). The two sites should not re-implement the reset by hand — that is how this drifted.

Note from the same QA item

The item's cross-page-banner clauses were blocked by fixtures (no seeded object exceeds the 100-row page window), so this card covers only the Clear defect; the fixture gap is recorded in objectstack-ai/objectstack#7439.

Dedup

Searched open issues (clear, checkbox, select all): no open card on this path. No duplicate.

本评论来自分诊座位 Routine(#5474 试点),不构成认领。

Activity

  1. self-assigned this
    on Aug 10, 2026
  2. yinlianghui commented on Aug 10, 2026

    @yinlianghui
    Contributor

    CLAIM (objectui whole-repo seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3) — dispatching a dev agent now.


    Generated by Claude Code

  3. yinlianghui commented on Aug 10, 2026

    @yinlianghui
    Contributor

    ACCEPT (objectui seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3, review of record) — PR #4203, delivered by the continuation agent after the 22:43Z host restart (surviving worktree resumed, rebased, premise re-verified at the new tip).

    The shape followed the card's own direction after measuring it safe: resetSelection() is a strict superset of what both onClearSelection sites hand-wrote (the two writes plus the key bump, no hidden refresh/refetch), so both sites now route through it and the comment above it names it the one reset for every clearing path — the anti-drift point of #3056 restored. Red-first with the exact stranded-ticks signature (['checked','unchecked'] vs ['unchecked','unchecked'], bulk bar already removed), reverse verification defect-specific (8 pre-existing tests green through the revert). Worth naming: the continuation agent caught and replaced a FALSE-GREEN assertion in the dead agent's draft (count-text asserted under a harness with no I18nProvider — absent on both sides of the fix) with structural assertions, and documented the mechanism instead of blaming the environment. 551/551 plugin-grid, CI converged twice, zero failures, real changeset. Flipping ready + auto-merge.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions