Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor FilterableList: centralize header, footer, and column width#244

Merged
clangenb merged 1 commit into
mainfrom
refactor/filterable-list-header-footer
Feb 19, 2026
Merged

Refactor FilterableList: centralize header, footer, and column width#244
clangenb merged 1 commit into
mainfrom
refactor/filterable-list-header-footer

Conversation

@eldara-cruncher
Copy link
Copy Markdown
Collaborator

@eldara-cruncher eldara-cruncher commented Feb 19, 2026

Summary

  • Add HeaderConfig, FooterConfig, and ColumnDef types to FilterableList with RenderHeader(), RenderFooter(), RenderFramedView(), and ColWidths() methods
  • Migrate all 7 views (nodes, stacks, secrets, configs, networks, contexts, services) to the new API, removing ~600 lines of duplicated header/footer/frame boilerplate
  • Add nil-slice hardening for loading states (ensureCursorVisible, RenderFooter empty-list guard)
  • Add 26 unit tests covering column computation, header/footer rendering, nil-safety, and integration

Closes #150, closes #151, closes #179.

Test plan

  • go build ./... passes
  • go test -race -count=1 ./... — all tests pass (including 26 new FilterableList tests)
  • golangci-lint run ./... — 0 issues
  • Manual smoke test: verify header/footer rendering across all views
  • Manual smoke test: verify dialog overlays still render correctly
  • Manual smoke test: verify sort arrows update when toggling sort

🤖 Generated with Claude Code

…150, #151, #179)

Move header rendering, footer rendering, column width computation, and
frame construction into FilterableList, eliminating ~600 lines of
duplicated boilerplate across all 7 views. Add nil-slice hardening for
loading states and 26 unit tests for the new API.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy link
Copy Markdown
Collaborator

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

This is a pure technical PR. I reviewed and tested the functionality and it works.

@clangenb clangenb merged commit 19f9bba into main Feb 19, 2026
14 of 17 checks passed
@eldara-cruncher eldara-cruncher deleted the refactor/filterable-list-header-footer branch June 5, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants