Skip to content

fix(mobile): preserve chat rows when toggling commands - #10492

Merged
juliusmarminge merged 1 commit into
mainfrom
t3code/fix-legend-list-rerender
Sep 7, 2026
Merged

fix(mobile): preserve chat rows when toggling commands#10492
juliusmarminge merged 1 commit into
mainfrom
t3code/fix-legend-list-rerender

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 7, 2026

Copy link
Copy Markdown
Member

Expanding a command can briefly blank the entire mobile conversation and remount unrelated messages. This regressed in #10449, merged September 6 at 10:24 p.m. Pacific, when itemLayoutAnimation started switching between a transition and undefined. LegendList uses that presence to select its position and size component types, so a disclosure can replace the containers around the feed and replay row entrance animations.

Keep a zero-duration transition installed outside disclosure changes. The component types stay stable, ordinary updates remain immediate, and disclosures retain their existing transition.

Verified on an iOS 26.5 simulator with disposable showcase data. Expanding the same command remounted all five rendered rows on the base, including the unchanged user message and assistant answer; with this fix it remounted none. Temporary mount instrumentation was removed before the evidence captures. Repeated group and individual command expansion/collapse passed. Android shares this component but was not exercised separately.

Mobile typecheck, targeted lint and formatting passed. Lint reports existing warnings. All 29 tests in thread-feed-live-follow.test.ts and pending-thread-feed.test.ts passed.

Before: feed disappears during command expansion After: conversation stays visible
Before: blank mobile conversation After: command expands without clearing the feed

Recording, before on the left and after on the right:

Before/after command expansion recording

Model: GPT-6. Harness: Codex.

Note

Preserve ThreadFeed row layout animation when toggling commands

  • Adds THREAD_FEED_IMMEDIATE_TRANSITION, a zero-duration LinearTransition, to keep the LegendList item layout animation container mounted during ordinary feed updates.
  • itemLayoutAnimation now uses the timed disclosure transition while disclosure is settling, and the zero-duration transition otherwise. Previously the prop became undefined outside disclosure settling, causing LegendList to swap component types, remount the feed, and replay row entrances.
  • Risk: callers relying on the animation prop being undefined outside disclosure settling will see a zero-duration transition object instead.

Macroscope summarized a34b15c.

Summary by CodeRabbit

  • Bug Fixes
    • Improved thread feed updates by ensuring ordinary list changes appear immediately, while disclosure-related changes retain their existing animation behavior.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 7, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at a34b15c

