Skip to content

Prepare Android mobile app for internal testing - #4454

Merged
ymichael merged 20 commits into
mainfrom
bb/assess-android-app-readiness-and-distribution-thr_aa3eez5bi4
Sep 29, 2026
Merged

ymichael merged 20 commits into
mainfrom
bb/assess-android-app-readiness-and-distribution-thr_aa3eez5bi4

Conversation

@ymichael

@ymichael ymichael commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The mobile shell lacked a reproducible Android distribution path and retained iOS-oriented controls on Android. Inconsistent native menus, crowded server rows, missing icon shapes, keyboard inset handling, and WebView layout issues made basic pairing and messaging interactions unreliable or awkward.

What changed

  • Apply native bottom safe-area insets centrally to web drawers without duplicated child padding. Keep thread rows visible while their long-press menus are open, suppress native link dragging, and preserve deliberate touch reordering.

  • Add embedded local APK builds, optional Firebase configuration, Android Maestro flows, and manual EAS preview APK/production AAB workflows. Play submission targets an internal draft. Android 16 emulator CI runs with the mobile-e2e PR label, manually, and nightly, uploading screenshots and diagnostic artifacts.

  • Add a default-off Android App experiment with checksum-verified GitHub release downloads, atomic caching, progress/error reporting, and an explicit source-build fallback. Concurrent requests share work. SDK/CLI expose both paths; publishing and configuration are documented. EAS can optionally publish preview APKs and metadata with incrementing version codes.

  • Refine Android native pairing, inputs, buttons, and settings. Emphasize bb connect; place camera permission in a card with a text-only button; use bell notification icons and filled green success checks.

  • Center Android sheet headings, descriptions, and text-only actions consistently. Server menus show current-server status and transition into a removal confirmation. Push permission, removal, and clear-website-data prompts share button sizing and shape; Android Back dismisses sheets.

  • Simplify Android saved-server rows to a name and address, removing the duplicate handle and connection-type column. Reserve a fixed selection slot for the filled green check so switching servers does not shift or truncate their text. Preserve full addresses and connection types in accessibility labels and expose selection state. iOS retains its native presentation.

  • Read installed version/build values through expo-application. Send the device/model name during pairing and persist it in Machines; older clients remain compatible. This requires the account-service update and a new native build, and does not rename existing records. Replace internal session errors with phone sign-in guidance.

  • Let the Android native frame own keyboard sizing, prevent duplicate IME insets, customize text-selection appearance, and add WebView Back navigation and renderer recovery. Create the notification channel before requesting permission. Carry scoped, version-pinned cookies/screens/Hugeicons/WebView patches.

  • Reconnect the iOS viewport handler when navigation replaces the page shell; remove touch timeline scrollbar gutters while preserving horizontal table scrolling and desktop styling.

  • Include associated CI/test fixes and bump the plugin SDK to 0.5.32 for the Android public API. No server/daemon wire contract changes.

How you verified

  • Drawer and thread-row follow-up: 32 native-shell/responsive-overlay tests and 105 thread-row tests pass, including safe-area updates/cleanup and both long-press menu triggers followed by deliberate dragging. App/shared-UI/thread-list typechecks and available lint tasks pass. No additional device visual pass was performed for this follow-up.

  • Latest native UI: pnpm exec turbo run test --filter=@bb/mobile passes all 314 tests across 44 files. Mobile typecheck/lint and build:android:local pass; lint reports six existing warnings. git diff --check passes.

  • Visually reviewed fresh Pixel 9 / Android 16 emulator screenshots: a 35-screen native review, followed by updated centered menu/confirmation captures and server-selection captures in light and dark themes. Maestro verifies cancellation, clear website data preserving servers, targeted server removal, and switching servers. Server name/address pixels remain identical when selection changes; accessibility output includes full URLs and correct selection states. The rebuilt app displays its installed version/build. Latest Android-only layout changes were not rerun in an iOS native build.

  • Earlier Android CI smoke passed in run 36477758462 at 35cf2fb9c2, covering pairing, send/echo, Back, relaunch persistence, and native settings. Reviewed screenshots and JUnit artifacts. Full CI and iOS simulator flows also passed at ac88b6658d; these results predate the latest UI commit.

  • Device-naming regression tests fail before/pass after; named and legacy unnamed account round trips pass. Connect-client and account-service tests, builds, types/lint, and the SDK version guard pass.

  • APK download verification covers missing releases/tools, explicit local fallback, shared requests, invalid checksums/metadata, interrupted downloads, cache reuse, and disabled routes. Focused UI/server tests and app/server/CLI checks pass. An actual source build downloaded 60,064,201 bytes with matching SHA256; CLI reused the cache. EAS publishing itself was not run.

  • Earlier native verification built Android, iOS simulator, and web apps; all five iOS smoke flows passed. Android 17/WebView 145 and Android 16/WebView 133 checks covered keyboard resize, Back, selection, and scrolling. iOS shell-replacement regression fails before/passes after, with 16 viewport tests passing. Table borders and horizontal scrolling were verified on Android and iOS.

