Skip to content

feat(mobile): prototype A bottom search pill in Android navigation - #77

Draft
kvnloo wants to merge 13 commits into
channels/basefrom
proto/mobile-bottom-search-pill
Draft

kvnloo wants to merge 13 commits into
channels/basefrom
proto/mobile-bottom-search-pill

Conversation

@kvnloo

@kvnloo kvnloo commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

Owner O13: “can we setup ai search & fuzzy search and just overall better search algorithm for t3code android. also move the search bar to the bottom and lets think thru how to improve navigation while not adding too much clutter at the bottom since nav bar is there too. generate a few prototypes and fix the search algo first in parallel”

This Draft PR is prototype A only: search placement on Android Home, behind an opt-in setting. Search ranking/fuzzy matching belongs to its parallel card.

Design

  • Default OFF: preserve the existing top toolbar search and native bottom navigation.
  • ON, Android phone Home: hide the top search control. Put a 48dp compact search pill in the existing navigation row, allocating space from the native navigation view rather than adding another row.
  • Tapping the pill temporarily replaces that bottom row with a full-width search field that autofocuses near the keyboard. It reads/writes the same primarySidebarSearchQuery as Home, so filtering is unchanged.
  • Hardware Back or the close button collapses search; blur collapses when the query is blank. A nonblank blur preserves the expanded search. Keep the floating compose button hidden while expanded.
  • Android tablet split view and iOS preserve existing search placement.

Change (source at 37ab201)

  • apps/mobile/src/persistence/mobile-preferences.ts:100 — persist/sanitize default-off opt-in.
  • apps/mobile/src/features/settings/appearance/sections/AndroidNavigationAppearanceSection.tsx:39 — Bottom search (prototype A) toggle under Settings → Appearance → Navigation.
  • apps/mobile/src/features/workspace/bottom-search-prototype.ts:17 — opt-in expanded/collapsed model.
  • apps/mobile/src/features/workspace/bottom-search-prototype-state.ts:3 — presentation/state transition logic.
  • apps/mobile/src/features/workspace/WorkspaceTabsContext.tsx:16 and WorkspaceRootScreen.android.tsx:42 — share the model between Home and navigation.
  • apps/mobile/src/features/home/ThreadListToolbar.android.tsx:73 — hide the top field only when enabled; preserve hardware-search shortcut.
  • apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx:114 — compact pill in the native nav row; expanding search input, Back/close/blur behavior.
  • apps/mobile/src/components/ui/SearchField.tsx:15 — optional blur callback for existing search field.
  • apps/mobile/src/features/home/AndroidHomeFab.android.tsx:44 — hide FAB while bottom search is expanded.

Tests

  • Unrun (connector cannot execute tests): apps/mobile/src/features/workspace/bottom-search-prototype-state.test.ts:9 tests toggle-off/top-search parity, pill→field transition, Back/close, blank/nonblank blur, and disabling the prototype.
  • Unrun: vp test run apps/mobile/src/features/workspace/bottom-search-prototype-state.test.ts
  • Unrun: vp run check:changed
  • Unrun: Android UI smoke test on device.
  • No tests or phone captures are claimed as run. Check Actions on this Draft PR for automated CI results.

How Kevin checks it on his phone

  1. Confirm Settings → Appearance → Navigation → Bottom search (prototype A) is OFF: Threads keeps its top search and standard bottom navigation.
  2. Turn it ON and return to Threads: top search disappears; a magnifying-glass pill shares the existing bottom navigation row.
  3. Tap pill: input opens above keyboard. Type a thread keyword and confirm the thread list filters. Press Back or close; tap again and clear the query then blur to verify collapse.
  4. Switch OFF and verify the original header search and navigation return. Compare floating One UI and Material navigation styles.

Follow-ups

  • Capture actual Android before/after screenshots and check IME positioning, navigation hit targets, font scale, gesture navigation, and OEM variations.
  • Compare prototype A with alternative bottom layouts before choosing the default.
  • Keep fuzzy/AI search algorithm improvements in O13's separate parallel Draft PR.

Known risk: Native navigation width and keyboard placement need on-device verification; connector-only implementation cannot prove tap-target or IME geometry.

Implemented by ChatGPT (mobile app, GitHub connector) for Kevin's OSS factory.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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