Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): combined test branch — scroll, back-swipe, thread lists, computer switching #3687

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 18 commits intomain fromintegration/test-allmerged by juliusmarminge View on GitHub

Note

Draft integration branch combining several in-flight mobile fixes for on-device testing. One commit per fix; not intended to merge as-is.

image

What Changed

All changes scoped to apps/mobile/ (plus one dependency bump):

  • Fix thread scroll jump after send — dismiss the keyboard before the anchor scroll so a swallowed close event can't leave a phantom bottom inset; apply the RN 0.81 contentInset hit-test workaround so the blank area after a send is scrollable.
  • Fix dead far-left-edge back swipe — remove the legacy thread navigation drawer and its left-edge pan gesture, which stole edge touches from the native back-swipe recognizer. Deep-linked/cold-start threads get an explicit header button to reach the threads list.
  • Quick new-thread button per project — a + button on the right of each Home project group header opens the new-task draft pre-targeted to that project. The collapse chevron is removed; tapping the project title toggles the group.
  • Recent-threads window on Home — project groups default to threads from the last 5 days (or the 3 most recent), integrated with the existing Show more/less pagination.
  • Stable timestamps — sub-minute times render as <1m instead of a ticking seconds counter; fixed-width timestamp column to stop layout shifts.
  • Fix silent computer-switch failure — the machine picker only offers environments hosting the selected repository (repo identity, with workspace-basename/title fallback for still-indexing hosts), so switching computers keeps the same repo instead of silently picking the first project.
  • Bigger new-task composer text — headline type role (18pt, Dynamic Type-aware) instead of body.
  • Bump react-native-keyboard-controller 1.21.6 → 1.21.13 — the app was below @legendapp/list's required 1.21.7; includes upstream fixes for non-scrollable chat scroll views with large blank space. Needs a fresh native build.

Checklist

  • This PR is small and focused (combined test branch by design)
  • I explained what changed and why
  • Screenshots/videos pending device testing

🤖 Generated with Claude Code


Note

Medium Risk Touches core mobile navigation, list pagination, and keyboard-driven scroll invariants across many screens; changes are UX-scoped to apps/mobile but need on-device validation and a native rebuild for the keyboard-controller bump.

Overview This is a mobile-only integration of several UX fixes: thread list behavior, navigation chrome, composer/keyboard scrolling, and new-task targeting.

Thread lists (Home + sidebar) now default each project group to a recency baseline (threads from the last 5 days, or the 3 newest) instead of always showing the full global page size. Show more/less compares against that per-group baseline so stale projects can collapse and expand correctly. Groups expose recentThreads and newThreadTarget (last-active machine for aggregated repos). Project headers get a + that opens New Task with environment/project prefilled (hidden for aggregated or pending-placeholder groups); collapse is title-only with separate accessibility targets.

Navigation: the legacy ThreadNavigationDrawer and its left-edge pan are removed so native back-swipe works. Deep-linked threads without stack history get a header Home button (StackActions.replace("Home")).

Thread detail: after send, KeyboardController.dismiss() runs before anchor scroll to avoid a stuck bottom inset; ThreadFeed enables the RN contentInset hit-test workaround. Header drawer pan gesture is gone.

New task: machine picker lists only environments that host the selected repository (with basename/title fallback); switching machines tries to keep the same repo. Composer prompt uses headline typography.

Polish: relativeTime uses <1m instead of live seconds; archived row timestamps get fixed width; react-native-keyboard-controller bumps 1.21.6 → 1.21.13 (native rebuild).

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 542ce60b9e4bdce9058f404656a38788fccb8ce2. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix scroll, back-swipe, and thread list behavior in mobile app

  • Removes the left-edge swipe gesture to open a drawer from ThreadDetailScreen; replaces it with a Home button in ThreadRouteScreen when there is no back history on compact layouts
  • Fixes phantom keyboard inset after sending a message by dismissing the keyboard before scrolling to the anchor in ThreadDetailScreen
  • Adds a workaround in ThreadFeed for a React Native 0.81+ hit-test bug with contentInset, keeping blank end space scrollable after a send
  • Adds a per-group '+' button in thread list group headers that opens NewTaskDraft prefilled with the target project's context
  • Changes the environment picker in NewTaskFlowProvider to list only machines hosting the selected repository, and preserves the repository selection when switching environments
  • Changes buildHomeThreadGroups to compute a recentThreads subset (last 5 days, or most recent 3 as fallback) and a newThreadTarget per group for the quick new-thread action
  • Updates relativeTime to return '<1m' for sub-minute or invalid timestamps instead of 'now' or a seconds count
