Skip to content

Commit 42f3bfd

Browse files
darkswormclaude
andcommitted
feat: simplify no-diff modal interaction
- Remove hint text for cleaner appearance - Allow any key press to dismiss modal - Improve user experience with more intuitive dismissal 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 777e2a2 commit 42f3bfd

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

cmd/app/input_handlers.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -401,22 +401,8 @@ func (m *Model) handleHelpModeKeys(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
401401

402402
// handleNoDiffModeKeys handles input when in no-diff modal mode
403403
func (m *Model) handleNoDiffModeKeys(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
404-
switch msg.String() {
405-
case "esc":
406-
// Use debounce for esc key to prevent rapid dismissals
407-
now := time.Now().UnixMilli()
408-
const ESCAPE_DEBOUNCE_MS = 100
409-
if now-m.state.Navigation.LastEscPressed < ESCAPE_DEBOUNCE_MS {
410-
return m, nil // Too soon, ignore
411-
}
412-
m.state.Navigation.LastEscPressed = now
413-
m.state.Mode = model.ModeNormal
414-
return m, nil
415-
case "q":
416-
// q key closes the modal immediately
417-
m.state.Mode = model.ModeNormal
418-
return m, nil
419-
}
404+
// Any key press closes the modal
405+
m.state.Mode = model.ModeNormal
420406
return m, nil
421407
}
422408

cmd/app/view_modals.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,7 @@ func (m *Model) renderUpgradeSuccessModal() string {
487487
// renderNoDiffModal renders a simple modal for when there are no differences
488488
func (m *Model) renderNoDiffModal() string {
489489
msg := "✓ " + statusStyle.Render("No differences found")
490-
hint := lipgloss.NewStyle().Foreground(dimColor).Render("Esc or q to close")
491-
content := msg + "\n" + hint
490+
content := msg
492491
wrapper := lipgloss.NewStyle().
493492
Border(lipgloss.RoundedBorder()).
494493
BorderForeground(syncedColor).

0 commit comments

Comments
 (0)