Skip to content

fix(tui): navigate back to correct screen from entry detail - #20

Merged
chris-regnier merged 2 commits into
mainfrom
feature/context-aware-jot
Feb 28, 2026
Merged

fix(tui): navigate back to correct screen from entry detail#20
chris-regnier merged 2 commits into
mainfrom
feature/context-aware-jot

Conversation

@chris-regnier

Copy link
Copy Markdown
Owner

Summary

  • Fix nil pointer panic when pressing esc/backspace from entry detail that was entered from the today screen
  • loadEntryDetail now saves prevScreen before transitioning, and the esc handler navigates back to the correct origin screen instead of hardcoded screenDayDetail

Root cause

updateEntryDetail always set m.screen = screenDayDetail and called m.dayList.SetSize(...) on esc. If entry detail was reached from screenToday, dayList was never initialized, causing a nil pointer dereference in list.(*Model).updatePagination.

Test plan

  • All UI tests pass (go test ./internal/ui/)
  • Build succeeds (go build ./...)
  • Gavel analysis clean

🤖 Generated with Claude Code

chris-regnier and others added 2 commits February 28, 2026 08:18
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
loadEntryDetail was not saving prevScreen before transitioning to
screenEntryDetail. Pressing esc/backspace always went to screenDayDetail
and tried to resize dayList, which panicked with a nil pointer if entry
detail was entered from the today screen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread internal/ui/picker.go Dismissed
@chris-regnier
chris-regnier merged commit 2cfa56d into main Feb 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants