refactor(office): generalize DataTable layout and document TUI table skill
Unify project/user flex column layout into layoutFlexTable with per-subject policy in model. Add office-tui-table skill and AGENTS notes; fix CI go mod tidy drift and test matrix Go version to match go.mod 1.25. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
// TableFlexLayout describes a list table where every column stays visible and
|
||||
// one flex column absorbs leftover pane width.
|
||||
type TableFlexLayout struct {
|
||||
FlexColumnKey string
|
||||
MinFlexWidth int
|
||||
}
|
||||
|
||||
// TableFlexLayoutFor returns a flex layout policy for subjects that show all columns.
|
||||
func TableFlexLayoutFor(subject Subject) (TableFlexLayout, bool) {
|
||||
switch subject {
|
||||
case SubjectProjects:
|
||||
return TableFlexLayout{FlexColumnKey: "title", MinFlexWidth: 12}, true
|
||||
case SubjectUsers:
|
||||
return TableFlexLayout{FlexColumnKey: "email", MinFlexWidth: 16}, true
|
||||
default:
|
||||
return TableFlexLayout{}, false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user