Skip to content

Add --section flag and TUI file-group drill-down#1

Open
khluu wants to merge 1 commit into
mainfrom
feat/section-drilldown
Open

Add --section flag and TUI file-group drill-down#1
khluu wants to merge 1 commit into
mainfrom
feat/section-drilldown

Conversation

@khluu

@khluu khluu commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • CLI --section flag: Drill into a group section by name (substring match) to see individual pytest tests, docker steps, or shell commands without launching the TUI. Prints available section names on mismatch.
  • TUI file-group view: When expanding a section with pytest tests, an intermediate view now shows test files grouped by filename with total duration and test count. Drilling into a file shows its individual tests.

Motivation

For jobs like "V1 e2e + engine (1 GPU)", bkslow shows a single 2h14m :docker: Running command block. The TUI already supports drilling into sections via AnalyzeSectionLines, but:

  • There was no CLI equivalent — you had to launch the TUI
  • The TUI jumped straight to ~200 individual pytest tests, making it hard to see which test files are slowest

Examples

# Drill into the docker section from the CLI
bkslow --section "Running command" <job-url>

# Combine with --threshold to find slow tests
bkslow --section "Running command" --threshold 5m <job-url>

# Error case shows available sections
bkslow --section "nonexistent" <job-url>

In the TUI, the new navigation flow is:

Job Detail → File Group (test files) → Individual Tests → Log View

Test plan

  • go build ./cmd/bkslow compiles cleanly
  • go test ./... all tests pass
  • CLI: --section drills into matching section
  • CLI: non-matching --section prints available names and errors
  • CLI: --threshold works with --section
  • TUI: entering a pytest section shows file-group view
  • TUI: entering a file group shows individual tests
  • TUI: Esc navigates back through file-group correctly

🤖 Generated with Claude Code

Expose the TUI's section drill-down capability from the CLI via a new
--section flag. This lets users drill into a group section (e.g. the
docker running command block) to see individual pytest tests, docker
steps, or shell commands without launching the TUI.

In the TUI, add an intermediate file-group view when expanding pytest
sections. Instead of jumping straight to ~200 individual tests, the TUI
now first shows test files grouped by filename with total duration and
test count, then drilling into a file shows its individual tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread cmd/bkslow/main.go
forceWaterfall bool
tuiMode bool
threshold time.Duration
section string

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we name this group?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean name the arg to something else? the section names vary job by job so it's hard to pinpoint exactly the section name

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.

2 participants