Macroscope's review found this PR approvable — This is a narrowly scoped mobile UI bug fix that stabilizes the LegendList animation configuration to preserve existing chat rows while retaining the intended disclosure animation. It introduces no new capability, schema change, product-default change, or static-analysis suppression.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge
juliusmarminge merged commit dc39615 into main Sep 7, 2026
21 of 22 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/fix-legend-list-rerender branch September 7, 2026 10:06
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB −5 B (−0.0%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB +1 B (+0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB −6 B (−0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 57.1 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 10 10 0 (0.0%) 21
Claude Total thread wire 13.5 KiB 13.6 KiB +52 B (+0.4%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB 0 B (0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB +52 B (+0.8%) 7.8 KiB
Claude Live turn WebSocket decoded 57.8 KiB 57.9 KiB +88 B (+0.1%) 66.4 KiB
Claude Live turn messages 8 10 +2 (+25.0%) 21

Baseline: b717537 · PR result: a34b15c · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 62076ec6-2956-4dd7-b3b0-3337d429360a

📥 Commits

Reviewing files that changed from the base of the PR and between b717537 and a34b15c.

📒 Files selected for processing (1)
  • apps/mobile/src/features/threads/ThreadFeed.tsx

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Walkthrough

Walkthrough

The thread feed now applies a zero-duration LinearTransition to ordinary LegendList updates. Disclosure settling continues to use the existing animated transition.

Changes

Thread feed transitions

Layer / File(s) Summary
Explicit item layout transitions
apps/mobile/src/features/threads/ThreadFeed.tsx
Adds THREAD_FEED_IMMEDIATE_TRANSITION and applies it to ordinary updates. Disclosure settling continues to use THREAD_FEED_LAYOUT_TRANSITION.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to a34b1

Thread-feed updates now keep a stable immediate layout transition outside disclosure changes, preventing mobile conversation blanking and remounting while preserving disclosure animations. No current merge-blocking risk is identified.

Suggested reviewers: sunkenintime, t3dotgg, maria-rcks

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: preserving mobile chat rows when users toggle commands.
Description check ✅ Passed The description explains the problem, root cause, fix, verification steps, test results, UI impact, screenshots, and recording. It does not use the template headings or checklist format, but it provid…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/fix-legend-list-rerender

Comment @coderabbitai help to get the list of available commands.

github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 7, 2026
## What's Changed
* fix(mobile): keep pending messages in the chat timeline by @juliusmarminge in pingdotgg/t3code#10449
* fix(mobile): show connection status in the floating pill instead of a second one by @juliusmarminge in pingdotgg/t3code#10440
* fix: use Pierre icons consistently for attachments by @juliusmarminge in pingdotgg/t3code#10475
* feat(mobile): open the thread screen as soon as a new task is submitted by @juliusmarminge in pingdotgg/t3code#10435
* fix(devcontainer): make repository setup work by @saphid in pingdotgg/t3code#7875
* fix(projects): prevent invalid script IDs from crashing threads by @saphid in pingdotgg/t3code#10019
* fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback by @lnieuwenhuis in pingdotgg/t3code#9828
* fix(ios): scroll short source files from blank space by @juliusmarminge in pingdotgg/t3code#10178
* feat(mobile): start a new thread on an existing branch by @StiensWout in pingdotgg/t3code#10359
* fix(mobile): improve font-size slider performance and prevent maximum update depth errors by @bbernag in pingdotgg/t3code#7138
* fix(web): keep composer toolbar controls anchored during transitions by @juliusmarminge in pingdotgg/t3code#10478
* fix(web): resize the floating preview from any edge by @juliusmarminge in pingdotgg/t3code#10467
* fix(mobile): prevent chat from disappearing when scrolling by @juliusmarminge in pingdotgg/t3code#10479
* fix(mobile): smooth composer status pill resizing by @juliusmarminge in pingdotgg/t3code#10484
* fix(mobile): release initial scroll target after dragging by @juliusmarminge in pingdotgg/t3code#10483
* fix(mobile): animate thread lifecycle transitions consistently by @juliusmarminge in pingdotgg/t3code#10487
* fix(mobile): restore assistant message bottom padding by @juliusmarminge in pingdotgg/t3code#10491
* fix(mobile): preserve chat rows when toggling commands by @juliusmarminge in pingdotgg/t3code#10492

## New Contributors
* @bbernag made their first contribution in pingdotgg/t3code#7138

**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260907.1332...v0.0.40-nightly.20260907.1346

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.40-nightly.20260907.1346
raman325 added a commit to raman325/t3code that referenced this pull request Sep 7, 2026
* origin/main: (675 commits)
  fix(web): tolerate servers that predate git identity in project import (pingdotgg#10547)
  chore(mobile): bump app version to 1.1.0
  fix(mobile): wait for native thread scroll before reveal (pingdotgg#10486)
  fix(mobile): match Working status color to desktop
  fix(web): remove inserted citations on cancel (pingdotgg#10518)
  feat(web): group onboarding project import by repository (pingdotgg#10493)
  fix(mobile): preserve chat rows when toggling commands (pingdotgg#10492)
  fix(mobile): restore assistant message bottom padding (pingdotgg#10491)
  fix(mobile): animate thread lifecycle transitions consistently (pingdotgg#10487)
  fix(mobile): release initial scroll target after dragging (pingdotgg#10483)
  fix(mobile): smooth composer status pill resizing (pingdotgg#10484)
  fix(mobile): prevent chat from disappearing when scrolling (pingdotgg#10479)
  fix(web): resize the floating preview from any edge (pingdotgg#10467)
  fix(web): keep composer toolbar controls anchored during transitions (pingdotgg#10478)
  fix(mobile): improve font-size slider performance and prevent maximum update depth errors (pingdotgg#7138)
  feat(mobile): start a new thread on an existing branch (pingdotgg#10359)
  fix(ios): scroll short source files from blank space (pingdotgg#10178)
  fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback (pingdotgg#9828)
  fix(projects): prevent invalid script IDs from crashing threads (pingdotgg#10019)
  fix(devcontainer): make repository setup work (pingdotgg#7875)
  ...

# Conflicts:
#	apps/server/src/provider/builtInDrivers.ts
#	docs/README.md
#	docs/user/install.md
#	packages/contracts/src/settings.test.ts
#	packages/contracts/src/settings.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant