Repository navigation
fix(mobile): archive threads without the list jumping - #770
Merged
Merged
Conversation
A committed swipe carried the row back to rest and left it in place until the gateway's update, which then removed it at once. The archived counter came from the pager (debounced refetch) while its rows came from the saved cache that the same update had already changed, so the section showed "Archived · 0" over a row or "Archived · 1" over "No archived threads", and then vanished abruptly. - A committed swipe slides the row off on `quick` (fades it with reduced motion) and keeps it there; a failure or confirmation brings it back. - The archived count follows the saved rows it describes. - Every leaving entry fades while the cells below glide (layout tokens); switching to Bots skips those exits. Related: #549 Related: #423
The archive and unarchive responses carry the saved thread. When the overview stream is not live the response applies at once; otherwise it waits 2 s for the echo. It goes through the same path as a stream event (saved archive cache + overview list), so a later echo finds the row in place and moves nothing. A response whose archive state the list already shows is dropped. Related: #549
This was referenced Nov 16, 2026
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.
What jumped (Android recording, nightly)
Frames from the report, at 30 fps:
Archived · Nand "No archived threads" came from the pager, which refetches after a 100 ms debounce. Archiving showedArchived · 0over the new row. Unarchiving showedArchived · 1over "No archived threads.", and then the whole section vanished in one frame.Fix (mobile only)
ThreadArchiveSwipe: a committed swipe slides the row off onmotion.quickwithsmoothOut, and the row stays off. With reduced motion it only fades. The gateway update then removes the row, and the cells below glide into place (SidebarOrderCellLinearTransitiononfast). A failed request or a confirmation dialog brings the row back.useThreadActions.commit()returns the outcome;run()behaves as before.useArchivedThreads: the count follows the rows it describes (saved?.totalCount ?? page.totalCount). Row and counter now change in the same frame, and the section's visibility uses the same value.SettingsThreadList: every leaving entry fades out (rise.exiting). That covers active rows, the archived heading and status, and the empty state.LayoutAnimationConfig skipExitingstops those exits when the whole list unmounts (Threads/Bots switch).useSettleThread(overview): the archive/unarchive response, and the response to Undo, carries the saved thread. It applies immediately when the stream isn't live, else after 2 s without an echo. It uses the same path as a streamthreadevent (saved archive cachereconcile+ overview upsert), so a swiped row never stays an empty slot. A response whose archive state the list already shows is dropped. A later echo is a no-op:mergeArchivedThreadkeeps a known row at its index and leaves the count unchanged, and the overview upsert replaces the row in place. The pager refetch that follows returns the same rows.The web sidebar takes rows and count from the same pager state, so it was not affected and is unchanged.
Checks
bun install, mobiletypecheck,bun run lint,bun run format:check: clean.@expo/fingerprint, ios + android) compared againstorigin/dev: all source hashes are identical. Only TS sources changed; no native modules and no config-plugin changes, so this ships over OTA.Copy audit (docs/copy.md §8)
No UI text added or changed.
Related: #549
Related: #423