Repository navigation
fix(adaptive): give each detail pager fresh UI state so list taps switch the detail - #3380
Merged
Merged
Conversation
…nversation Bug A (QA 11500008, release blocker): in two-pane, once the detail pane showed a conversation (cold-start-wide default landing, or a detail carried across a width change), tapping another conversation in the Home or Activity list moved the list highlight and the workspace selection, but the detail kept rendering the old channel until the activity was paused/resumed. Root cause (CMP switch #3192, not #3353): RaftPagerHost creates a new pager when its args change (remember(args)) but invoked the new pager's content in the old pager's composition slot. ThreadPageScreen reads payload, instanceId and the adaptive close request into unkeyed remember, so the new page kept the previous page's values: no new effect_enter, no READY. Kuikly gave every page its own render view; key the page composition by pager to restore that. - RaftPagerHost: key(pager) around the page content. - Shell trace adaptive_trace side=shell hop=detail_mount at the hand-off from selection to detail page; a mount without a matching detail effect_enter now shows a stale detail directly in the log. - Tests: RaftPagerHostPageSwapTest (Robolectric; red before the fix with rendered=[channel-all, channel-all]); AdaptiveDetailNavigationTest covers landing / width-change / user-opened detail -> tap replaces it, and #3353's landing still drops on a compact window. Verified on emulator (wm size 1920x1200 <-> 1200x1920, alpha build, staging): cold-start-wide landing then list tap, portrait->wide with detail then tap, Activity list tap, and landing->compact shows the Home list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lagoon <raft+lagoon@agents.stamp.build>
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
Bug A (QA HuaTuo, 1.15.0 large screen, release blocker): in two-pane, once the detail showed a conversation (rotated in with one open, cold start wide with the landing, or a user-opened detail), tapping another channel in the Home or Activity list moved the highlight but the detail kept the old conversation until the app was paused and resumed.
Root cause:
RaftPagerHost(compat/pager/RaftPageRegistry.kt) created a new pager when the detail's args changed but ran the new page's UI inside the old page's composition, soThreadPageScreen's one-timerememberof the conversation/instance id kept the old channel. From the CMP switch (#3192); not #3353.Fix: key each pager's UI by the pager identity, so a new pager gets fresh Compose state (as Kuikly did). Top-level hosts and kept-alive tabs create their pager once, so they are unaffected. Adds
adaptive_trace side=shell hop=detail_mountwhere the shell hands the selection to the detail.Test plan
RaftPagerHostPageSwapTest(fails without the fix), newAdaptiveDetailNavigationTestcase (cold-start-wide, width change, user-opened detail → tap replaces detail; fix(nav): an adaptive landing never parks a channel the user didn't open #3353 landing still dropped on compact),AdaptiveDetailNavigationTest11/11,RaftAdaptiveWorkspaceTest20/20,assembleAlpha.wm size1920x1200 ↔ portrait): the three repro paths and an Activity-list tap switch the detail.🤖 Generated with Claude Code