feat(tests): add comprehensive test suite, update deps and Go 1.26.1

- Add 20+ tests for utility functions, SharedData, and Model
- Tests cover: LoadTables, LoadTableData, UpdateCell, pagination,
  table inference, focus/blur, empty database, invalid indices
- Update Go to 1.26.1, upgrade all dependencies
- Replace custom Min/Max with Go builtin min/max
- Format all files with goimports
- Add staticcheck to CI workflow
This commit is contained in:
2026-03-13 02:46:03 +00:00
parent 7913b17d74
commit aa4c97c553
15 changed files with 581 additions and 169 deletions

View File

@@ -4,9 +4,9 @@ import (
"fmt"
"strings"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/bubbles/help"
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
)
type RowDetailModel struct {
@@ -171,7 +171,7 @@ func (m *RowDetailModel) View() string {
if availableWidth < 20 {
availableWidth = 20 // Minimum width
}
if len(value) > availableWidth {
// Wrap long values
lines := WrapText(value, availableWidth)
@@ -195,4 +195,4 @@ func (m *RowDetailModel) View() string {
}
return content.String()
}
}