Skip to content

Write a workflow editor row once, remove on y only, and undo - #1100

Open
lezli01 wants to merge 1 commit into
tui-auditfrom
fix/workflow-editor-writes-once
Open

lezli01 wants to merge 1 commit into
tui-auditfrom
fix/workflow-editor-writes-once

Conversation

@lezli01

@lezli01 lezli01 commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Closes #1056. Merges into tui-audit.

What changes

  • Enum rows open their members as a list (with (unset) when the field is optional), and the pick is the one write. Cycling used to PATCH the file on every press, so reaching the third value wrote two intermediate ones, possibly into a global workflow. A boolean still flips in place: that is one write.
  • Removal confirms on y only. enter is the editor's edit key, so d followed by a reflexive enter used to remove the item.
  • Undo: after an accepted write the form says saved <field> · it was <old value> · u puts it back. The new u writes that old value back, moving the cursor to the row.
    • It is one level: an undo is itself a write and is not undoable.
    • A failed write leaves nothing to undo, and u says when a write is still in flight or when there is nothing to undo.
    • u is registered as a fixed key of the editor, with a probe.

Not changed

The triggers form also cycles enum rows (triggersform.go). The issue names only the workflow editor, so I left it; it can take the same picker if wanted.

Checks

  • Tests: the enum pick writes once and only on the pick; u writes the replaced value and is not itself undoable; removal ignores enter and takes y.
  • Updated the guide's editor tables.
  • go test ./internal/tui passes and mage lintall is clean.

An enum row opens its members as a list and writes once, on the pick,
rather than cycling and writing every value on the way. The remove
confirmation takes y only: enter is the editor's edit key. After a write
the form says what the row was, and u puts it back with one write of its
own; an undo is not itself undoable.

Closes #1056

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant