Skip to content

Commit c9e3a61

Browse files
committed
fix: search clear now properly resets UI
- Fixed 'c' key not resetting textInput value - Version bump to 0.3.0 Closes: Search bar persisting after clear
1 parent 4cf8e9b commit c9e3a61

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

cmd/git-scope/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/Bharath-code/git-scope/internal/tui"
1515
)
1616

17-
const version = "0.2.1"
17+
const version = "0.3.0"
1818

1919
func usage() {
2020
fmt.Fprintf(os.Stderr, `git-scope v%s — A fast TUI to see the status of all git repositories

internal/tui/update.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
153153
// Clear search and filters
154154
if m.state == StateReady {
155155
m.searchQuery = ""
156+
m.textInput.SetValue("") // Also reset the text input
156157
m.filterMode = FilterAll
157158
m.resizeTable()
158159
m.updateTable()

internal/tui/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (m Model) renderDashboard() string {
7979

8080
// Header with logo on its own line
8181
logo := lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#A78BFA")).Render("git-scope")
82-
version := lipgloss.NewStyle().Foreground(lipgloss.Color("#6B7280")).Render(" v0.2.1")
82+
version := lipgloss.NewStyle().Foreground(lipgloss.Color("#6B7280")).Render(" v0.3.0")
8383
b.WriteString(logo + version)
8484
b.WriteString("\n\n")
8585

0 commit comments

Comments
 (0)