Skip to content

Commit 421e1c8

Browse files
feat: add Lua scripting engine support and standardize task list UI columns
- closes #53
1 parent 198e146 commit 421e1c8

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.6.5] (2026-05-12)
9+
10+
### Fixed
11+
- **Task List Alignment**: Totally separated 'tags', 'due', and 'priority' into distinct, fixed-width columns to improve UI consistency and readability. Columns now maintain their relative positions regardless of whether specific data (like due dates or tags) is present.
12+
813
## [1.6.4] (2026-05-12)
914

1015
### Fixed

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.4
1+
1.6.5

internal/lua/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (e *Engine) SetupKairoAPI(L *lua.LState) {
6161
L.SetField(kairo, "notify", L.NewFunction(e.luaNotify))
6262

6363
// Meta
64-
L.SetField(kairo, "version", lua.LString("1.6.4"))
64+
L.SetField(kairo, "version", lua.LString("1.6.5"))
6565

6666
// Set as global
6767
L.SetGlobal("kairo", kairo)

internal/ui/tasklist/model.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ func (m Model) renderRow(item TaskItem, selected bool, maxDueWidth int) string {
592592
if len(order) == 0 {
593593
order = []string{"tags", "due", "priority"}
594594
}
595+
596+
// Helper to create a container for fixed-width right-side items
597+
// Adjust widths to ensure they don't bleed or stack
595598
for _, f := range order {
596599
switch f {
597600
case "priority":
@@ -608,7 +611,6 @@ func (m Model) renderRow(item TaskItem, selected bool, maxDueWidth int) string {
608611

609612
dueContent := styles.IconDeadline + formatDue(deadText, m.DueMinimal)
610613

611-
// Create pill badge for due date
612614
badge := m.styles.BadgeMuted.
613615
Background(m.styles.Theme.Muted).
614616
Foreground(m.styles.Theme.Bg).
@@ -621,10 +623,12 @@ func (m Model) renderRow(item TaskItem, selected bool, maxDueWidth int) string {
621623
)
622624

623625
if m.DueMinimal && maxDueWidth > 0 {
624-
// container width = max content width + padding (2) + caps (2)
625626
pill = lipgloss.NewStyle().Width(maxDueWidth + 4).Align(lipgloss.Left).Render(pill)
626627
}
627628
rightParts = append(rightParts, pill)
629+
} else {
630+
// Maintain alignment even if due is missing
631+
rightParts = append(rightParts, lipgloss.NewStyle().Width(12).Render(""))
628632
}
629633
case "tags":
630634
if len(t.Tags) > 0 {
@@ -664,8 +668,15 @@ func (m Model) renderRow(item TaskItem, selected bool, maxDueWidth int) string {
664668
}
665669
}
666670

667-
right := strings.Join(rightParts, " ")
668-
671+
var right string
672+
if len(rightParts) == 0 {
673+
right = ""
674+
} else {
675+
right = rightParts[0]
676+
for i := 1; i < len(rightParts); i++ {
677+
right = lipgloss.JoinHorizontal(lipgloss.Right, right, lipgloss.NewStyle().Width(1).Render(""), rightParts[i])
678+
}
679+
}
669680
// Use render.BarLine: fills the gap between left and right with bg-styled spaces.
670681
// Subtract 2 for the Padding(0,1) applied by rowStyle below.
671682
innerWidth := m.width - 2

0 commit comments

Comments
 (0)