LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 19, 2026, 12:45 PM
updatedAtNov 19, 2026, 6:11 PM
githubUrlhttps://github.com/neomjs/neo/issues/21476
authorneo-opus-grace
commentsCount0
parentIssue21140
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 19, 2026, 6:11 PM

A list or tree item can be renamed in place

Closed v14.0.0/archive-v14-0-0-chunk-5 enhancementaicore
neo-opus-grace
neo-opus-grace commented on Nov 19, 2026, 12:45 PM

Context

#21140's target gives the Trees group a file explorer whose items are "renamed in place" (row Trees). Checked on 19 Nov (#21140 issuecomment-7006670970): no list or tree in the engine edits an item's text in place, so the card waits on this ticket and on its sibling for drag-move.

unowned-rationale: an engine feature the Trees card needs; a maintainer takes it when the band's examples are in review, and if it misses the lock (Sun 22 Nov 18:00 CET) the card rides the next cut.

The Problem

Neo.list.Base renders each record's displayField as the item's content (createItemContent), and Neo.tree.List inherits that. Neither offers a way to edit that text where it is shown, so an app has to open a dialog or a form to rename a file, a folder or a list entry.

The Architectural Reality

  • Neo.list.Base owns item rendering, selection and keyboard navigation; Neo.tree.List extends it, so a feature on the list reaches both.
  • The engine already edits in place elsewhere: grid cell editing (Neo.grid.plugin.CellEditing) places a field over a cell, commits to the record and restores focus. That is the pattern to follow, not to share code with.
  • An item's text is a record field, so the edit commits by setting that field and the list renders from the store.

The Fix

An opt-in way to edit a list item's text in place, available on Neo.list.Base and so on Neo.tree.List: F2 or a double-click opens a text field over the item's text; Enter or leaving the field commits to the record's displayField; Escape cancels; focus returns to the item. The field's own validation vetoes a name before it is committed, as in grid cell editing. (Amended at intake and review, 19 Nov: the owner is a plugin, Neo.list.plugin.ItemEditing, and the veto is the field's validation rather than a listener.)

Contract Ledger

Target surface Source of authority Proposed behavior Fallback Docs Evidence
Neo.list.plugin.ItemEditing (ntype: 'plugin-list-item-editing') src/list/plugin/ItemEditing.mjs class JSDoc A list opts in with plugins: [{module: ItemEditing}], on Neo.list.Base and every list extending it; F2 on a focused item or a double-click opens the editor A list without it behaves as released class JSDoc test/playwright/component/list/ItemEditing.spec.mjs (no-plugin arm)
editor config ItemEditing#editor JSDoc Configs for the field, a Neo.form.field.Text unless they name another module; its validator, required and the rest veto a name null: a plain text field member JSDoc veto arm (required: true)
startEdit(itemId) method JSDoc Opens the field over the item's text; an edit open elsewhere commits first; the list's navigator pauses until the edit ends false for a header, a disabled item or an item without a record, and while an invalid edit stays open method JSDoc F2 and double-click arms
completeEdit() method JSDoc Validates, then writes the record's displayField (record.set(), or the plain object and createItems()); focus returns to the item false while invalid: the edit stays open, the record unchanged method JSDoc Enter, leave and veto arms
cancelEdit() method JSDoc Shows the item's text again; record unchanged; focus returns to the item No edit: nothing happens method JSDoc Escape arm
getTextNode(node) method JSDoc The node carrying an item's text: the item itself, or the first descendant with html or text (a tree item's content node) null: the item cannot be edited method JSDoc tree arms
Teardown, destroy() destroy() comment A plugin destroyed alone ends its edit and removes its F2 key and double-click listener; an owner being destroyed only destroys the field none inline comment test/playwright/unit/list/plugin/ItemEditing.spec.mjs

Acceptance Criteria

  • AC-1: With the feature on, F2 on a focused item and a double-click on an item open an editor over its text, holding the current value.
  • AC-2: Enter and blur write the new text to the record's displayField, and the item shows it; Escape leaves the record unchanged.
  • AC-3: A veto keeps the old text and the editor open; focus is on the item after a commit or a cancel.
  • AC-4: A component spec covers a list and a tree; lists without the feature behave as today.

Out of Scope

  • Editing more than the display text.
  • Drag-move in trees: its own ticket.

Related

  • #21140 (the Trees row) · pattern: Neo.grid.plugin.CellEditing

Live latest-open + closed sweep: checked latest 20 open (open count 77) + open and closed search ("tree rename in place", "list inline edit item") at 2026-11-19T11:44Z; no equivalent found. A2A in-flight sweep: no claim. Memory Core sweep: none. Own assignments: none on this surface.

Retrieval Hint: "list tree item rename in place inline editor F2"

Origin Session ID: d776ccf3-4f3f-4feb-a4ce-f480e6a65b0c