Skip to content

feat: a Saved section in /workflows, and syntax highlighting in the web approval view - #15

Merged
malhashemi merged 3 commits into
mainfrom
feat/saved-and-highlight
Sep 26, 2026
Merged

malhashemi merged 3 commits into
mainfrom
feat/saved-and-highlight

Conversation

@malhashemi

Copy link
Copy Markdown
Owner

TUI: Saved Workflows in /workflows

  • After Live and Recent, a Saved group lists the project's durable Workflows, with a summary of their args (no args, needs question · 2 optional).
  • Enter asks what you want and sends /<key> <request> to the session you came from (a new session when opened from home), then switches to it. The agent builds the args from the request: the same path as typing the slash command.
  • s starts a Workflow that needs no args at once and opens its Run.
  • Checked in a real TUI against a private server: the Saved group, Enter (the agent ran fanout from the request), s (the Run opened), and s hidden for a Workflow with required args.

Web: highlighted inline source

  • The approval view colours the script (comments, strings, template literals, numbers, keywords, types, calls) in light and dark themes. Tokens are text nodes, never HTML. Tests check the exact source comes back, unterminated input included.

…oval view

A small TypeScript tokenizer (comments, strings, template literals, numbers,
keywords, types, calls) colours the script a person reads before approving it.
Tokens render as text nodes, never HTML; light and dark themes; joining the
tokens gives back the source exactly (tested, including unterminated input).
The library lists the project's durable Workflows after the Runs, with the args
each needs, so nobody has to remember keys. Enter asks what you want and sends
/<key> <request> to the session you came from (a new one from home), where the
agent builds the args and runs it; s starts a Workflow that needs no args at
once and opens its Run.
Comment thread packages/plugin/src/tui/views.tsx Resolved
Comment thread packages/plugin/src/tui/views.tsx Resolved
Comment thread packages/plugin/src/tui/views.tsx Resolved
Comment thread packages/plugin/src/tui/app.tsx Resolved
Comment thread packages/plugin/src/tui/views.tsx Resolved
…time, fresh list

- a required field with a default counts as optional (zod lists it required),
  and a non-object args schema cannot start with no args (shown as needs args)
- s is disabled while a start is in flight, so a repeated key starts one Run
- overlapping loads of the saved list keep only the newest answer
- saving a Run refreshes the Saved list at once
@malhashemi
malhashemi merged commit 297e63c into main Sep 26, 2026
5 checks passed
@malhashemi
malhashemi deleted the feat/saved-and-highlight branch September 26, 2026 09:15
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