Problem
The Buildkite CLI has an experimental bk preflight run command that snapshots your working tree (including unstaged/untracked changes), pushes to a temporary branch, triggers a CI build, and watches results — all before you commit. builddeck has no equivalent, meaning you have to context-switch to the CLI for this workflow.
Proposed Feature
A Preflight overlay (keybinding: ctrl+p or P) that:
- Detects the local git repo (reads
.git from CWD or a configurable path)
- Shows a diff summary of uncommitted changes (files changed, insertions/deletions)
- Offers to snapshot, push, and trigger a CI build on the selected pipeline
- Watches the preflight build live in the existing TUI polling loop, with a special indicator ("PREFLIGHT" badge)
- Cleans up the temp branch and optionally cancels the build on close
UX Flow
┌──────────────────────────────────────┐
│ ⚡ Preflight Build │
│ │
│ Working tree (2 files changed): │
│ ┌───────────────────────────────┐ │
│ │ M src/handler.go (+42 -12) │ │
│ │ M tests/handler_test.go │ │
│ │ (+8 -0) │ │
│ └───────────────────────────────┘ │
│ │
│ Target pipeline: my-pipeline │
│ Branch: preflight/<timestamp> │
│ │
│ [Cancel] [Snap & Run] │
└──────────────────────────────────────┘
Why this fits a TUI
- This is the CLI's most unique capability — bringing it into the TUI makes the TUI the one-stop CI control center
- The TUI already excels at watching build progress; preflight is a natural extension
- Engineers can fire off a preflight check without leaving their terminal dashboard
- Visual diff summary + live build watch is more informative than CLI output
Requirements
- Git repo detection: scan CWD, BUILDKITE_REPO env var, or ~/.config/builddeck/repo-path config
- Branch naming: preflight/builddeck-<timestamp>-<short-sha>
- Push requires remote git credentials (assume they are configured)
- Pipeline resolution: use current selected pipeline, or prompt
- Cleanup on close: delete remote branch, optionally cancel build
Risk
- Git push failure: if remote is unreachable or credentials missing, show clear error
- Long-running branch accumulation: cleanup must be reliable; optionally add cleanup command equivalent
References
bk preflight run in buildkite/cli
- Preflight code maps repo/snapshot/git operations
Acceptance
Problem
The Buildkite CLI has an experimental
bk preflight runcommand that snapshots your working tree (including unstaged/untracked changes), pushes to a temporary branch, triggers a CI build, and watches results — all before you commit. builddeck has no equivalent, meaning you have to context-switch to the CLI for this workflow.Proposed Feature
A Preflight overlay (keybinding:
ctrl+porP) that:.gitfrom CWD or a configurable path)UX Flow
Why this fits a TUI
Requirements
Risk
References
bk preflight runin buildkite/cliAcceptance
ctrl+porP