[TW-6425] fix(@ownmail/app): restore mailbox rendering and draft isolation - #267
Merged
Merged
Conversation
AaronDDM
approved these changes
Aug 13, 2026
AaronDDM
marked this pull request as ready for review
August 13, 2026 17:06
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@ownmail/apppatch changesetRoot cause
PR #265 moved
OwnmailQueryProviderfrom the root route into TanStack Router's outerWrap. The provider rendersServerStateSync, which callsuseRouterState. OuterWrapis aboveRouterContextProvider, so SSR received a null router and failed while readingrouter.stores.The change passed because the provider unit tests mocked
useRouterState, the router test did not render the provider boundary, and the release smoke test covered packaging rather than a built authenticated SSR request.The compose backdrop had a separate same-route identity issue: selecting another draft reused the existing
Composeinstance, leaving draft-owned state and refs initialized from the previous loader result.Previously opened drafts had a cache freshness issue as well: mail-version sync invalidated inactive draft details, but
ensureQueryDatareturned the cached value without awaiting a refetch. Because compose did not subscribe to that query afterward, stale content could initialize the editor and overwrite a newer server version.Impact
Authenticated mailbox pages render again instead of returning HTTP 500. Switching between backdrop drafts cannot mix draft identity or metadata, and reopening an externally changed draft initializes from the current server version.
Validation
pnpm --filter @ownmail/app test— 1,897 tests passed, 100% coveragepnpm --filter @ownmail/app typecheckpnpm --filter @ownmail/app build:nodepnpm --filter @ownmail/app smoke:ssrpnpm lint— 0 warningspnpm commit:check -- .git/COMMIT_EDITMSGJira: TW-6425