Macroscope summarized 542ce60.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: 4d7e3027-8d6c-4aa4-855e-a0fcd0c748cb

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `integration/test-all`

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/aa38fd2f3f33db70892c215a3419c05b7c8be99e/apps/mobile/src/features/threads/thread-list-items.tsx#L37

      The new-thread Pressable (line 102) is nested inside the header's outer Pressable (line 59). On React Native, nested touchables can be unreachable to screen readers: VoiceOver may disallow nested accessibility elements and TalkBack can focus only the parent, so the inner button's label and action never reach assistive-tech users. Consider rendering the new-thread button as a sibling outside the outer Pressable (or using accessible={false} on the wrapper and exposing each action separately) so both controls remain focusable.

      Also found in 1 other location(s)

      apps/mobile/src/features/home/HomeScreen.tsx:252

      Passing onNewThread={props.onNewThreadInProject} at HomeScreen line 252 makes each group header render an inner Pressable button inside the outer header Pressable. React Native&#39;s accessibility docs explicitly warn that nested accessibility elements can cause VoiceOver/TalkBack to focus only the parent or behave unpredictably, so screen-reader users may be unable to reach or activate the new-thread button at all.

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @apps/mobile/src/features/threads/thread-list-items.tsx around line 37:
      
      The new-thread `Pressable` (line 102) is nested inside the header's outer `Pressable` (line 59). On React Native, nested touchables can be unreachable to screen readers: VoiceOver may disallow nested accessibility elements and TalkBack can focus only the parent, so the inner button's label and action never reach assistive-tech users. Consider rendering the new-thread button as a sibling outside the outer `Pressable` (or using `accessible={false}` on the wrapper and exposing each action separately) so both controls remain focusable.
      
      Also found in 1 other location(s):
      - apps/mobile/src/features/home/HomeScreen.tsx:252 -- Passing `onNewThread={props.onNewThreadInProject}` at `HomeScreen` line 252 makes each group header render an inner `Pressable` button inside the outer header `Pressable`. React Native's accessibility docs explicitly warn that nested accessibility elements can cause VoiceOver/TalkBack to focus only the parent or behave unpredictably, so screen-reader users may be unable to reach or activate the new-thread button at all.
      
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/aa38fd2f3f33db70892c215a3419c05b7c8be99e/apps/mobile/src/features/home/homeListItems.ts#L198

      canShowLess uses visibleCount > HOME_INITIAL_VISIBLE_THREADS, but the default baseline is now baselineCount = min(group.recentThreads.length, 6, totalCount), which can be below 6 for stale projects. After a single "Show more" tap reveals all threads, visibleCount never reaches 6, so canShowLess stays false and the row renders with hiddenCount: 0 — the user cannot collapse back to the recent-only view. Consider comparing against baselineCount instead of HOME_INITIAL_VISIBLE_THREADS.

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @apps/mobile/src/features/home/homeListItems.ts around line 198:
      
      `canShowLess` uses `visibleCount > HOME_INITIAL_VISIBLE_THREADS`, but the default baseline is now `baselineCount = min(group.recentThreads.length, 6, totalCount)`, which can be below `6` for stale projects. After a single "Show more" tap reveals all threads, `visibleCount` never reaches `6`, so `canShowLess` stays `false` and the row renders with `hiddenCount: 0` — the user cannot collapse back to the recent-only view. Consider comparing against `baselineCount` instead of `HOME_INITIAL_VISIBLE_THREADS`.
    4. t3dotgg(GitHub profile, opens in a new tab) changed the title

    5. Note

      Unit test generation is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.


      Generating unit tests... This may take up to 20 minutes.

    6. Fixed in 3edb72e01 — the header row is now a plain View with the collapse toggle and the new-thread button as sibling pressables (the chevron got its own accessible={false} pressable so it still toggles). No more nested touchables, so VoiceOver/TalkBack reach both actions.

    7. Fixed in 3edb72e01 — canShowLess now compares visibleCount > baselineCount (the group's own recency baseline) instead of the global page size, so stale groups whose baseline is below 6 can collapse back after expanding. Added a regression test covering exactly this case.

    8. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High

      https://github.com/pingdotgg/t3code/blob/f726113e148e2a48c295ec13cf9e974ad4a3f7ff/apps/mobile/src/features/threads/ThreadRouteScreen.tsx#L637

      With ThreadNavigationDrawer and the onOpenDrawer pan gesture removed, headerBackVisible is now the only navigation exit from ThreadRouteContent in compact layout. A native-stack back button does not render when there is no previous route, so a user who opens a thread directly via a deep link or cold start — where Thread is the first and only route — lands on this screen with no way to reach Home or start another task. Consider restoring a navigation entry point (e.g. a header button or drawer toggle) that does not depend on a previous route existing.

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @apps/mobile/src/features/threads/ThreadRouteScreen.tsx around line 637:
      
      With `ThreadNavigationDrawer` and the `onOpenDrawer` pan gesture removed, `headerBackVisible` is now the only navigation exit from `ThreadRouteContent` in compact layout. A native-stack back button does not render when there is no previous route, so a user who opens a thread directly via a deep link or cold start — where `Thread` is the first and only route — lands on this screen with no way to reach Home or start another task. Consider restoring a navigation entry point (e.g. a header button or drawer toggle) that does not depend on a previous route existing.
    9. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      1 blocking correctness issue found. Combined feature branch with significant behavior changes: new quick-thread UI, recency window filtering, drawer removal, and navigation updates. Two unresolved review comments identify potential bugs (missing collapse chevron, search-skewed thread target) that should be addressed before merging.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    10. Fixed in 3fd7f73c9 — when Thread is the only route (deep link / cold start), the compact header now shows an explicit "Go to threads list" button (navigation.canGoBack() gate); with history present the native back button is used as before.

    11. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/3fd7f73c95d302e5a8e5c7fdc6f411cc21e40c12/apps/mobile/src/features/threads/thread-list-items.tsx#L95

      ThreadListGroupHeader no longer renders the collapse/expand chevron. The old chevron.right/chevron.down glyph was removed and replaced only by the plus new-thread button (or a blank spacer when onNewThread is absent), so every project header gives no visual indication of its collapsed state and looks non-collapsible. Consider restoring the disclosure chevron inside the toggle Pressable so the expanded/collapsed state is visible again.

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @apps/mobile/src/features/threads/thread-list-items.tsx around line 95:
      
      `ThreadListGroupHeader` no longer renders the collapse/expand chevron. The old `chevron.right`/`chevron.down` glyph was removed and replaced only by the `plus` new-thread button (or a blank spacer when `onNewThread` is absent), so every project header gives no visual indication of its collapsed state and looks non-collapsible. Consider restoring the disclosure chevron inside the toggle `Pressable` so the expanded/collapsed state is visible again.
    12. Intentional — the disclosure chevron was removed at the maintainer's request; tapping the project title row toggles collapse. Declining this one.

    13. t3dotgg(GitHub profile, opens in a new tab) changed the title

    14. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 542ce60b9e4bdce9058f404656a38788fccb8ce2. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -168,7 +227,20 @@
      227+ Arr.findFirst(
      228+ group.projects,
      229+ (project) =>
      230+ project.environmentId === thread.environmentId && project.id === thread.projectId,
      231+ ),
      232+ ),
      233+ Option.getOrNull,
      234+ );
      235+
      168236 result.push({
      169237 key: group.key,
      170238 title,
      171239 representative,
      172240 projects: group.projects,
      173241 pendingTasks: matchingPendingTasks,
      174- threads: sortThreads(matchingThreads, input.threadSortOrder),
      242+ threads: sortedThreads,
      243+ recentThreads,
      244+ newThreadTarget: group.key.startsWith("pending-project:")
      245+ ? null
      246+ : (lastActiveProject ?? representative),

      Search skews new thread target

      Medium Severity

      The newThreadTarget for aggregated groups is derived from search-filtered threads (matchingThreads) rather than the full thread history. This can cause the quick-create + action to preselect an incorrect environment or project, especially when the search query filters out the group's most recent thread.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 542ce60b9e4bdce9058f404656a38788fccb8ce2. Configure [here](https://www.cursor.com/dashboard/bugbot).

      Valid — but #3687 merged while this fix was in flight, so it's addressed in follow-up PR #3693 (derives newThreadTarget from the full sorted history instead of the search-filtered subset).

    15. juliusmarminge merged thise26e55f

    16. juliusmarminge closed this

Sign in to join this conversation.