[codex] Add G2 selectable list support#3240
Conversation
📋 PR Review Helper📱 Mobile App Build✅ Ready to test! (commit 🕶️ ASG Client Build⏳ Waiting for build... 🔀 Test Locallygh pr checkout 3240 |
PR Agent Orchestrator State{
"cycle": 1,
"fixRound": 0,
"totalReviewerRuns": 1,
"consecutiveNoNewReviews": 1,
"openFindings": [],
"resolvedFindings": [],
"nitFindings": [],
"phase": "discovery",
"status": "in_progress",
"stagnationFixRounds": 0,
"fingerprintReopenCounts": {},
"mutedFingerprints": [],
"lastPair": [],
"lastOpenCount": 0
} |
🤖 PR Agent Review — cycle 1✅ No blocking findings · 0 blocking · 0 nits No model reviews ran this cycle. Updated automatically by the PR Agent Orchestrator each review cycle. Nits do not block merge. |
|
@codex review |
| timestamp: Long, | ||
| source: Int? = null | ||
| source: Int? = null, | ||
| extra: Map<String, Any>? = null |
There was a problem hiding this comment.
I don't like extra
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba0975286a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| signalDisplayDirty() | ||
| if (hadListContainers && pageCreated) { | ||
| displayScope.launch { rebuildPage() } |
There was a problem hiding this comment.
Preserve G2 mic after clearing selectable lists
When clearDisplay() is called while a selectable list is on screen, this branch clears listContainers and only sends rebuildPage(), which shuts the EvenHub page down; because there is then no pending text/image/list, reconcileDisplay() will not call rebuildState(), so the mic restart path in rebuildState() never runs. This regresses the existing clear-display behavior for any G2 flow that has the mic enabled and clears a list (the analogous iOS branch has the same pattern).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 31a0678. Configure here.
| if (view === "github") return "prList" | ||
| if (view === "codex") return "codexList" | ||
| if (view === "notifications") return "notifications" | ||
| return "main" |
There was a problem hiding this comment.
Summary view maps wrong screen
Medium Severity
screenForView treats the summary view like the default branch and sets the glasses screen to main, so choosing Home/Summary from the phone UI or restoring saved selectedView: "summary" drives the native main menu instead of the summary text view.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 31a0678. Configure here.
|
Oops, I pushed extra commits, I forgot this branch was a PR already. Though need to push a change for dismissing the dashboard on double tap only if a mini app listens to it |
|
Closing in favor of #3249, which keeps this PR scope to the G2 selectable-list support and dashboard double-tap fallback only. |


Summary
Adds native selectable-list support for G2 display miniapps across the local miniapp SDK, phone runtime, and Bluetooth SDK native layers.
What Changed
display.showSelectableList(...)to the miniapp SDK surface.selectedItemName,selectedItemIndex, container metadata.Validation
mobile/modules/miniapp:bun test src/session.test.tsmobile/modules/miniapp:bun run typecheckmobile/modules/miniapp:bun run build./scripts/check-android-compile.sh bluetooth-sdkmobile:xcodebuild -workspace ios/Mentra.xcworkspace -scheme Mentra -configuration Debug -destination id=00008120-001619E102E1A01E -derivedDataPath ios/build -allowProvisioningUpdates buildgit diff --checkNotes
The selectable-list demo miniapp created locally for manual testing is intentionally not included in this PR.
Note
Medium Risk
Changes touch G2 display page lifecycle, gesture routing, and Bluetooth-native protobuf paths; incorrect list/text interaction could affect all G2 miniapp rendering, though scope is mostly additive with a deliberate double-click behavior change.
Overview
Adds G2 firmware-native selectable lists end-to-end: miniapps can call
showSelectableList, the phone runtime emits aselectable_listlayout, and Android/iOS Bluetooth SDK builds list containers on the Even Hub page and parses ListEvent gestures into touch payloads (selectedItemName,selectedItemIndex, container metadata). View-state dedup on both platforms now includes list fields so identical list updates do not churn the display.Touch plumbing extends
sendTouchEventwith optionalextrafields on iOS and Android. Jest gains a stub forlocalMiniappRuntime.hasTouchSubscriberForGesture. On G2 firmware, double-click no longer auto-opens the native dashboard (logged as disabled); head-up toggle behavior remains when native dashboard is off.Two new workspace miniapps ship in the diff:
dev-hud(background + React UI + local sidecar that aggregates GitHub PRs viagh, Codex state from local SQLite/JSON, diff-based notifications, glasses menus via selectable lists) andselectable-list-demo(minimal list + touch demo).bun.lockregisters both packages.iOS DeviceManager gets unrelated hardening in the same diff:
@MainActortimers/tasks for mic reinit and startup animation, structuredviewStateKeyfor layout equality, and small Swift formatting fixes.Reviewed by Cursor Bugbot for commit cd5682b. Bugbot is set up for automated code reviews on this repo. Configure here.