LearnNewsExamplesServices
Frontmatter
id19359
titlegrid.Body's scrollEdge carries the store's total; a hidden-only append does not re-arm it
stateClosed
labels
bugaigrid
assigneesneo-opus-vega
createdAtOct 2, 2026, 11:37 AM
updatedAtOct 2, 2026, 1:38 PM
githubUrlhttps://github.com/neomjs/neo/issues/19359
authorneo-opus-vega
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 2, 2026, 1:32 PM

grid.Body's scrollEdge carries the store's total; a hidden-only append does not re-arm it

neo-opus-vega
neo-opus-vega commented on Oct 2, 2026, 11:37 AM

Context

#19356 / PR #19357 (merged 2026-10-02) gave Neo.grid.Body the scrollEdge event: once per entry into the store's last bufferRowRange rows, re-armed by a change of the store's count. Its first consumer, the Fleet Manager's operator mailbox (neomjs/neo-agent-institution#416 / PR #420), hides collapsed thread members with a store filter, and Sophie's review of that PR asked what happens when fifty replies land under one collapsed head: the store's total moves, its visible count does not, and the edge does not announce again.

The Problem

Not the latch: the event. The visible count is the right key for both the predicate and the re-arm — nothing the viewport can reach moved, so a hidden-only append is correctly quiet, and continuation into hidden rows is the consumer's deliberate act (expanding the thread), after which the visible change re-arms as usual. What the consumer lacked was the store's total beside the count, to tell "the corpus is complete" from "the rest is behind a filter", and the contract never said that a hidden-only append stays quiet by design.

History, kept as history: a visible/total re-arm key was tried in the consumer's interim body and withdrawn on the same day — it re-announced on every hidden-only append and walked a collapsed inbox window by window with no gesture, the boot drain under another projection (Sophie, Institution #420, R1 → final).

The Architectural Reality

  • src/grid/Body.mjs updateMountedAndVisibleRows: countRecords = store.count; #scrollEdgeAnnouncedFor holds the count the edge was announced for; the predicate endIndex + bufferRowRange >= countRecords.
  • Neo.data.Store exposes the unfiltered items as allItems (store.allItems.getCount()), the filtered ones as items / count.
  • test/playwright/unit/grid/BodyScrollEdge.spec.mjs pins enter / stay / grow / shrink / short / empty over an unfiltered store; no filtered store was in the file before this leaf.

The Fix

The latch stays keyed on the visible count; the event gains total (store.allItems.getCount() behind a filter, the count otherwise) beside count as information; the @event block and the grid guide say why a hidden-only append does not announce again. One new arm: a one-row filtered store; append ten hidden items and re-filter; two layouts stay quiet; drop the filter and scroll: the visible change announces with the total.

Contract Ledger

Target surface Source of authority Behavior Fallback Docs Evidence
scrollEdge on Neo.grid.Body src/grid/Body.mjs {count, endIndex, startIndex, total} once per entry; re-armed only when the visible count changes; a hidden-only append stays quiet. unchanged the @event block, learn/guides/datahandling/Grids.md BodyScrollEdge.spec.mjs: the existing six arms + the hidden-append arm

Acceptance Criteria

  • The event carries total beside count (red-first: the committed payload has no total).
  • Appending items a store filter hides while the viewport stays at the edge announces nothing on further layouts; dropping the filter and scrolling announces again with the total beside the count.
  • The existing enter / stay / grow / shrink / short / empty arms stay green.
  • The event doc and the guide name the total and the hidden-append rule.

Delivered by PR #19360 (merged 2026-10-02, f933877).

Out of Scope

  • The predicate itself (the visible count stays the measure of the viewport's reach).
  • The Institution consumers (neomjs/neo-agent-institution#429 retires the interim subclass once a pin carries this; the retirement landed with neomjs/neo-agent-institution#433).

Related

#19356 / PR #19357 (the event) · neomjs/neo-agent-institution#416 / PR #420 (the finding, Sophie's R1 on 2026-10-02) · neomjs/neo-agent-institution#429 / #433

Live latest-open sweep: gh search issues --repo neomjs/neo "scrollEdge" at 09:38Z returns only the closed #19356; the A2A inbox's last 12 messages at 09:35Z carry no claim on this scope.

Origin Session ID: 60d9be31-4233-40fd-9b07-6ee6a9ebf6cf Retrieval Hint: "scrollEdge latch total filtered count collapsed append re-arm grid Body"

tobiu referenced in commit f933877 - "fix(grid): scrollEdge carries the store's total and stays quiet on an append a filter hides entirely (#19359) (#19360) on Oct 2, 2026, 1:32 PM
tobiu closed this issue on Oct 2, 2026, 1:32 PM