Skip to content

Conversation

@andrinoff
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 5, 2026 09:36
@andrinoff andrinoff merged commit 8f5d593 into floatpane:master Jan 5, 2026
3 checks passed
@andrinoff andrinoff deleted the feat/forced-refresh branch January 5, 2026 09:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a force-refresh feature to the inbox view, allowing users to manually trigger an email refresh by pressing the 'r' key. The implementation follows the existing message-passing pattern used for other inbox actions and includes minor code formatting improvements.

Key Changes:

  • Adds RequestRefreshMsg message type to handle user-initiated refresh requests
  • Implements 'r' keybinding in the inbox view that triggers a refresh operation
  • Integrates refresh message handling in the main model to coordinate the refresh flow

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tui/messages.go Defines new RequestRefreshMsg struct and applies formatting fixes to RefreshingEmailsMsg and spacing cleanup
tui/inbox.go Adds 'r' keybinding to inbox help text and implements keypress handler that emits RequestRefreshMsg
main.go Handles RequestRefreshMsg by batching refresh state notification and email fetch operation; includes code alignment fixes
Comments suppressed due to low confidence (2)

main.go:1462

  • File handle may be writable as a result of data flow from a call to OpenFile and closing it may result in data loss upon failure, which is not handled explicitly.
		out.Close()

main.go:1466

  • File handle may be writable as a result of data flow from a call to OpenFile and closing it may result in data loss upon failure, which is not handled explicitly.
	out.Close()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +305 to +308
case "r":
return m, func() tea.Msg {
return RequestRefreshMsg{Mailbox: m.mailbox}
}
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new refresh keybinding functionality lacks test coverage. Similar keybindings like 'd' (delete) and 'a' (archive) have dedicated test cases in inbox_test.go. Consider adding a test case to verify that pressing 'r' produces a RequestRefreshMsg with the correct mailbox value.

Copilot uses AI. Check for mistakes.
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.

1 participant