LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 22, 2026, 7:37 AM
updatedAtNov 22, 2026, 1:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/21863
authorneo-gemini-maryam
commentsCount0
parentIssue21346
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[x] 21895 A Task Board example shows due dates and what is late
closedAtNov 22, 2026, 1:18 PM

Board cards drop dueDate after CardEditor saves it

Closed v14.0.0/archive-v14-0-0-chunk-6 bugdocumentationdeveloper-experienceaitesting
neo-gemini-maryam
neo-gemini-maryam commented on Nov 22, 2026, 7:37 AM

Context

On dev (74d999124c), Neo.board.CardModel declares dueDate (src/board/CardModel.mjs:59) and Neo.board.CardEditor builds a Due date picker by default on every CardModel board (src/board/CardEditor.mjs:92,106,439,686-690). Opening the card editor on examples/board/basic (or any minimal Neo.board.Container built from the Kanban guide), picking a due date, and clicking Save writes yyyy-mm-dd onto record.dueDate — and paints nothing on the card. Identified in the planning-family source check (#21346 comment 6982869553: "dueDate is edited but never drawn" / "Board: a date card item") and actionable under the v14.0 convergence pass on #21346.

No curated contributor labels: self-assigned maintainer fix landing for the v14.0 release cut and unblocking the date-card slot of #21346.

The Problem

  • learn/guides/datahandling/Board.md:66-67 states that Neo.board.CardModel declares the fields the board and its default card items read (id, title, description, status, lane, order, assignees, tags, progress, color and dueDate), yet §6 (Board.md:208-216), src/board/CardItems.mjs:32-121, and src/board/Container.mjs:68 implement and list only five built-in card item types (title, text, tags, progress, avatars).
  • Because CardEditor offers Due date out of the box whenever the store's model declares dueDate (#21222), saving a due date in CardEditor succeeds silently without updating the card's rendered body unless every consumer hand-registers a custom renderer via registerCardItem.

The Architectural Reality

  • Design authority: "Neo.board.CardModel declares the fields the board and its default card items read: id, title, description, status, lane, order, assignees, tags, progress, color and dueDate." (learn/guides/datahandling/Board.md:66-67) and "@summary The card of a board: the fields the board reads, and the fields its default card items render." (src/board/CardModel.mjs:4).
  • src/board/CardItems.mjs is a module of pure (record, item, card) -> vdom | null renderers; Card#renderItems() (src/board/Card.mjs:342-354) stamps deterministic node IDs (<card>__<type>[__<field>]) and filters null items so records without dueDate emit zero extra DOM nodes.
  • src/timeline/TimeAxisHeader.mjs:35-45 establishes the planning-family convention of caching Intl.DateTimeFormat(locale, {...options, timeZone: 'UTC'}) over wall-date UTC components so formatted calendar labels stay timezone- and clock-deterministic across workers and SSR/Playwright runs; moving that helper to Neo.util.Date.formatWall (with TimeAxisHeader.formatWall delegating to it) lets CardItems.mjs share both DateUtil.formatWall and DateUtil.convertToyyyymmdd without importing a component class.
  • All five shipped board themes (resources/css/theme-{neo-dark,neo-light,dark,light,cyberpunk}/board/Container.css) already define --neo-board-card-hover-border-color and --neo-board-badge-color (>= 5.5:1 WCAG 2.2 AA contrast against --neo-board-card-background across all five themes, whereas --neo-board-card-muted-color over --neo-board-badge-background drops to 3.74:1 in neo-light), so styling .neo-board-card-due-date as an outlined 4px badge in resources/css/src/board/Card.css works across every theme without hardcoded colors, visually distinguishes dates from filled pill tags, and shares one footer row with .neo-board-card-avatars when both are present.

The Fix

  1. src/util/Date.mjs & src/timeline/TimeAxisHeader.mjs:
    • Move formatWall(locale, options, wall, wallEnd) and its cached Intl.DateTimeFormat Map into Neo.util.Date.formatWall, keeping TimeAxisHeader.formatWall as a one-line delegate.
  2. src/board/CardItems.mjs (cardItems.dueDate):
    • Add built-in dueDate(record, item) reading record[item.field || 'dueDate'].
    • Return null when missing, empty, or an invalid Date.
    • Normalize Date instances via DateUtil.convertToyyyymmdd and ISO date/datetime strings (YYYY-MM-DD...) into a semantic {tag: 'time', cls: ['neo-board-card-due-date'], datetime: iso, title: iso, text} VDOM node.
    • Format text deterministically via DateUtil.formatWall(item.locale || 'en-US', item.formatOptions || {month: 'short', day: 'numeric'}, wallDate) prefixed by item.prefix ?? 'Due' (e.g. 'Due Dec 15'; prefix: '' or false omits the prefix), with optional item.formatter(value, record) override.
  3. src/board/Container.mjs & src/board/CardModel.mjs:
    • Include {type: 'dueDate'} in Neo.board.Container#cardItems_ ([{type: 'title'}, {type: 'tags'}, {type: 'progress'}, {type: 'dueDate'}, {type: 'avatars'}]) and align CardModel / Card.css JSDoc item lists.
  4. resources/css/src/board/Card.css:
    • Style .neo-board-card-due-date as a compact outlined tabular-numeral badge (border: 1px solid var(--neo-board-card-hover-border-color); border-radius: 4px; color: var(--neo-board-badge-color)), and pair .neo-board-card-due-date + .neo-board-card-avatars on one shared footer row while preserving full-width rows for every other card item.
  5. learn/guides/datahandling/Board.md:
    • Update §6 (What a Card Shows) default cardItems array and built-in item list to document dueDate.
  6. Tests (test/playwright/unit/util/Date.spec.mjs, test/playwright/unit/board/Card.spec.mjs & test/playwright/e2e/board/BasicNL.spec.mjs):
    • Add unit tests for DateUtil.formatWall and cardItems.dueDate (ISO date string, ISO timestamp, Date instance, custom field, custom prefix / formatter / formatOptions, empty/null/invalid Date returning null, and Card rendering/updating dueDate).
    • Extend BasicNL.spec.mjs to set a due date through CardEditor, save, verify <time class="neo-board-card-due-date" datetime="..."> ('Due Dec 15') renders on the live card with >= 4.5:1 contrast, and verify clearing removes the badge.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Neo.util.Date.formatWall(locale, options, wall, wallEnd) (src/util/Date.mjs) src/timeline/TimeAxisHeader.mjs:35-45 Formats UTC wall-clock Date or inclusive [wall, wallEnd] range via cached Intl.DateTimeFormat(locale, {...options, timeZone: 'UTC'}); TimeAxisHeader.formatWall delegates to it Single-date format(wall) when wallEnd omitted JSDoc in Date.mjs & TimeAxisHeader.mjs test/playwright/unit/util/Date.spec.mjs, test/playwright/unit/timeline/TimeAxisHeader.spec.mjs
cardItems.dueDate (src/board/CardItems.mjs) learn/guides/datahandling/Board.md:66-67, src/board/CardModel.mjs:4,59 Renders record[item.field || 'dueDate'] as <time class="neo-board-card-due-date" datetime="YYYY-MM-DD"> using DateUtil.convertToyyyymmdd + DateUtil.formatWall + item.prefix ?? 'Due' or item.formatter Returns null when missing, empty, or invalid Date (card drops node) JSDoc in CardItems.mjs + Board.md §6 test/playwright/unit/board/Card.spec.mjs
Neo.board.Container#cardItems_ (src/board/Container.mjs:68) learn/guides/datahandling/Board.md:66-67, src/board/CardEditor.mjs:686-690 Default cardItems_ includes {type: 'dueDate'} (title, tags, progress, dueDate, avatars) Explicit board.cardItems / card.cardItems overrides completely Container.mjs, CardModel.mjs, Board.md §6 Card.spec.mjs + test/playwright/e2e/board/BasicNL.spec.mjs

Decision Record impact: none.

Acceptance Criteria

  • cardItems.dueDate in src/board/CardItems.mjs renders ISO date strings ('2026-12-01'), ISO timestamps, and Date instances into {tag: 'time', cls: ['neo-board-card-due-date'], datetime: '2026-12-01', ...}, supports item.field, item.locale, item.prefix, item.formatOptions, and item.formatter, and returns null when empty, null, or invalid.
  • Neo.board.Container#cardItems_ includes {type: 'dueDate'}, leaving cards without dueDate unchanged (0 extra DOM nodes) while rendering saved CardEditor due dates immediately.
  • .neo-board-card-due-date in resources/css/src/board/Card.css uses existing --neo-board-* theme tokens with >= 4.5:1 WCAG contrast across shipped themes and shares one footer row with adjacent .neo-board-card-avatars.
  • learn/guides/datahandling/Board.md §6 documents dueDate in the default cardItems array and built-in renderer list.
  • Unit tests in test/playwright/unit/board/Card.spec.mjs and E2E verification in test/playwright/e2e/board/BasicNL.spec.mjs (plus existing board unit & E2E suites) pass.

Out of Scope

  • Implicit new Date() wall-clock "overdue" coloring inside cardItems.dueDate (would couple card rendering to test/capture clock time and misclassify completed 'done' cards).
  • Shared Portal catalog data files (examples.json, example-captures.json, seo.json, #21539).
  • A new standalone examples/board/ demonstration folder (separate example leaf under #21346).

Avoided Traps

  • Calling new Date(isoString) with local-timezone getters: new Date('2026-12-01') parses as UTC midnight, which shifts to 'Nov 30' in negative UTC offsets when formatted in local time; parsing YYYY-MM-DD components into Date.UTC(y, m - 1, d) and formatting with timeZone: 'UTC' (DateUtil.formatWall) keeps calendar dates exact in every timezone.
  • Using --neo-board-card-muted-color over --neo-board-badge-background or stacking dueDate above avatars: Muted-on-badge drops to 3.74:1 in neo-theme-neo-light (below WCAG 2.2 SC 1.4.3 4.5:1), bare dates without Due look like category tags, and stacking dueDate above avatars wastes an extra vertical row per card; an outlined 4px Due <date> badge sharing the avatar footer row solves all three.
  • Formatting with ambient new Date() overdue checks: Breaks screenshot/test determinism and flags completed cards as overdue.

Related

  • Parent: #21346 (planning examples epic; source check 6982869553)
  • Sibling history: #20874 (families epic), #21222 (CardEditor model fields), #21629 (cardDesigns example), #21754 (CardEditor fieldLabels_)

Ownership: self-assigned to @neo-gemini-maryam.

Live latest-open + closed sweep: checked latest 20 open (43 open total, orange band — linked under active parent epic #21346) + open and closed searches (dueDate OR CardItems, board dueDate OR card due date; Out of Scope and Avoided Traps read on #21629, #21222, #21754, #21371, and #20884) at 2026-11-22T06:36Z; #21629 explicitly deferred "A date on the card, an engine gap named on #21346", confirming no duplicate or exclusion. A2A in-flight sweep: scanned latest 30 messages across all read states (03:37Z–06:35Z); zero competing [lane-claim] on src/board/CardItems.mjs or dueDate. MC sweep: query_raw_memories ("board card dueDate edited in CardEditor never drawn on card", 5 results) + ask_knowledge_base (type: 'ticket', 5 refs); no prior rejection found. Own-assignment sweep: 0 open assigned to @neo-gemini-maryam in neomjs/neo. Structure-map gate (§1c): N/A — src/board/, src/util/, src/timeline/, resources/css/src/board/, learn/guides/, and test/playwright/, zero ai/ or new .mjs placement.

Origin Session ID: 59ca0d8c-dfdf-4d07-aefe-8ec5c658a398

Retrieval Hint: "Neo.board.CardItems dueDate cardItems CardEditor due date never drawn on card"

DeviousCardi cross-referenced by #21862 on Nov 22, 2026, 8:12 AM