Skip to content

Fix quit hang during sync, f-forward attachments, keybindings.csv - #105

Merged
allisonhere merged 1 commit into
mainfrom
fix/forward-attachments-and-keys
Nov 9, 2026
Merged

allisonhere merged 1 commit into
mainfrom
fix/forward-attachments-and-keys

Conversation

@allisonhere

Copy link
Copy Markdown
Owner

Three bugs found while live-testing the whole app on two real accounts (custom IMAP and Gmail).

Quit hangs while a sync is running

"Sync all" queues one fetch per folder on each account's session. On quit, SessionPool.Close waited behind every queued op, and each one reconnected and ran. With a Gmail account's labels, quitting right after F hung every time.

  • SessionPool.Close now sets a closed flag first. Queued ops return ErrPoolClosed without running or dialing, both when they get the lock and again just before fn runs.
  • interrupt() now closes the raw TCP connection after setting the deadline. go-imap resets the read deadline around every response, so the deadline alone did not stop an op that was mid-read.

Live: 0 hangs in 6 quit-mid-sync runs (it hung 6/6 before).

f forward dropped attachments

Only Forward from the command palette or the right-click menu loaded stored attachments. The f key now goes through the same forwardSource helper. Live: a forward sent with f arrived with its attachment.

keybindings.csv

Paste was listed as ctrl+p and attach file as ctrl+a. The real keys (keys.go, the in-app help, the guide) are ctrl+v and alt+f.

Tests

  • TestSessionPoolCloseInterruptsOpThatResetsDeadline: failed before the interrupt change.
  • TestSessionPoolCloseSkipsQueuedOps: fails with the closed checks removed.
  • TestForwardKeyCarriesStoredAttachments: covers f from the list and from the reader; fails without the fix.
  • go test ./..., the race tests and go vet ./... pass.

Docs

CHANGELOG entries added under Unreleased → Fixed. docs/guide.md already says a forward keeps attachments, and the help text was already correct, so neither needed changes.

🤖 Generated with Claude Code

- Quitting while a sync was running could hang forever. SessionPool.Close
  now marks the pool closed so queued operations return ErrPoolClosed
  instead of reconnecting, and interrupt() closes the raw TCP connection
  because go-imap resets the read deadline between responses.
- Forwarding with the f key dropped attachments; it now loads stored
  attachments the same way the palette and context-menu Forward do.
- keybindings.csv listed paste as ctrl+p and attach file as ctrl+a; the
  real keys are ctrl+v and alt+f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@allisonhere
allisonhere merged commit 63d4d5d into main Nov 9, 2026
2 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.

1 participant