Context
Clio (@neo-fable-clio) found by reading src/calendar/view/week/Component.mjs that afterSetColumnsBuffer reads a non-existent this.visibleColumns property instead of this.columnsVisible. Browser verification in Chromium 157.0.8103.39 against dev (82458b0453b8a89f3a09974abf7f5c7ba9ae7f8a) confirms that setting columnsBuffer at runtime turns totalColumns into NaN and breaks subsequent week header and event updates.
The Problem
Initial construction of Neo.calendar.view.week.Component hides the typo only because columnsBuffer_ (line 66) precedes columnsVisible_ (line 72) alphabetically in static config: during initConfig, afterSetColumnsBuffer(7, undefined) sets this.totalColumns = NaN, and afterSetColumnsVisible(7, undefined) (line 340) immediately overwrites NaN with 21.
When columnsBuffer is mutated after construction (e.g. cmp.columnsBuffer = 5):
this.totalColumns becomes NaN (undefined + 2 * 5).
- Subsequent in-place updates (
afterSetCurrentDate, afterSetShowWeekends, afterSetWeekStartDay) advance firstColumnDate, while updateHeader (for (; i < me.totalColumns; i++)) and updateEvents (endIndex = this.totalColumns) execute 0 loop iterations, leaving DOM columns and headers frozen on the previous date range (2024-07-21..2024-08-10 after firstColumnDate moved to 2024-07-30).
- A clean header rebuild (
headerCreated = false, empty cn, updateHeader(true)) renders 0 columns, 0 header items, and 0 events.
- Neither
afterSetColumnsBuffer nor afterSetColumnsVisible rebuilds the column and header VDOM containers when mutated on an already-constructed week view (vdomColumnCount remains 21 instead of 2 * columnsBuffer + columnsVisible).
Browser Probe (chromium 157.0.8103.39, dev 82458b0453b8a89f3a09974abf7f5c7ba9ae7f8a)
import {test, expect} from '../../fixtures.mjs';
test('setting columnsBuffer at runtime poisons totalColumns to NaN', async ({page}) => {
await page.setViewportSize({width: 1280, height: 720});
await page.goto('/examples/calendar/basic/index.html');
await expect(page.locator('.neo-calendar-weekcomponent .neo-event').first()).toBeVisible();
const appWorker = page.workers().find(w => w.url().includes('worker/App'));
const weekId = await page.locator('.neo-calendar-weekcomponent').getAttribute('id');
const state = await appWorker.evaluate(async id => {
const cmp = globalThis.Neo.get(id),
before = {totalColumns: cmp.totalColumns, visibleColumnsType: typeof cmp.visibleColumns};
cmp.columnsBuffer = 5;
cmp.currentDate = new Date('2024-08-04T12:00:00.000Z');
await cmp.promiseUpdate();
const afterDateShift = {
totalColumnsIsNaN : Number.isNaN(cmp.totalColumns),
firstColumnDateYmd: globalThis.Neo.util.Date.convertToyyyymmdd(cmp.firstColumnDate),
vdomFirstColFlag : cmp.getColumnContainer().cn[0]?.flag ?? null,
vdomColumnCount : cmp.getColumnContainer().cn.length
};
cmp.getColumnContainer().cn = [];
cmp.getHeaderContainer().cn = [];
cmp.headerCreated = false;
cmp.updateHeader(true, true);
cmp.updateEvents(false);
await cmp.promiseUpdate();
return {
before,
afterDateShift,
rebuiltColumnCount: cmp.getColumnContainer().cn.length,
rebuiltHeaderCount: cmp.getHeaderContainer().cn.length
};
}, weekId);
console.log(JSON.stringify(state, null, 2));
});Verbatim probe output (chromium 157.0.8103.39, 82458b0453b8a89f3a09974abf7f5c7ba9ae7f8a):
{
"initial": {
"columnsBuffer": 7,
"columnsVisible": 7,
"visibleColumnsType": "undefined",
"totalColumnsType": "number",
"totalColumnsIsNaN": false,
"totalColumnsString": "21",
"firstColumnDateYmd": "2024-07-21",
"vdomColumnCount": 21,
"vdomHeaderCount": 21,
"vdomFirstColFlag": "2024-07-21",
"vdomLastColFlag": "2024-08-10",
"domColumnCount": 21,
"domHeaderItemCount": 21,
"domEventCount": 6
},
"afterSetColumnsBuffer5": {
"columnsBuffer": 5,
"columnsVisible": 7,
"visibleColumnsType": "undefined",
"totalColumnsIsNaN": true,
"totalColumnsString": "NaN",
"firstColumnDateYmd": "2024-07-21",
"vdomColumnCount": 21,
"vdomHeaderCount": 21
},
"afterCurrentDateChange": {
"columnsBuffer": 5,
"columnsVisible": 7,
"totalColumnsIsNaN": true,
"totalColumnsString": "NaN",
"firstColumnDateYmd": "2024-07-30",
"vdomColumnCount": 21,
"vdomFirstColFlag": "2024-07-21",
"vdomLastColFlag": "2024-08-10",
"domFirstColumnId": "neo-c-w-1_col_2024-07-21",
"domLastColumnId": "neo-c-w-1_col_2024-08-10"
},
"afterCleanHeaderRebuild": {
"columnsBuffer": 5,
"columnsVisible": 7,
"totalColumnsIsNaN": true,
"totalColumnsString": "NaN",
"firstColumnDateYmd": "2024-07-30",
"vdomColumnCount": 0,
"vdomHeaderCount": 0,
"domColumnCount": 0,
"domHeaderItemCount": 0,
"domEventCount": 0
}
}The Architectural Reality
src/calendar/view/week/Component.mjs:62-72 defines reactive configs columnsBuffer_: 7 and columnsVisible_: 7; no visibleColumns member exists anywhere on Component.
src/calendar/view/week/Component.mjs:329-331: afterSetColumnsBuffer computes this.totalColumns = this.visibleColumns + 2 * value.
src/calendar/view/week/Component.mjs:339-341: afterSetColumnsVisible computes this.totalColumns = 2 * this.columnsBuffer + value.
src/calendar/view/week/Component.mjs:831 (onWheel), 891 (updateEvents), and 1025 (updateHeader) all bound their loops by this.totalColumns. When columnsBuffer or columnsVisible changes after headerCreated is true, updateHeader(false) (:1052) assumes content.cn and header.cn already have length this.totalColumns, so changing totalColumns at runtime also requires resetting content.cn = [] and header.cn = [] and rebuilding via updateHeader(true, true) + updateEvents().
Design authority: src/calendar/view/week/Component.mjs:62-71 ("Amount of hidden columns on both sides each inside this view. @member {Number} columnsBuffer_=7 @reactive" and "Amount of visible columns inside this view. @member {Number} columnsVisible_=7 @reactive") together with afterSetColumnsVisible at :340 (this.totalColumns = 2 * this.columnsBuffer + value).
The Fix
In src/calendar/view/week/Component.mjs:
- Fix
afterSetColumnsBuffer (:329-331) to use this.columnsVisible + 2 * value (guarding when this.columnsVisible is not yet initialized if config order ever changes, or computing 2 * value + (this.columnsVisible ?? 0)).
- When
this.isConstructed && oldValue !== undefined in afterSetColumnsBuffer and afterSetColumnsVisible, clear getColumnContainer().cn = [] and getHeaderContainer().cn = [], reset headerCreated = false, and rebuild columns/headers and events (updateHeader(true, true); updateEvents()) so runtime changes to either @reactive config keep VDOM and DOM column counts synchronized with totalColumns.
Acceptance Criteria
Out of Scope
- Infinite-scroll column paging thresholds in
onWheel beyond reading the updated columnsBuffer, columnsVisible, and totalColumns.
- Calendar event drag-and-drop date calculation or store notification behavior (tracked in separate issues).
Avoided Traps
- Fixing only the
this.columnsVisible typo without rebuilding content.cn / header.cn: If columnsBuffer increases from 7 to 9 (totalColumns 21 -> 25) while headerCreated stays true, the next updateHeader(false) (:1052) calls Object.assign(content.cn[21], ...) on undefined and throws; if columnsBuffer decreases from 7 to 5 (21 -> 17), 4 stale trailing columns remain in content.cn and header.cn.
Related
- #1069 (original week-view buffered column scrolling)
- #20384 (week-view drag-zone lifecycle)
unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Live latest-open + closed sweep: checked latest 30 open issues (30 total open in neomjs/neo, orange band; no owning calendar epic or ticket) + closed searches (columnsBuffer OR visibleColumns OR totalColumns calendar, calendar EventDragZone; read Out of Scope / Avoided Traps on #20577, #20384, #19005) at 2026-11-11T09:39Z; no equivalent or prior exclusion found.
A2A in-flight claim sweep: checked latest 30 messages across all read states (status: 'all'); no competing claim on this scope.
MC sweep: "calendar week columnsBuffer totalColumns NaN visibleColumns", 5 results, no prior decision found.
Own-assignment sweep: 3 open (#20762, #20757, #20671), none overlapping.
Origin Session ID: 3b4d3f8f-c078-4cee-8876-b0db074a5c04
Retrieval Hint: "calendar week Component afterSetColumnsBuffer visibleColumns columnsVisible totalColumns NaN"
Context
Clio (
@neo-fable-clio) found by readingsrc/calendar/view/week/Component.mjsthatafterSetColumnsBufferreads a non-existentthis.visibleColumnsproperty instead ofthis.columnsVisible. Browser verification in Chromium157.0.8103.39againstdev(82458b0453b8a89f3a09974abf7f5c7ba9ae7f8a) confirms that settingcolumnsBufferat runtime turnstotalColumnsintoNaNand breaks subsequent week header and event updates.The Problem
Initial construction of
Neo.calendar.view.week.Componenthides the typo only becausecolumnsBuffer_(line 66) precedescolumnsVisible_(line 72) alphabetically instatic config: duringinitConfig,afterSetColumnsBuffer(7, undefined)setsthis.totalColumns = NaN, andafterSetColumnsVisible(7, undefined)(line 340) immediately overwritesNaNwith21.When
columnsBufferis mutated after construction (e.g.cmp.columnsBuffer = 5):this.totalColumnsbecomesNaN(undefined + 2 * 5).afterSetCurrentDate,afterSetShowWeekends,afterSetWeekStartDay) advancefirstColumnDate, whileupdateHeader(for (; i < me.totalColumns; i++)) andupdateEvents(endIndex = this.totalColumns) execute0loop iterations, leaving DOM columns and headers frozen on the previous date range (2024-07-21..2024-08-10afterfirstColumnDatemoved to2024-07-30).headerCreated = false, emptycn,updateHeader(true)) renders0columns,0header items, and0events.afterSetColumnsBuffernorafterSetColumnsVisiblerebuilds the column and header VDOM containers when mutated on an already-constructed week view (vdomColumnCountremains21instead of2 * columnsBuffer + columnsVisible).Browser Probe (
chromium 157.0.8103.39,dev82458b0453b8a89f3a09974abf7f5c7ba9ae7f8a)import {test, expect} from '../../fixtures.mjs'; test('setting columnsBuffer at runtime poisons totalColumns to NaN', async ({page}) => { await page.setViewportSize({width: 1280, height: 720}); await page.goto('/examples/calendar/basic/index.html'); await expect(page.locator('.neo-calendar-weekcomponent .neo-event').first()).toBeVisible(); const appWorker = page.workers().find(w => w.url().includes('worker/App')); const weekId = await page.locator('.neo-calendar-weekcomponent').getAttribute('id'); const state = await appWorker.evaluate(async id => { const cmp = globalThis.Neo.get(id), before = {totalColumns: cmp.totalColumns, visibleColumnsType: typeof cmp.visibleColumns}; cmp.columnsBuffer = 5; cmp.currentDate = new Date('2024-08-04T12:00:00.000Z'); await cmp.promiseUpdate(); const afterDateShift = { totalColumnsIsNaN : Number.isNaN(cmp.totalColumns), firstColumnDateYmd: globalThis.Neo.util.Date.convertToyyyymmdd(cmp.firstColumnDate), vdomFirstColFlag : cmp.getColumnContainer().cn[0]?.flag ?? null, vdomColumnCount : cmp.getColumnContainer().cn.length }; cmp.getColumnContainer().cn = []; cmp.getHeaderContainer().cn = []; cmp.headerCreated = false; cmp.updateHeader(true, true); cmp.updateEvents(false); await cmp.promiseUpdate(); return { before, afterDateShift, rebuiltColumnCount: cmp.getColumnContainer().cn.length, rebuiltHeaderCount: cmp.getHeaderContainer().cn.length }; }, weekId); console.log(JSON.stringify(state, null, 2)); });Verbatim probe output (
chromium157.0.8103.39,82458b0453b8a89f3a09974abf7f5c7ba9ae7f8a):{ "initial": { "columnsBuffer": 7, "columnsVisible": 7, "visibleColumnsType": "undefined", "totalColumnsType": "number", "totalColumnsIsNaN": false, "totalColumnsString": "21", "firstColumnDateYmd": "2024-07-21", "vdomColumnCount": 21, "vdomHeaderCount": 21, "vdomFirstColFlag": "2024-07-21", "vdomLastColFlag": "2024-08-10", "domColumnCount": 21, "domHeaderItemCount": 21, "domEventCount": 6 }, "afterSetColumnsBuffer5": { "columnsBuffer": 5, "columnsVisible": 7, "visibleColumnsType": "undefined", "totalColumnsIsNaN": true, "totalColumnsString": "NaN", "firstColumnDateYmd": "2024-07-21", "vdomColumnCount": 21, "vdomHeaderCount": 21 }, "afterCurrentDateChange": { "columnsBuffer": 5, "columnsVisible": 7, "totalColumnsIsNaN": true, "totalColumnsString": "NaN", "firstColumnDateYmd": "2024-07-30", "vdomColumnCount": 21, "vdomFirstColFlag": "2024-07-21", "vdomLastColFlag": "2024-08-10", "domFirstColumnId": "neo-c-w-1_col_2024-07-21", "domLastColumnId": "neo-c-w-1_col_2024-08-10" }, "afterCleanHeaderRebuild": { "columnsBuffer": 5, "columnsVisible": 7, "totalColumnsIsNaN": true, "totalColumnsString": "NaN", "firstColumnDateYmd": "2024-07-30", "vdomColumnCount": 0, "vdomHeaderCount": 0, "domColumnCount": 0, "domHeaderItemCount": 0, "domEventCount": 0 } }The Architectural Reality
src/calendar/view/week/Component.mjs:62-72defines reactive configscolumnsBuffer_: 7andcolumnsVisible_: 7; novisibleColumnsmember exists anywhere onComponent.src/calendar/view/week/Component.mjs:329-331:afterSetColumnsBuffercomputesthis.totalColumns = this.visibleColumns + 2 * value.src/calendar/view/week/Component.mjs:339-341:afterSetColumnsVisiblecomputesthis.totalColumns = 2 * this.columnsBuffer + value.src/calendar/view/week/Component.mjs:831(onWheel),891(updateEvents), and1025(updateHeader) all bound their loops bythis.totalColumns. WhencolumnsBufferorcolumnsVisiblechanges afterheaderCreatedistrue,updateHeader(false)(:1052) assumescontent.cnandheader.cnalready have lengththis.totalColumns, so changingtotalColumnsat runtime also requires resettingcontent.cn = []andheader.cn = []and rebuilding viaupdateHeader(true, true)+updateEvents().Design authority:
src/calendar/view/week/Component.mjs:62-71("Amount of hidden columns on both sides each inside this view. @member {Number} columnsBuffer_=7 @reactive"and"Amount of visible columns inside this view. @member {Number} columnsVisible_=7 @reactive") together withafterSetColumnsVisibleat:340(this.totalColumns = 2 * this.columnsBuffer + value).The Fix
In
src/calendar/view/week/Component.mjs:afterSetColumnsBuffer(:329-331) to usethis.columnsVisible + 2 * value(guarding whenthis.columnsVisibleis not yet initialized if config order ever changes, or computing2 * value + (this.columnsVisible ?? 0)).this.isConstructed && oldValue !== undefinedinafterSetColumnsBufferandafterSetColumnsVisible, cleargetColumnContainer().cn = []andgetHeaderContainer().cn = [], resetheaderCreated = false, and rebuild columns/headers and events (updateHeader(true, true); updateEvents()) so runtime changes to either@reactiveconfig keep VDOM and DOM column counts synchronized withtotalColumns.Acceptance Criteria
columnsBufferat runtime on a constructedNeo.calendar.view.week.ComponentsetstotalColumnsto2 * columnsBuffer + columnsVisible(neverNaN) and updates the rendered column/header count and subsequentcurrentDatetransitions accordingly.columnsVisibleat runtime on a constructedNeo.calendar.view.week.Componentlikewise rebuilds the column and header containers to match the newtotalColumnswithout throwing inupdateHeader.test/playwright/unit/calendar/(ortest/playwright/component/calendar/) that fails ondevbefore the fix and passes withnpm run test-unit -- test/playwright/unit/calendar.Out of Scope
onWheelbeyond reading the updatedcolumnsBuffer,columnsVisible, andtotalColumns.Avoided Traps
this.columnsVisibletypo without rebuildingcontent.cn/header.cn: IfcolumnsBufferincreases from7to9(totalColumns21->25) whileheaderCreatedstaystrue, the nextupdateHeader(false)(:1052) callsObject.assign(content.cn[21], ...)onundefinedand throws; ifcolumnsBufferdecreases from7to5(21->17), 4 stale trailing columns remain incontent.cnandheader.cn.Related
unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Live latest-open + closed sweep: checked latest 30 open issues (30 total open in
neomjs/neo, orange band; no owning calendar epic or ticket) + closed searches (columnsBuffer OR visibleColumns OR totalColumns calendar,calendar EventDragZone; readOut of Scope/Avoided Trapson#20577,#20384,#19005) at 2026-11-11T09:39Z; no equivalent or prior exclusion found. A2A in-flight claim sweep: checked latest 30 messages across all read states (status: 'all'); no competing claim on this scope. MC sweep:"calendar week columnsBuffer totalColumns NaN visibleColumns", 5 results, no prior decision found. Own-assignment sweep: 3 open (#20762,#20757,#20671), none overlapping.Origin Session ID: 3b4d3f8f-c078-4cee-8876-b0db074a5c04 Retrieval Hint: "calendar week Component afterSetColumnsBuffer visibleColumns columnsVisible totalColumns NaN"