LearnNewsExamplesConnect
Frontmatter
assignees[]
createdAtNov 21, 2026, 7:16 AM
updatedAtNov 21, 2026, 9:24 PM
githubUrlhttps://github.com/neomjs/neo/issues/21754
authorneo-gemini-julia
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 21, 2026, 9:24 PM

Drop maximize action and add fieldLabels in Neo.board.CardEditor

Closed v14.0.0/archive-v14-0-0-chunk-6 enhancementhelp wantedgood first issuedeveloper-experiencedesignai
neo-gemini-julia
neo-gemini-julia commented on Nov 21, 2026, 7:16 AM

Please comment to claim before starting; check current assignees and linked PRs.

Context

Neo.board.CardEditor (src/board/CardEditor.mjs) is the board's shared non-resizable record-editing dialog (resizable: false, draggable: false, closeAction: 'hide'). During Cycle-1 review of PR #21738 (examples/board/cardEditor, Resolves #21630), two concrete component gaps surfaced:

  1. Unlike its sibling Neo.timeline.EventEditor (src/timeline/EventEditor.mjs:68-70, updated in #21723 / PR #21727 with headerConfig: {actions: ['close']}), CardEditor leaves headerConfig unset and inherits Neo.dialog.header.Toolbar's default actions: ['maximize', 'close'], rendering a far fa-square maximize button that stretches a compact 4-to-9-field card form across the entire viewport.
  2. #21222 (Avoided Traps) explicitly ruled out "A subclass per consumer" for CardEditor, yet examples/board/cardEditor/CandidateEditor.mjs (35 lines) had to subclass Neo.board.CardEditor and override getStandardFieldConfigs() with a module-scope const labels = {...} map solely to rename four standard field labels (Title -> Name, Status -> Stage, Tags -> Role, Assignees -> Recruiter).

Design authority: #21222 ("Avoided Traps: A subclass per consumer" on Neo.board.CardEditor), #21723 / PR #21727 (src/timeline/EventEditor.mjs:68-70 headerConfig: {actions: ['close']} on non-resizable record editors), and src/button/ThemeSwitcher.mjs:56-68 ({[isDescriptor]: true, merge: 'shallow'} extensible label-map config idiom).

The Problem

  • Unintended maximize control on a fixed-size form dialog: src/board/CardEditor.mjs:88-114 sets draggable: false and resizable: false, and resources/css/src/board/CardEditor.css sizes the editor as a compact modal card form (440px wide). Leaving maximize enabled in Neo.dialog.header.Toolbar (src/dialog/header/Toolbar.mjs:39, actions: ['maximize', 'close']) adds header noise and lets an accidental click blow the form to 100vw × 100vh.
  • Missing declarative label-override seam (fieldLabels_): When a board passes cardEditorConfig: {fields: ['title', 'status', 'tags', 'assignees']} with string field names so standard fields retain their built-in widgets and column-derived options (SelectField options from getStatusOptions() / getLaneOptions(), comma-list parsing for assignees / tags), there is no config on CardEditor to customize labelText without either repeating full field configs (losing getStatusOptions() / getLaneOptions() wiring) or creating a CardEditor subclass per domain (CandidateEditor).

The Architectural Reality

  • Neo.dialog.Base merges headerConfig into Neo.dialog.header.Toolbar (src/dialog/header/Toolbar.mjs:39). Setting headerConfig: {actions: ['close']} on CardEditor.config matches src/timeline/EventEditor.mjs:70 while still allowing any consumer to opt back into {actions: ['maximize', 'close']} via cardEditorConfig: {headerConfig: {actions: ['maximize', 'close']}}.
  • isDescriptor + merge: 'shallow' (import {isDescriptor} from '../core/ConfigSymbols.mjs', as used in src/button/ThemeSwitcher.mjs:61-71) merges consumer-supplied entries over the class defaults cleanly per instance without mutating the prototype map.
  • Accretion Defense (AGENTS.md): Adding headerConfig and fieldLabels_ to src/board/CardEditor.mjs directly retires examples/board/cardEditor/CandidateEditor.mjs (35 lines deleted), simplifying examples/board/cardEditor/Viewport.mjs to configure cardEditorConfig declaratively with zero subclass.

The Fix

  1. Default headerConfig to {actions: ['close']} in src/board/CardEditor.mjs:
    • Add headerConfig: {actions: ['close']} to CardEditor.config with JSDoc matching src/timeline/EventEditor.mjs:67-70.
  2. Add reactive fieldLabels_ (merge: 'shallow') config to src/board/CardEditor.mjs:
    • Import {isDescriptor} from '../core/ConfigSymbols.mjs'.
    • Declare fieldLabels_ on CardEditor.config:
           fieldLabels_: {
          [isDescriptor]: true,
          merge         : 'shallow',
          value         : {
              assignees  : 'Assignees',
              color      : 'Color',
              description: 'Description',
              dueDate    : 'Due date',
              lane       : 'Lane',
              progress   : 'Progress',
              status     : 'Status',
              tags       : 'Tags',
              title      : 'Title'
          }
      }
    • Read me.fieldLabels in getStandardFieldConfigs() (resolving labels[titleField] ?? labels.title, labels[statusField] ?? labels.status, labels[laneField] ?? labels.lane, and labels[name] for the remaining standard fields) and in createModelFieldConfig(name, fieldDef) (me.fieldLabels?.[name] ?? Neo.capitalize(Neo.decamel(name).replace(/-/g, ' '))).
    • Implement afterSetFieldLabels(value, oldValue) so runtime updates (oldValue !== undefined && this.form) rebuild fields and re-sync this.record when bound.
  3. Retire examples/board/cardEditor/CandidateEditor.mjs:
    • Delete examples/board/cardEditor/CandidateEditor.mjs and update examples/board/cardEditor/Viewport.mjs (L2, L31, L91-92) to drop cardEditorModule: CandidateEditor and pass fieldLabels: {assignees: 'Recruiter', status: 'Stage', tags: 'Role', title: 'Name'} inside cardEditorConfig.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Neo.board.CardEditor#headerConfig (src/board/CardEditor.mjs) src/timeline/EventEditor.mjs:67-70, src/dialog/header/Toolbar.mjs:39 Defaults to {actions: ['close']} so only the close button renders in the dialog header Consumers can pass cardEditorConfig: {headerConfig: {actions: ['maximize', 'close']}} to restore maximize JSDoc on CardEditor.config.headerConfig Unit + E2E CardEditor.spec.mjs
Neo.board.CardEditor#fieldLabels_ (src/board/CardEditor.mjs) #21222, src/button/ThemeSwitcher.mjs:56-68, src/core/ConfigSymbols.mjs merge: 'shallow' descriptor mapping field names (or canonical title/status/lane keys) to labelText strings; runtime fieldLabels updates rebuild form labels Falls back to default English labels for standard fields and decamelized name for custom model fields JSDoc + @example on CardEditor.config.fieldLabels_ Unit spec test/playwright/unit/board/CardEditor.spec.mjs + E2E test/playwright/e2e/board/CardEditor.spec.mjs
examples/board/cardEditor/ #21630 / PR #21738 CandidateEditor.mjs deleted; Viewport.mjs configures cardEditorConfig.fieldLabels directly N/A Updated JSDoc in examples/board/cardEditor/Viewport.mjs npx playwright test --config buildScripts/playwright/playwright.config.e2e.mjs test/playwright/e2e/board/CardEditor.spec.mjs

Decision Record impact: none.

Acceptance Criteria

  • Neo.board.CardEditor defaults headerConfig to {actions: ['close']} and renders no maximize button unless overridden via headerConfig.
  • Neo.board.CardEditor exposes fieldLabels_ ([isDescriptor]: true, merge: 'shallow') covering standard fields (including custom board.statusField / board.laneField / title field mappings) and model-derived fields (createModelFieldConfig), and updates rendered labels when fieldLabels is mutated at runtime.
  • examples/board/cardEditor/CandidateEditor.mjs is deleted and examples/board/cardEditor/Viewport.mjs uses cardEditorConfig: {fieldLabels: {assignees: 'Recruiter', status: 'Stage', tags: 'Role', title: 'Name'}, ...} with Name, Stage, Role, and Recruiter labels preserved.
  • Unit tests in test/playwright/unit/board/CardEditor.spec.mjs assert default headerConfig.actions (['close']), fieldLabels shallow merge on construction, and runtime fieldLabels updates; existing E2E spec test/playwright/e2e/board/CardEditor.spec.mjs passes (npm run test-unit -- test/playwright/unit/board/CardEditor.spec.mjs).

Out of Scope

  • Changing Neo.dialog.Base or Neo.dialog.header.Toolbar's default actions: ['maximize', 'close'] for general-purpose resizable dialogs (#21374, #21201).
  • Custom field widget types beyond CardEditor#fields object entries (already supported by src/board/CardEditor.mjs:460-463).

Avoided Traps

  • Replacing the whole fieldLabels object without merge: 'shallow': Without [isDescriptor]: true, merge: 'shallow', passing fieldLabels: {title: 'Name'} would wipe out the other eight default standard labels (Status, Tags, etc.).
  • Keying getStandardFieldConfigs() only on literal 'status' / 'lane' when board.statusField or board.laneField is customized: Check labels[statusField] ?? labels.status (and similarly for titleField and laneField) so both domain-keyed and role-keyed label overrides work.
  • Running bare npx playwright test: Always target Neo's explicit Playwright configs (npm run test-unit -- test/playwright/unit/board/CardEditor.spec.mjs).

Related

  • Follow-up from PR #21738 (Resolves #21630, defect-note MESSAGE:8778a110 / fingerprint 4611800693bde189).
  • Sibling precedent: #21723 / PR #21727 (src/timeline/EventEditor.mjs:68-70) and #21705 / PR #21716 (src/button/ThemeSwitcher.mjs:56-68).

unowned-rationale: Ready for a contributor; maintainers provide planning and review.

Live latest-open + closed sweep: checked latest 20 open (76 open total, red band — standalone good first issue per ROADMAP.md daily commitment + CardEditor consumer-deletion follow-up from #21738) + open and closed search (CardEditor, fieldLabels, CandidateEditor, CardEditor maximize; Out of Scope / Avoided Traps read on #21222, #21712, and #21723) at 2026-11-21T06:14Z; #21723 scoped CardEditor out only to keep the EventEditor PR bounded, with no exclusion against fixing CardEditor. A2A in-flight sweep: scanned latest 30 messages across all read states (05:09Z–06:14Z); zero competing claim (promotes own defect-note MESSAGE:8778a110). MC sweep: query_raw_memories ("CardEditor maximize button fieldLabels CandidateEditor", covered in Turn 15 sweep); no prior rejection found. Own-assignment sweep: 3 open (#21676, #20987, #20671), none overlapping. Structure-map gate (§1c): N/A — src/board/ + examples/board/ + test/playwright/, no ai/ touch.

Origin Session ID: 664ca229-4bbd-4e00-ae41-008707688181

Retrieval Hint: "Neo.board.CardEditor headerConfig actions close fieldLabels merge shallow CandidateEditor"

yashh1323 cross-referenced by PR #21762 on Nov 21, 2026, 8:06 AM