feat(ui): drop the slash and the argument echo from the command row
The web command row renders `title · summary` from one logged command lifecycle pair, and the two halves were written without knowing about each other: the title was the dispatched line rebuilt from `command/run` and the summary was `command/done`'s verbatim text, so every Access-chip pick read `/permission workspace-write · Permission preset: workspace-write.` — the command name twice and its argument twice. The title is now the bare command name (no `/`, no arguments — the summary already says what the command did), and a command handler's settlement text never repeats the command's own name, so `/permission` returns `preset workspace-write`. The row reads `permission · preset workspace-write`, and the TUI notice still names the preset that now applies. The log is unchanged: `command/run` keeps its structured name/args split for a richer registered row.
This commit is contained in:
@@ -135,7 +135,7 @@ describe('live event path', () => {
|
||||
expect(session.getSnapshot().composerPhase).toBe('blank')
|
||||
const feed = (event: SessionEvent) => { session.handleMuxEnvelope('r' as never, { type: 'session/event', sessionId: SID, event }) }
|
||||
feed(ev.commandRun(0, 'cmd-perm', 'permission', ' danger-full-access'))
|
||||
feed(ev.commandDone(1, 'cmd-perm', 'success', 'Permission preset: danger-full-access.'))
|
||||
feed(ev.commandDone(1, 'cmd-perm', 'success', 'preset danger-full-access'))
|
||||
const snapshot = session.getSnapshot()
|
||||
expect(snapshot.nodes.at(-1)).toMatchObject({ kind: 'command', name: 'permission' })
|
||||
expect(snapshot.composerPhase).toBe('blank')
|
||||
|
||||
Reference in New Issue
Block a user