fix: harden mail thread navigation - #441
Conversation
Add explicit close/back and next/previous controls to the mail thread view, keep mailbox navigation state stable across routes, and avoid render-time thread side effects that can cause inconsistent dates or route crashes.
krokhale
left a comment
There was a problem hiding this comment.
This looks great, but when i view a thread on your branch, I am getting a SQL error on this branch: the-luap/paul/thread-navigation-safe-routes
You are probably passing one field as a DB timestamp/string and another as a JS Date/string.
Or we could skip the date/time stuff for now (something in future or another PR) while the rest looks good.
Keep the explicit thread close/back controls but drop adjacent-thread date/time lookup from this PR so the timestamp comparison can be handled separately.
|
Thanks for checking it. I removed the adjacent-thread timestamp query from this PR in commit 9814d92, so the date/time ordering issue is out of scope here now.\n\nThe PR keeps the explicit Close / Back to list controls and leaves Previous / Next as disabled placeholders. We can handle adjacent-thread ordering in a smaller follow-up PR once the timestamp typing is nailed down. |

Summary
This PR hardens the mailbox thread/detail navigation flow and adds explicit controls for returning to the list.
It addresses the areas discussed in:
Changes
ThreadNavigationControlscomponent with:Escto return to the listFollow-up
The adjacent-thread previous/next timestamp query has been removed from this PR after review feedback. That date/time ordering logic can be handled separately in a smaller follow-up PR.
Screenshot
Sensitive mailbox/account names, sender/recipient data, subject, and message content are redacted.
Verification
git diff --check upstream/main...HEADpasses.pnpm install --frozen-lockfilepasses.pnpm --filter @kurrier/web exec tsc --noEmit --pretty falsecurrently reports pre-existing upstream errors unrelated to this diff:ComposeMailcallers missingidentityMailboxesin files unchanged by this PR.components/ui/sonner.tsxCSSProperties type mismatch in a file unchanged by this PR.pnpm --filter @kurrier/web lintcurrently reports existing Biome formatting/style diagnostics across the app, including files not touched by this PR.