LearnNewsExamplesConnect
Frontmatter
assigneesneo-fable-mnemosyne
createdAtSep 19, 2026, 5:19 PM
updatedAtSep 19, 2026, 5:47 PM
githubUrlhttps://github.com/neomjs/neo/issues/18978
authorneo-fable-mnemosyne
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 19, 2026, 5:47 PM

Unlocking a region's last locked column erases that column

neo-fable-mnemosyne
neo-fable-mnemosyne commented on Sep 19, 2026, 5:19 PM

Context

Promoted from @neo-opus-grace's defect-note of 2026-09-19 15:13Z, reproduced independently before filing: real Chromium (Playwright e2e rig), dev@4802862b73, fixture test/playwright/component/apps/grid-cell-editing, grid #grid-cell-editing, remote methods only (Neo.worker.App.setConfigs({id: <the note column>, locked: null})).

The Problem

note is that grid's only locked-end column.

header buttons note cells grid bodies
before Code · # · Name · Score · City · Note 6, in the end body 3
after locked: null Code · # · Name · Score · City 0 2

The column instance lives on (dataField: 'note', locked: null), no error is logged, and nothing brings the column back. Unlocking a column whose region keeps another locked column works: the region survives, and the button moves.

The Architectural Reality

  • src/grid/Container.mjs#onColumnLockChange re-adds the sorted columns; the collection's mutate runs #onColumnsMutate (:1185): refreshRegionColumns() → createOrUpdateSubGrids() → headerWrapper.applyColumnButtonOrder(...).
  • createOrUpdateSubGrids() calls src/grid/header/Wrapper.mjs#updateHeaders (:154), which destroys the toolbar of a region that holds no column any more (:204–207 for the end, :182–185 for the start). At that moment the column that just left the region still has its header button INSIDE that toolbar, so the button is destroyed with it.
  • #applyColumnButtonOrder (:84) runs afterwards and re-homes buttons through getButton(dataField) — which finds nothing for the moved column. With no button, toolbar.passSizeToBody() yields no columnPositions entry, and the gaining body renders no cell for it.
  • The start region has the same teardown and the same order, so its last column is exposed the same way.

The Fix

In header.Wrapper#updateHeaders: create or refresh the toolbars of the regions that hold columns first; when a region emptied at runtime, re-home the buttons (applyColumnButtonOrder) while every target toolbar exists; only then destroy the emptied toolbar. The buttons are moved, never rebuilt.

Arms on #grid-cell-editing-pooled (one locked-start column c0, one locked-end column c39), through two new actions of the fixture's gridDriver.mjs: after unlocking each, its header button and its cells are in the center region; locking it again brings the region back with the column in it. Red on dev.

Acceptance Criteria

  • Unlocking a grid's only locked-end column keeps its header button and its cells, in the center region; the same for the only locked-start column.
  • Locking the column again re-creates the region with the column in it.
  • The header button instance is moved, not rebuilt.
  • The arms are red on dev; grid e2e, component and unit tiers stay green.

Out of Scope

  • An edit open on the moving column while its region empties (the hold path has its own leaves under #18762).
  • The grid body teardown order in createOrUpdateSubGrids beyond what the header fix needs.

Related

#9486 (the multi-body epic) · #18762 · #18885 / #18942 (lock changes during an edit)

Live latest-open sweep: checked latest 20 open issues at 2026-09-19T15:18:58Z; no equivalent found. A2A claim sweep: latest 8 messages (all read-states) at 15:19Z; the defect-note is unowned, no claim on it. MC sweep: "unlocking the last locked column of a grid region removes the column header button and cells, header toolbar destroyed with the button inside", 4 results: the 2026-03 runtime-relock design (re-use the existing button instances) — consistent with this fix; no prior decision on an emptied region. Own-assignment sweep: 2 open (#15252, #18962), not overlapping.

Origin Session ID: 2c9503fc-beef-4d80-939b-7d616601cd97 Retrieval Hint: "unlock last locked column region empties header toolbar destroyed button updateHeaders applyColumnButtonOrder"

tobiu referenced in commit ef48deb - "fix(grid): unlocking a region's last locked column keeps its header and its cells (#18978) (#18979) on Sep 19, 2026, 5:47 PM
tobiu closed this issue on Sep 19, 2026, 5:47 PM