Skip to content

fix(mobile): Browser page no longer logs a duplicate key warning - #18776

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
tris203:t3/mobile-browser-duplicate-key
Oct 13, 2026
Merged

maria-rcks merged 1 commit into
pingdotgg:mainfrom
tris203:t3/mobile-browser-duplicate-key

Conversation

@tris203

@tris203 tris203 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Problem

On the mobile Browser page, BrowserAddressBar and PreviewStreamWebView are siblings in the same fragment and both use key={tab.tabId}. React requires keys to be unique among siblings, so every dev render with a tab logs:

Encountered two children with the same key, tab_2_…. Keys should be unique so that components maintain their identity across updates.

On Android dev builds this shows as a red toast over the page as soon as the Browser page opens. It has been there since the page was added in #15328.

Expected: opening the Browser page logs no key warning.

Change

Prefix the two keys so they are unique among siblings: address:${tab.tabId} and stream:${tab.tabId}. Both still change with the tab id, so switching tabs remounts the address bar (dropping a half-typed URL) and the stream view exactly as before. Two lines in apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsx; nothing else in apps/mobile/src/features/browser/ has two siblings sharing a key.

Scope and approval

No prior issue or discussion: this is a very small, focused fix for an obvious bug. Two siblings sharing a key is a React usage error with a deterministic warning, the fix is a key rename, and it changes no product behavior.

Verification

