Repository navigation
Conversation
hieunc229
force-pushed
the
fix/focused-archive-list-refresh
branch
from
November 18, 2026 16:52
5dc93ec to
dec1fa8
Compare
Owner
|
I see this is still a draft, should we merge it? |
Contributor
Author
|
Yes, made it draft because it was stacked pr on top of another. Let me get it rebased and will ping you |
Opening a message unmounted the folder list and let MessageSplitLayout render a separate compact copy beside the reader. Archiving then cleared the list cache and navigated back to the folder, where a freshly mounted list painted an empty first frame until its request returned. Move list ownership into the shared folder layout so it survives the index <-> message route change. The layout now renders one list that expands to full width when no message is open and hides (without unmounting) while reading. Message details remain owned by the route. The index pages now render nothing; their layout supplies the list. Add reconciliation tests asserting the same list DOM node survives opening and closing a message, including single-column reading.
A successful move cleared the list cache and waited for the debounced refetch, so the moved row lingered until the response landed. Emit the committed per-message state from the shared action executor and prune the mounted list in place. Membership mirrors the server query: Starred ignores status changes, custom folders ignore snooze, and same-status moves are no-ops. Direction-dependent optimistic decisions wait for the committed state on grouped rows, whose members may mix directions. Conversation rows keep their representative until the refetch and disappear only after their last scoped member. An optimistically emptied intermediate page now waits for backfill instead of skipping it. Permanent delete reports the same removal event. Covered by delayed-response, stale-response, thread, Starred, custom-folder, Snoozed, duplicate-event, and grouped-member tests.
Moves now disappear before the refetch and return before the undo response, while the server remains the authority for reconciliation. The executor computes the target membership before the request. A membership store carries compact known rows, a pending overlay, and tombstones keyed by list identity and page. Grouped rows defer direction-dependent actions (spam, snooze) until the committed response carries per-member state, because a representative's direction says nothing about its peers. Undo overlays only the fields the action changed and restores tombstones from the same page. Skipped or failed records roll back to the membership captured on screen before the click, never to a historical applied snapshot. A failed undo keeps its tombstone so a retry still restores instantly after navigating away and back. Read/star settlements no longer touch move tombstones. Optimistic events stay in the originating tab; other tabs receive the committed state and refetch. List ingress derives rows and totals from the raw cached response, so repeated peeks and remounts cannot consume restoration once. Covered by real-hook and real-executor tests for delayed requests, in-flight list ingress, failure rollback, undo before the server answer, repeated ingress, remounts, partial undo, sequential conversation removals, StrictMode, and read/star settlements.
…ter rebase - Sync the list ref in an effect instead of during render (lint). - Let list refreshes reject again so the refresh button can announce failures; the list is already preserved by only applying successful loads. This also fixes the pre-existing refresh-failure test on main. - Include ok/status in mocked list responses so fetchMessageList no longer treats them as errors.
antonio-ivanovski
force-pushed
the
fix/focused-archive-list-refresh
branch
from
November 18, 2026 17:52
dec1fa8 to
c1c4bd3
Compare
antonio-ivanovski
marked this pull request as ready for review
November 18, 2026 17:53
Contributor
Author
|
done @hieunc229 |
Owner
|
Thank you! |
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.
Goal
Archiving the focused message must not remount, blank, or visibly refresh the folder list.
What changed
Proof
The before/after recording is below. The list request is delayed by 4 seconds in both clips:
focused-archive-before-after.mp4
0 - 0 of 0until the request resolves.1 - 4 of 4while the request is held.Testing
node --test tests/*.test.mjs— 798 tests, 789 pass, same 7 pre-existing failures asmain.tsc --noEmit— clean.tests/message-membership-overlay.test.mjs,tests/message-list-optimistic-removal.test.mjs,tests/message-list-membership.test.mjs, and the list-DOM identity cases intests/message-selection-navigation.test.mjs.