LearnNewsExamplesServices
Frontmatter
titlefix(selection): support collection item ids (#5598)
authorneo-gpt
stateMerged
createdAtJun 23, 2026, 6:59 AM
updatedAtJun 24, 2026, 7:19 PM
closedAtJun 24, 2026, 7:18 PM
mergedAtJun 24, 2026, 7:18 PM
branchesdevcodex/5598-selection-model-collection
urlhttps://github.com/neomjs/neo/pull/13908
contentTrust
projected
quarantined0
signals[]
Merged
neo-gpt
neo-gpt commented on Jun 23, 2026, 6:59 AM

Resolves #5598

Neo.selection.Model now normalizes incoming selection inputs through helper methods so collection-backed list items without the synthetic isRecord flag resolve to the view-owned item id for both select() and deselect(). TimeField no longer stamps that workaround onto its collection rows, and the regression coverage exercises the raw collection-item path directly.

Evidence: L2 unit/static coverage satisfies the close-target behavior; L3 full-suite evidence was attempted and is blocked by unrelated AI/Memory-Core environment failures in this checkout. Residual: none for #5598.

Deltas from ticket

  • Removed the form.field.Time isRecord workaround after fixing the shared selection conversion path.
  • Kept grid/table selection ownership work out of scope; this PR only changes the base incoming selection-id conversion used by collection/list-style inputs.

Test Evidence

  • npm run agent-preflight -- src/selection/Model.mjs src/form/field/Time.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs passed.
  • git diff --cached --check passed before commit.
  • npm run test-unit -- test/playwright/unit/selection/GalleryInternalId.spec.mjs test/playwright/unit/form/field/TimeFieldInternalId.spec.mjs passed: 4 passed.
  • npm run test-unit -- test/playwright/unit/selection passed before the TimeField workaround removal: 3 passed.
  • npm run test-unit -- test/playwright/unit/data/TreeStoreValueBanding.spec.mjs passed: 3 passed, after isolating one unrelated full-suite failure.
  • npm run test-unit was attempted: 4752 passed, 5 skipped, 28 failed; the failures were outside this selection/TimeField surface and included missing GEMINI_API_KEY, Memory-Core/KB timeouts, and AI service environment failures.

Post-Merge Validation

  • Smoke-test form.field.Time picker list selection in a real app runtime.

Commit

  • f2e6d5e394fix(selection): support collection item ids (#5598)

Authored by Euclid (GPT-5, Codex Desktop). Session db5b2ecf-db91-4b7d-9498-ccef00426a1c.

Review Response — block formatting

[ADDRESSED] Restored the declaration block alignment called out in src/form/field/Time.mjs, including onListItemClick() and selectCurrentListItem().

[ADDRESSED] Corrected the remaining declaration-block drift in src/selection/Model.mjs and fixed check-block-alignment.mjs so destructuring continuations participate in keyword-head comma-block alignment instead of being skipped mid-block.

Commit: 869cbf75c1.

Validation:

  • node buildScripts/util/check-block-alignment.mjs src/form/field/Time.mjs src/selection/Model.mjs test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs — passed
  • git diff --check — passed
  • node --check buildScripts/util/check-block-alignment.mjs — passed
  • node --check src/selection/Model.mjs — passed
  • npm run test-unit -- test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs — 26 passed
  • npm run test-unit -- test/playwright/unit/form/field/TimeFieldInternalId.spec.mjs — 1 passed
  • npm run agent-preflight -- --no-fix buildScripts/util/check-block-alignment.mjs src/form/field/Time.mjs src/selection/Model.mjs test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs — passed

CI is queued on the pushed head; re-review should wait for those checks to finish.


@neo-gpt commented on 2026-06-24T17:08:24Z

Review Response — block-formatting linter hole

[ADDRESSED] The remaining src/selection/Model.mjs regression was the toJSON() lone-keyword declaration block: me = this had been collapsed to me = this before a block-opening items = ... { sibling.

[ADDRESSED] The linter was also wrong: it explicitly excluded block-opening values from legacy lone-keyword declaration blocks, so it could not catch this exact drift. Commit e909b4b382 removes that exclusion and pins the regression in check-block-alignment.spec.mjs.

Validation:

  • node --check buildScripts/util/check-block-alignment.mjs — passed
  • node --check src/selection/Model.mjs — passed
  • node buildScripts/util/check-block-alignment.mjs src/form/field/Time.mjs src/selection/Model.mjs test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs — passed
  • git diff --check and git diff --cached --check — passed
  • npm run test-unit -- test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs test/playwright/unit/form/field/TimeFieldInternalId.spec.mjs — 27 passed
  • npm run agent-preflight -- --no-fix buildScripts/util/check-block-alignment.mjs src/form/field/Time.mjs src/selection/Model.mjs test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs — passed

CI is queued on the pushed head e909b4b3828e642fe113f2f768f6bf8de44c6d8b.


tobiu
tobiu CHANGES_REQUESTED reviewed on Jun 23, 2026, 9:57 AM
neo-gpt
neo-gpt commented on Jun 23, 2026, 7:59 PM

Author update for the block-formatting review:

  • Pushed rebased head b8c57795d92b5b63c63fbeb3fc4bd44740e074fd.
  • Addressed the requested block-formatting issue by wrapping the long collection-id fallback ternary in src/selection/Model.mjs.
  • No behavior change: this is formatting-only on top of the existing selection collection-id fix.

Validation on the rebased head:

  • npm run test-unit -- test/playwright/unit/selection/GalleryInternalId.spec.mjs test/playwright/unit/form/field/TimeFieldInternalId.spec.mjs -> 4 passed.
  • npm run agent-preflight -- src/selection/Model.mjs src/form/field/Time.mjs test/playwright/unit/selection/GalleryInternalId.spec.mjs -> passed.
  • git diff --check -> passed.

CI is running on the pushed head.


tobiu
tobiu CHANGES_REQUESTED reviewed on Jun 23, 2026, 9:25 PM
neo-gpt
neo-gpt commented on Jun 24, 2026, 12:33 PM

Addressed the requested declaration-alignment cleanup on head 9fbdd3712c19abf2ebde4fcbe18452b4b9e24d91.

Change is formatting-only in src/selection/Model.mjs; no selection behavior changed.

Validation:

  • node --check src/selection/Model.mjs -> passed
  • npm run test-unit -- test/playwright/unit/selection/GalleryInternalId.spec.mjs test/playwright/unit/form/field/TimeFieldInternalId.spec.mjs -> 4 passed
  • npm run agent-preflight -- --no-fix src/selection/Model.mjs -> passed
  • git diff --check -> passed

CI is running on the pushed head.


tobiu
tobiu CHANGES_REQUESTED reviewed on Jun 24, 2026, 2:41 PM

our linter might not be sufficient. it is not block-formatted. the = needs to stay at the exact same char count for blocks.

    -let me       = this, // this was correct
    +let me = this,
        {record} = data,
        oldValue = me.value,
        {value}  = record;
-let me     = this, // this was correct
+let me = this,
    {list} = me,
    id     = list.getItemId(me.value);

=> there is more


neo-gpt
neo-gpt commented on Jun 24, 2026, 6:39 PM
tobiu
tobiu APPROVED reviewed on Jun 24, 2026, 7:18 PM

No review body provided.