Environment: Android emulator (Pixel 9, API 37) running the dev client against Metro from this branch, paired to an isolated dev server. One thread with two server browser tabs (https://example.com/ and https://www.iana.org/help/example-domains).

Steps: open the thread, tap "2 tabs open" to open the Browser page.

  • Before (the two key lines reverted to main): the toast appears, and adb logcat -s ReactNativeJS shows Encountered two children with the same key three times for the selected tab's id.
  • After (this branch, app relaunched): no toast, and logcat has zero same key lines after opening the page.
  • Tab switch, after: choosing the other tab from the Tabs menu switches the title, address bar and stream to https://example.com/, still with zero same key lines.
Before After After, switched tab
Before: duplicate key toast over the Browser page After: Browser page with no toast After: other tab selected, no toast

Checks run: pnpm exec tsc --noEmit in apps/mobile, vp lint apps/mobile/src/features/browser, and vp fmt --check apps/mobile/src/features/browser, all passing. Lint reports one existing unused-import warning for FILL_PREVIEW_VIEWPORT in this file, which this PR leaves alone.

Not checked: iOS. The warning comes from React's reconciler, so it is not platform-specific, but only Android was run. No test added, since a test for a key rename would only mirror the implementation.

Claude Opus 5.5 in Claude Code, running in T3 Code.

@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 Oct 12, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 12, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at d3d6ff9

Macroscope's review found this PR approvable — This is a focused two-line React key fix that makes sibling keys unique while preserving tab-switch remount behavior. It has no broader runtime, schema, deployment, product-default, or static-analysis impact.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

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

The address bar and the stream view are siblings in the same fragment and
both used the tab id as their key, so React warned about two children with
the same key every time the page rendered a tab. On Android dev builds that
shows as a red toast over the page.

Prefix each key so they are unique among siblings. Both still change with
the tab id, so switching tabs remounts the address bar and the stream view
as before.
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 12, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 12, 2026 20:50

Dismissing prior approval to re-evaluate d3d6ff9

@tris203
tris203 force-pushed the t3/mobile-browser-duplicate-key branch from d3d6ff9 to 49f2790 Compare October 12, 2026 20:50
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b87c16e8-8448-4014-840a-b81ba2db49eb

📥 Commits

Reviewing files that changed from the base of the PR and between 511d20c and 49f2790.


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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.



📝 Walkthrough

Walkthrough

The browser address bar and preview stream now use distinct React keys with address: and stream: prefixes, respectively.

Changes

Browser preview keys

Layer / File(s) Summary
Assign distinct address and stream keys
apps/mobile/src/features/browser/BrowserPreviewRouteScreen.tsx
BrowserAddressBar uses an address:-prefixed key. PreviewStreamWebView uses a stream:-prefixed key.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: maria-rcks


Merge Risk: ⚪ Minimal · up to 49f27

The address bar and preview stream now have separate tab-scoped identities, addressing the duplicate-key warning without an identified merge-blocking risk.

Pre-merge checks · Passed 4
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: removing the duplicate React key warning on the mobile Browser page.
Description check Passed The description covers the problem, expected behavior, implementation, scope justification, verification steps, before-and-after results, screenshots, checks run, limitations, and agent attribution. I…
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 unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@maria-rcks
maria-rcks merged commit 41d86c1 into pingdotgg:main Oct 13, 2026
27 checks passed
@tris203
tris203 deleted the t3/mobile-browser-duplicate-key branch October 13, 2026 06:54
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 13, 2026
## What's Changed
* fix(server): apply confirmed Claude subagent outcomes by @Yash-Singh1 in pingdotgg/t3code#18778
* fix(mobile): Browser page no longer logs a duplicate key warning by @tris203 in pingdotgg/t3code#18776
* fix(web): a numeric q in the pull requests URL no longer crashes the page by @ScottN-PV in pingdotgg/t3code#18666
* fix(client): T3 Connect clients reconnect once a new tunnel is ready by @shivamhwp in pingdotgg/t3code#16554
* fix(web): leaving the home page while the app loads no longer bounces you to a new draft by @shivamhwp in pingdotgg/t3code#18672
* fix(mobile): attachment images no longer re-download on every reconnect by @shivamhwp in pingdotgg/t3code#18824
* fix(server): a migration id clash stops startup with a clear error instead of crash-looping by @shivamhwp in pingdotgg/t3code#15925
* fix(server): a thread with an event type from a newer build can still resync after a downgrade by @shivamhwp in pingdotgg/t3code#15937
* fix(server): Codex titles and branch names no longer start the user's MCP servers by @brycedbjork in pingdotgg/t3code#17058
* fix(server): Claude thinking before a tool call stays a collapsed Thought by @maria-rcks in pingdotgg/t3code#18887
* perf(server): cached branch PR lookups no longer start git processes by @SunkenInTime in pingdotgg/t3code#17063
* fix(web): compact merge buttons show when they need a second click by @TonybynMp4 in pingdotgg/t3code#18878
* fix(mobile): pull requests load from another environment when theirs is offline by @juliusmarminge in pingdotgg/t3code#18698
* perf(web): collect active tool calls without array shifts by @saphid in pingdotgg/t3code#18853
* fix(web): center the pace icon on the limit card's "left" label by @akash3444 in pingdotgg/t3code#18580
* fix(web): update everything includes npm-installed servers again by @ScottN-PV in pingdotgg/t3code#18709
* fix(server): review guides find Bitbucket heads reported by short hash by @ahilles107 in pingdotgg/t3code#18900
* fix(web): scheduled task model picker no longer shifts the dialog by @flamboh in pingdotgg/t3code#18940
* fix(ci): CodeRabbit reviews no longer request changes by @Yash-Singh1 in pingdotgg/t3code#18954

## New Contributors
* @brycedbjork made their first contribution in pingdotgg/t3code#17058

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261013.3042...v0.0.46-nightly.20261013.3053

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261013.3053
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 13, 2026
## What's Changed
* fix(server): apply confirmed Claude subagent outcomes by @Yash-Singh1 in pingdotgg/t3code#18778
* fix(mobile): Browser page no longer logs a duplicate key warning by @tris203 in pingdotgg/t3code#18776
* fix(web): a numeric q in the pull requests URL no longer crashes the page by @ScottN-PV in pingdotgg/t3code#18666
* fix(client): T3 Connect clients reconnect once a new tunnel is ready by @shivamhwp in pingdotgg/t3code#16554
* fix(web): leaving the home page while the app loads no longer bounces you to a new draft by @shivamhwp in pingdotgg/t3code#18672
* fix(mobile): attachment images no longer re-download on every reconnect by @shivamhwp in pingdotgg/t3code#18824
* fix(server): a migration id clash stops startup with a clear error instead of crash-looping by @shivamhwp in pingdotgg/t3code#15925
* fix(server): a thread with an event type from a newer build can still resync after a downgrade by @shivamhwp in pingdotgg/t3code#15937
* fix(server): Codex titles and branch names no longer start the user's MCP servers by @brycedbjork in pingdotgg/t3code#17058
* fix(server): Claude thinking before a tool call stays a collapsed Thought by @maria-rcks in pingdotgg/t3code#18887
* perf(server): cached branch PR lookups no longer start git processes by @SunkenInTime in pingdotgg/t3code#17063
* fix(web): compact merge buttons show when they need a second click by @TonybynMp4 in pingdotgg/t3code#18878
* fix(mobile): pull requests load from another environment when theirs is offline by @juliusmarminge in pingdotgg/t3code#18698
* perf(web): collect active tool calls without array shifts by @saphid in pingdotgg/t3code#18853
* fix(web): center the pace icon on the limit card's "left" label by @akash3444 in pingdotgg/t3code#18580
* fix(web): update everything includes npm-installed servers again by @ScottN-PV in pingdotgg/t3code#18709
* fix(server): review guides find Bitbucket heads reported by short hash by @ahilles107 in pingdotgg/t3code#18900
* fix(web): scheduled task model picker no longer shifts the dialog by @flamboh in pingdotgg/t3code#18940
* fix(ci): CodeRabbit reviews no longer request changes by @Yash-Singh1 in pingdotgg/t3code#18954

## New Contributors
* @brycedbjork made their first contribution in pingdotgg/t3code#17058

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261013.3042...v0.0.46-nightly.20261013.3053

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261013.3053
adampeterhiggins added a commit to adampeterhiggins/t3code that referenced this pull request Oct 13, 2026
* fix(gitlab): merge request details report their head commit (pingdotgg#18608)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(server): rename built-in models from settings (pingdotgg#18840)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): Git actions follow the selected thread (pingdotgg#18862)

* fix(desktop): preserve updater failure causes in diagnostics (pingdotgg#18864)

* fix(web): attach dropped threads to pending answers (pingdotgg#18789)

* fix(web): keep button text stable during press scaling (pingdotgg#18866)

* fix(bitbucket): preserve PR head commits for review guides (pingdotgg#18402)

* fix(server): return null for unresolved optional commands (pingdotgg#18871)

* fix: show computer-use action titles and align app icons (pingdotgg#18865)

* fix(server): apply confirmed Claude subagent outcomes (pingdotgg#18778)

* fix(mobile): Browser page no longer logs a duplicate key warning (pingdotgg#18776)

* fix(web): a numeric q in the pull requests URL no longer crashes the page (pingdotgg#18666)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(client): T3 Connect clients reconnect once a new tunnel is ready (pingdotgg#16554)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(web): leaving the home page while the app loads no longer bounces you to a new draft (pingdotgg#18672)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(mobile): attachment images no longer re-download on every reconnect (pingdotgg#18824)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): a migration id clash stops startup with a clear error instead of crash-looping (pingdotgg#15925)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>

* fix(server): a thread with an event type from a newer build can still resync after a downgrade (pingdotgg#15937)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>

* fix(server): Codex titles and branch names no longer start the user's MCP servers (pingdotgg#17058)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>

* fix(server): Claude thinking before a tool call stays a collapsed Thought (pingdotgg#18887)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>

* perf(server): cached branch PR lookups no longer start git processes (pingdotgg#17063)

* fix(web): compact merge buttons show when they need a second click (pingdotgg#18878)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(mobile): pull requests load from another environment when theirs is offline (pingdotgg#18698)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* perf(web): collect active tool calls without array shifts (pingdotgg#18853)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>

* fix(web): center the pace icon on the limit card's "left" label (pingdotgg#18580)

* fix(web): update everything includes npm-installed servers again (pingdotgg#18709)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): review guides find Bitbucket heads reported by short hash (pingdotgg#18900)

Co-authored-by: Pawel Mikolajczuk <pmikolajczuk@atlassian.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): scheduled task model picker no longer shifts the dialog (pingdotgg#18940)

* fix(ci): CodeRabbit reviews no longer request changes (pingdotgg#18954)

---------

Co-authored-by: Scott Norteman <snorteman@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: Paweł Mikołajczuk <pawel@mikolajczuk.in>
Co-authored-by: Tristan Knight <admin@snappeh.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Bryce Bjork <brycedbjork@gmail.com>
Co-authored-by: maria <maria@kuuro.net>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Dara Adedeji <76637177+SunkenInTime@users.noreply.github.com>
Co-authored-by: Antony <97451137+TonybynMp4@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Alex Southwell <saphid@gmail.com>
Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Akash Moradiya <64416825+akash3444@users.noreply.github.com>
Co-authored-by: Pawel Mikolajczuk <pmikolajczuk@atlassian.com>
Co-authored-by: oliver <97427849+flamboh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews 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.

3 participants