Skip to content

feat(host): quick-pick welcome screen for bare /workflow - #41

Merged
pmateusz merged 4 commits into
masterfrom
feat-workflow-picker
Aug 24, 2026
Merged

feat(host): quick-pick welcome screen for bare /workflow#41
pmateusz merged 4 commits into
masterfrom
feat-workflow-picker

Conversation

@pmateusz

@pmateusz pmateusz commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

What

Bare /workflow (no subcommand) is now the feature's front door instead of a no-op:

  • TUI: replaces the ordinary editor with a compact, terminal-native quick-pick in the
    same interaction region as /settings — numbered rows, arrow/jk navigation, Enter to run,
    number-key shortcuts, Esc/Ctrl-C to dismiss, and the host restores the editor afterwards.
  • RPC: same copy and actions through the host's native dialog transport.
  • print/json (hasUI false): falls back to the plain /workflow list response, without
    scanning the catalog first.

Rows show each workflow's name and description; duplicate declared names get a filename hint
so rows stay distinguishable; Create new workflow is always last (and the sole action in the
empty state). Broken workflow files are surfaced as warnings in every mode and never offered
for selection. Selecting a workflow runs its exact file.

Implementation notes

  • Shared catalog-option presentation (duplicate counting, filename disambiguation, description
    normalization) lives in new src/host/workflow-display.ts, used by the picker, the RPC
    dialog, and the plain listing so all three agree.
  • Picker input handling is fail-closed: any throw settles the component as a dismissal so PI
    restores the editor.
  • pi-tui is pulled in via dynamic import only in TUI mode — rpc/print processes never load it.
  • notifyBrokenWorkflows extracted from /workflow list so broken files cannot be hidden by
    any catalog surface.

Docs & spec

  • New spec §6.0 records the behavior decisions (blank top row, header copy, headless fallback,
    broken-file visibility).
  • README command table gains the bare /workflow row; the trust-boundary note now covers the
    picker, which imports every workflow module just like /workflow list.

Also in this PR

  • examples/external-dependency/ — a self-contained example verifying a workflow can resolve
    a third-party package (slugify) from its own package directory, plus examples/.npmignore
    so the example's node_modules stays out of the published tarball (verified with
    npm pack --dry-run). Happy to split this into its own PR if you prefer.

Testing

  • New test/workflow-picker.test.ts (6 tests): screenshot-shaped rendering, empty state,
    keyboard navigation, numbered shortcuts, duplicate disambiguation, editor-slot settling,
    fail-closed path.
  • New welcome/dispatch coverage in test/extension-handlers.test.ts: RPC empty/populated/
    broken states, end-to-end TUI catalog discovery through the dynamic import, headless
    fallback proving no scan occurs.
  • tsc --noEmit and biome check clean.

pmateusz and others added 2 commits August 24, 2026 11:20
Bare /workflow now opens a compact terminal-native quick-pick in the TUI editor slot (like /settings), a native dialog over RPC, and falls back to the plain /workflow list in print/json modes where hasUI is false. Rows show each workflow's name and description, duplicate declared names gain a filename hint, and broken workflow files surface as warnings in every mode. Shared catalog-option presentation lives in workflow-display.ts so dialogs, the picker, and listings agree. Spec §6.0 documents the decisions.

Co-Authored-By: Kimchi <noreply@kimchi.dev>
Add an external-dependency workflow that imports slugify from its own package directory, installed with a dedicated pnpm package detached from the workspace. examples/.npmignore keeps the example's node_modules out of the published tarball.

Co-Authored-By: Kimchi <noreply@kimchi.dev>
@kimchi-review

kimchi-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

Kimchi Code Review

A review is being prepared and will be posted shortly.

Property Value
Commit 48a14b1
Author @pmateusz
Files changed 15
Review status Pending
What to expect

Kimchi will analyze the changes in this pull request and post:

  • A summary of the overall changes
  • Inline comments on specific lines with findings categorized by issue type

The review typically completes within a few minutes. This comment will be updated once the review is ready.

Interact with Kimchi
  • @getkimchi review — re-trigger a full review on the latest commit
  • @getkimchi summary — regenerate the PR summary
  • @getkimchi ignore — skip this PR (no review will be posted)
  • Reply to any inline comment to ask follow-up questions or request clarification
Configuration

Reviews are configured by your organization admin.
Review instructions, excluded directories, and severity thresholds can be adjusted per repository in the Kimchi dashboard.


Powered by Kimchi — AI-powered code review by CAST AI

@pmateusz pmateusz changed the title feat: Workflow picker feat(host): quick-pick welcome screen for bare /workflow Aug 24, 2026
pmateusz and others added 2 commits August 24, 2026 14:08
examples/ becomes a standalone package owning its toolchain (vitest, typescript, slugify) with its own lockfile; its tsconfig and vitest config alias the published @kimchi-dev/kimchi-workflows specifiers to src/ so the suite exercises the current checkout. The offline suite moves from test/examples-suite.test.ts to examples/example-workflows.test.ts and covers every example, guarded by a directory-coverage test, and the external-dependency example gains a real run test. Root tsconfig no longer typechecks examples/, so the detached-dependency example stops breaking the root typecheck job. New typecheck:examples / test:examples scripts; CI gains an examples job and the release check runs the same steps, both installing example dependencies first. biome now errors on undeclared dependencies.

Co-Authored-By: Kimchi <noreply@kimchi.dev>
@pmateusz
pmateusz merged commit 2b988e2 into master Aug 24, 2026
4 checks passed
@pmateusz pmateusz linked an issue Aug 24, 2026 that may be closed by this pull request
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.

Add an interactive welcome and workflow picker to /workflow

1 participant