Remaining distribution gaps: the first public Android GitHub release is unpublished. Production signing, EAS/Play submission, actual push delivery, Play-signed HTTPS app links, and final physical-device acceptance remain unverified. The Android 17 local TLS connect fixture still needs repair; Android 16 fixture success does not establish that coverage. These remain follow-up work before inviting testers.

AGENT GENERATED

@ymichael ymichael added the mobile-e2e Run the iOS simulator Maestro flows on this PR label Sep 28, 2026
@blacksmith-sh

This comment has been minimized.

@ymichael
ymichael force-pushed the bb/assess-android-app-readiness-and-distribution-thr_aa3eez5bi4 branch from 08aa847 to 7df2f0e Compare September 28, 2026 18:26
@ymichael
ymichael marked this pull request as ready for review September 28, 2026 21:30
@ymichael
ymichael merged commit 5959fb6 into main Sep 29, 2026
19 checks passed
@ymichael
ymichael deleted the bb/assess-android-app-readiness-and-distribution-thr_aa3eez5bi4 branch September 29, 2026 16:46
SawyerHood added a commit that referenced this pull request Sep 29, 2026
## Human comments

## What was wrong

#4232 reverted the bb account stack after the 2026-09-24 connect gate
outage. This PR brings back the web half of #4227: the endpoints a bb
account client needs. It is the first layer of a four-PR stack that
re-lands #4227, #4229 and #4230 so each part can be deployed and rolled
back on its own. The re-land drops #4227's tunnel tickets, so the gate
itself doesn't change.

## What changed

- **bb-web** (from #4227, without the tunnel ticket endpoint):
- `/api/account/me`, `/api/account/link/start`, `/api/account/link/poll`
and the `/link` approval page;
  - `POST /api/connect/machine-code-lookup`;
- the dashboard's connect UI moved into `components/connect-ui.tsx`. The
pairing command it shows (`bb connect --code … --server …`) works for
released bbs and new ones.
- **Link approvals can't replace a newer sign-in** (SlopCop P1).
Delivering a link credential, re-pairing from the dashboard, and
disconnecting a server now deny every other approved, undelivered link
for that server. An approved code is delivered at most two minutes past
its expiry; before, it could be delivered at any time.
- **connect-db:** `resolveServerCredential`,
`serverCredentialFromHeaders`, `write-result`, and a `./testing` export.
Migrations 0006/0007 are already on `main`; this adds none.
- Nothing changes under `apps/connect`, the tunnel packages, or the
deploy workflows.

## How you verified

- `pnpm exec turbo run typecheck --filter="...[HEAD^1]"` and `test
--filter="[HEAD^1]"` on this layer alone: pass (connect-db, web,
connect).
- New `account.test.ts` cases, all four failing on the previous code:
- an approved, unpolled code is denied after a disconnect plus a newer
link;
  - it is denied after another link replaces the server;
  - it is denied after a dashboard re-pair;
  - it isn't delivered past the grace.
- Not changed, answered on the review: atomic delivery writes and an
index for the expired-link prune. Both are follow-ups.
- Staging (`vibecodethis.site`), last run 2026-09-25 02:40–03:07 UTC on
`main` with #4313: this web (`630823a5`) with `main`'s gate. A
released-style bb paired through it with a dashboard-style pairing code
(`Paired as sawyer — reachable at https://sawyer.vibecodethis.site`),
then upgraded, downgraded and signed in again on the new client (#4253).
`POST /api/connect/tunnel-ticket` answers 404. Rolling this web back to
the pre-stack version under the new client kept its tunnel and sign-in
(details in #4253). No `wrangler tail` was used.

## Rollout

1. Merge. **Deploy Web** ships bb-web to 100%. It only adds routes. This
PR touches `packages/connect-db`, so **Deploy Connect** also runs: it
applies no migrations (none are pending, checked against production D1
on 2026-09-25) and `wrangler deploy`s the gate. The gate's own code is
unchanged from production's (#4313, `000248de`); the connect-db
additions it bundles are unused by it. So connected bbs just reconnect
once; with #4313's visitor hold that is a short delay for visitors
(staging: 75/75 one-second probes returned 200, one held 3.1 s).
2. Watch for 10 minutes:
- bb-web 5xx on `getbb.app`, especially `/api/account/*` and
`/api/connect/*`;
- a dashboard pairing code still pairs a released bb (`npx -p
bb-app@latest bb connect --code <code> --server
https://<handle>.getbb.app`).

## Rollback

- Web: `pnpm --filter @bb/web exec wrangler rollback <previous> --name
bb-web -m "<reason>"`, where `<previous>` is the version `wrangler
deployments status --name bb-web` shows before the merge deploys
(`d929bb65-81be-4090-ad8e-70a6e9d46fd7` on 2026-09-29 16:54 UTC, `main`
at #4454). Once #4253 has shipped, a web rollback keeps those bbs
connected and signed in; only new sign-ins stop working until it rolls
forward.
- Gate: `pnpm --filter @bb/connect exec wrangler rollback
000248de-6a8b-4ca0-94f9-a7a27fe80b8f -m "<reason>"` (production's gate
before the merge).

Stack: 1 of 4. Base: `main`. Next: #4252.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mobile-e2e Run the iOS simulator Maestro flows on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant