Skip to content

feat(checks): collapsible sub-sections for CI checks by category#116

Merged
actionshrimp merged 1 commit intomainfrom
feature/collapsible-checks-sub-sections
Feb 24, 2026
Merged

feat(checks): collapsible sub-sections for CI checks by category#116
actionshrimp merged 1 commit intomainfrom
feature/collapsible-checks-sub-sections

Conversation

@actionshrimp
Copy link
Owner

Summary

  • When a CI check category (failed, in_progress, successful, pending, skipped) has more than 5 checks, groups them into a collapsible sub-section with an indented header line
  • Categories with ≤5 checks render flat (unchanged behavior)
  • <Tab> on a sub-section header toggles just that category; <Tab> on the main Checks header still toggles the entire section
  • gj/gk navigate to sub-section headers as well as individual checks
  • Categories render in priority order: failed → in_progress → successful → pending → skipped

Files changed

  • lua/gitlad/ui/components/checks.luaclassify_check(), category-based bucketing, sub-section rendering + highlights
  • lua/gitlad/ui/views/pr_detail.luachecks_sub_collapsed state, toggle logic, nav targets
  • lua/gitlad/ui/components/comment.lua — passthrough of sub-collapsed state + highlight delegation
  • tests/unit/test_checks_component.lua — 14 new tests (classify, sub-section threshold, collapse, ordering, ranges)
  • tests/e2e/test_pr_detail.lua — 3 new tests (sub-section header appears, Tab toggles, gj/gk navigates)
  • tests/fixtures/github/pr_detail_many_checks.json — fixture with 9 checks (7 successful, 2 failed)

Test plan

  • make test-file FILE=tests/unit/test_checks_component.lua — 29 tests pass
  • make test-file FILE=tests/e2e/test_pr_detail.lua — 22 tests pass
  • make test — full suite green (1555 unit + 631 e2e)
  • make lint — clean

When a status category (failed, in_progress, successful, pending,
skipped) has more than 5 checks, group them into a collapsible
sub-section with an indented header. Categories with ≤5 checks
render flat as before. Tab on a sub-section header toggles just
that category; gj/gk navigate to sub-section headers.
@actionshrimp actionshrimp merged commit f9d8160 into main Feb 24, 2026
3 checks passed
@actionshrimp actionshrimp deleted the feature/collapsible-checks-sub-sections branch February 24, 2026 11:08
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