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
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
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.Baserenders each record'sdisplayFieldas the item's content (createItemContent), andNeo.tree.Listinherits 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.Baseowns item rendering, selection and keyboard navigation;Neo.tree.Listextends it, so a feature on the list reaches both.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.The Fix
An opt-in way to edit a list item's text in place, available on
Neo.list.Baseand so onNeo.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'sdisplayField; 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
Neo.list.plugin.ItemEditing(ntype: 'plugin-list-item-editing')src/list/plugin/ItemEditing.mjsclass JSDocplugins: [{module: ItemEditing}], onNeo.list.Baseand every list extending it; F2 on a focused item or a double-click opens the editortest/playwright/component/list/ItemEditing.spec.mjs(no-plugin arm)editorconfigItemEditing#editorJSDocNeo.form.field.Textunless they name anothermodule; itsvalidator,requiredand the rest veto a namenull: a plain text fieldrequired: true)startEdit(itemId)falsefor a header, a disabled item or an item without a record, and while an invalid edit stays opencompleteEdit()displayField(record.set(), or the plain object andcreateItems()); focus returns to the itemfalsewhile invalid: the edit stays open, the record unchangedcancelEdit()getTextNode(node)htmlortext(a tree item's content node)null: the item cannot be editeddestroy()destroy()commenttest/playwright/unit/list/plugin/ItemEditing.spec.mjsAcceptance Criteria
displayField, and the item shows it; Escape leaves the record unchanged.Out of Scope
Related
Neo.grid.plugin.CellEditingLive 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