Skip to content

Add G2 selectable lists and dashboard fallback#3249

Open
PhilippeFerreiraDeSousa wants to merge 2 commits into
devfrom
codex/g2-selectable-list-dashboard-fallback
Open

Add G2 selectable lists and dashboard fallback#3249
PhilippeFerreiraDeSousa wants to merge 2 commits into
devfrom
codex/g2-selectable-list-dashboard-fallback

Conversation

@PhilippeFerreiraDeSousa

@PhilippeFerreiraDeSousa PhilippeFerreiraDeSousa commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add G2 selectable list rendering through the mobile Bluetooth SDK, island runtime, and miniapp SDK.
  • Restore the G2 native-dashboard double-tap fallback when no local miniapp subscribes to double-tap.
  • Keep G2 touch selection metadata typed in the native bridge instead of passing arbitrary extra maps.

Validation

  • swiftformat mobile/modules/bluetooth-sdk/ios/Source/Bridge.swift mobile/modules/bluetooth-sdk/ios/Source/sgcs/G2.swift
  • cd mobile && bun run compile
  • cd mobile && bun run test -- src/services/MantleManager.test.ts --runInBand --no-cache
  • ./scripts/check-android-compile.sh bluetooth-sdk

Note

Medium Risk
Changes touch the G2 EvenHub page model and event bridge; regressions could affect display rebuilds, mic recovery, or gesture routing on G2 glasses.

Overview
Adds G2 selectable lists end-to-end in the Bluetooth SDK: layouts can use selectable_list, with list fields parsed into view state and rendered via new EvenHub list protobuf containers on create/rebuild page. List interactions from firmware are handled and forwarded as touch_event messages that include container and selection metadata (containerId, containerName, selectedItemName, selectedItemIndex) on Android and iOS.

Display lifecycle is updated so list pages coexist with text/image containers (clear/replace/reconcile paths), and non-G2 SGCs fall back to a joined text wall. View-state deduping is tightened (struct equality / viewStateKey).

When use_native_dashboard is on, G2 no longer calls showDashboard() on a system double-click in native code (only logs); native-dashboard double-tap is expected to be handled higher in the stack using touch_event and miniapp touch subscription checks. Jest mocks hasTouchSubscriberForGesture for that path.

Reviewed by Cursor Bugbot for commit 4c8ad66. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

📋 PR Review Helper

📱 Mobile App Build

Building... (commit 4c8ad66)

🕶️ ASG Client Build

Waiting for build...


🔀 Test Locally

gh pr checkout 3249

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

PR Agent Orchestrator State

{
  "cycle": 2,
  "fixRound": 0,
  "totalReviewerRuns": 2,
  "consecutiveNoNewReviews": 2,
  "openFindings": [],
  "resolvedFindings": [],
  "nitFindings": [],
  "phase": "discovery",
  "status": "in_progress",
  "lastPair": [],
  "stagnationFixRounds": 0,
  "lastOpenCount": 0,
  "fingerprintReopenCounts": {},
  "mutedFingerprints": []
}

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Agent Review — cycle 2

✅ No blocking findings · 0 blocking · 0 nits
Reviewers this cycle: none

No model reviews ran this cycle.

Updated automatically by the PR Agent Orchestrator each review cycle. Nits do not block merge.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default 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.

Reviewed by Cursor Bugbot for commit 05166ed. Configure here.

if (eventType == null) {
Bridge.log("G2: unknown list event type: $listFields")
return@let
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android drops unknown list events

Low Severity

New G2 ListEvent handling returns without emitting a touch event when field 5 is present but not a known OsEventType. The iOS G2 path in the same PR treats that case as a click, so list interactions can work on iOS but be ignored on Android for the same firmware payload.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 05166ed. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05166ede96

ℹ️ 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".

Comment on lines +222 to +226
case "single_tap":
return "click"
case "double_click":
case "double_tap":
return "double_click"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve G2 gesture aliases for local touch subscribers

When G2 emits gestureName: "double_tap" (and similarly single_tap), this rewrites the per-gesture stream to touch_event:double_click/touch_event:click. Local session.input.onTouch(gesture, ...) subscribes to the literal string the miniapp passed, and the cloud SDK/docs use single_tap/double_tap, so a local miniapp subscribing to double_tap will not receive the event and hasTouchSubscriberForGesture("double_tap") will also return false, causing the new dashboard fallback to open over a claimed gesture. Normalize subscriptions the same way or fan out to both the original gestureName and the legacy kind alias.

Useful? React with 👍 / 👎.

@PhilippeFerreiraDeSousa PhilippeFerreiraDeSousa force-pushed the codex/g2-selectable-list-dashboard-fallback branch from 05166ed to 4c8ad66 Compare June 26, 2026 18:04
@PhilippeFerreiraDeSousa

Copy link
Copy Markdown
Contributor Author

This should be the behavior we want : selectable lists. double tap available to mini apps with no dashboard interference if the mini app listens on it.
No time to retest though. There is a test mini app on cyborgday-github-miniapp at mini apps/selectable-list-demo/. Also miniapps/dev-hud uses it

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant