Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ The Dashboard renders a two-level expandable tree:
- **Stack row**: navigable; expand/collapse with `enter`/`space` to show its member PR rows. Its Stoplight is the most actionable of its members', and `f` and `o` act on the first failing member so a collapsed Stack still exposes what broke.
- **PR row**: navigable; expand/collapse with `enter`/`space` to show that PR's Workflow runs. A PR inside a Stack renders one level deeper and carries its `position/size`. A Review glyph follows the PR number when there is a Review signal.

Expansion and the cursor stay attached to what a row shows — the Repo by name, a Stack or PR by its number — so they survive PRs opening and closing, config reloads and active-first re-sorting.

_Avoid_: detail view, drill-down screen

## Polling
Expand Down
7 changes: 3 additions & 4 deletions internal/ui/autoexpand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func pr(n int, light aggregator.Stoplight) state.PRState {
return state.PRState{Number: n, Title: "pr", Stoplight: light}
}

func isOpen(d Dashboard, name string) bool { return d.repoExp["o/"+name] }
func isOpen(d Dashboard, name string) bool { return d.tree.expanded[repoKey("o/"+name)] }

func TestAutoExpandOpensActiveAndFailingRepos(t *testing.T) {
d := NewDashboard(state.New(nil))
Expand Down Expand Up @@ -84,8 +84,7 @@ func TestAutoExpandKeepsCursorOnSelectedRepo(t *testing.T) {
repoState("a", aggregator.StoplightRed, pr(1, aggregator.StoplightRed), pr(2, aggregator.StoplightRed)),
repoState("b", aggregator.StoplightGreen),
}))
row := d.rows[d.cursor]
if row.kind != kindRepo || d.snapshot.Repos[row.repoIdx].Name != "b" {
t.Errorf("cursor moved off repo b to %+v", row)
if n, _ := d.tree.selected(); n.key != repoKey("o/b") {
t.Errorf("cursor moved off repo b to %+v", n.key)
}
}
Loading
Loading