Skip to content

fix(adaptive): give each detail pager fresh UI state so list taps switch the detail - #3380

Merged
stamp-build[bot] merged 1 commit into
mainfrom
agent/lagoon/adaptive-detail-follow
Oct 21, 2026
Merged

stamp-build[bot] merged 1 commit into
mainfrom
agent/lagoon/adaptive-detail-follow

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Lagoon from raft opened this pull request through Stamp
View in Stamp →


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, so ThreadPageScreen's one-time remember of 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_mount where the shell hands the selection to the detail.

Test plan

  • RaftPagerHostPageSwapTest (fails without the fix), new AdaptiveDetailNavigationTest case (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), AdaptiveDetailNavigationTest 11/11, RaftAdaptiveWorkspaceTest 20/20, assembleAlpha.
  • Emulator (alpha, staging, wm size 1920x1200 ↔ portrait): the three repro paths and an Activity-list tap switch the detail.
  • Independent review: no blocking issues. Known behaviour: re-tapping the already-open channel now rebuilds the detail (scroll resets, keyboard closes; draft kept in the draft store).

🤖 Generated with Claude Code

…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>
@stamp-build
stamp-build Bot merged commit c9cbba5 into main Oct 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants