Repository navigation
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New standalone web app (Even Hub SDK path) that mirrors orca-mobile's core flows on the G2 HUD: agent/session status dashboard, permission-ask quick actions, host/worktree lists, and terminal tail. Reuses Orca's E2EE wire protocol and src/shared wire types; fully testable via an in-browser canvas simulator + in-memory mock Orca server (no hardware needed). 267 unit + integration tests, typecheck + Vite build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ifecycle) Fixes from an adversarial codex review of the initial implementation: CRITICAL - ask quick-actions resolve the host's authoritative terminal (terminal.resolveActive) and fail closed instead of guessing the newest-output terminal - host-scoped effects require session.hostId === effect.hostId and clear host-scoped state on switch, so a stale ask can't cross the SSH/remote boundary - terminal tail requests capabilities.terminalBinaryStream:1 (real hosts send JSON otherwise) and degrades to an explicit 'unavailable' instead of a blank tail HIGH/MEDIUM - SnapshotStart JSON metadata no longer rendered as terminal text - terminal.send result (send.accepted) + rpc failures keep the ask actionable - feature RPCs gated behind the compat verdict; blocked -> hard-block screen - socket connect/handshake timeouts; no connected-listener double-send; e2ee decode size-bound + error containment - notification permission-ask reclassification race + getMissedSince backfill - lastOutputAt null handling; render-queue validates every page + spends startup latch on throw; force-rebuild after exit-dialog cancel; dashboard cursor/page split; worktree-list pagination; device token no longer in DOM attributes - mock server + integration tests now exercise the real wire contract 267 -> 348 tests; typecheck + Vite build + oxlint all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses a critical wear-the-glasses UX+bug review: Ask flow (flagship): resolve the UNIQUE waiting/blocked terminal via terminal.agentStatus (never desktop focus) and fail closed; synchronous per-prompt latch prevents double-sends / sends after expiry; phase-driven footer (Sending… / Sent — checking… / Not sent — click to retry / Delivery unknown); bounded confirmation poll; dedup + retire + synthesize current-ask from worktree permission state; one selector for header+click. Screens/nav: connecting/loading/stale/empty dashboard states; urgent (needs-input) rows first with a glanceable '▲ N need you · x/y' header; one stable cursor across dashboard pages (scroll=select/click=open, no mode flip); middle-ellipsized names keep distinguishing suffixes; stable worktree ordering avoids selection-resetting flicker; terminal tail states (loading/unavailable/empty) and follow-latest paging with click=latest; single-line header/footer budgets. Transport/robustness: request the binary terminal stream capability; post-auth liveness watchdog recycles a silently-dropped socket; QR sideload no longer treats a dev build as the simulator; bounded terminal decoder retention. Codex CLI upgraded to 0.153.4 to run gpt-6-astra. 422 tests; tc + build + oxlint green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…(re-review) Addresses regressions found by the codex gpt-6-astra re-review: - CRITICAL: ask-target resolver read a fictional agentStatus shape (state: waiting/blocked); the real contract is RuntimeTerminalAgentStatus.status === 'permission'. Resolver + mock now import and use @orca-shared/runtime-terminal-contracts so drift is a compile error; fail closed on zero/multiple/unverifiable probes. - Prompt identity (notificationId) now threaded through sendAskAnswer and re-validated after async terminal resolution — an expired ask can no longer answer a later prompt. - askInteraction scoped by host+notificationId; success AND failure callbacks guarded by session/host identity; no cross-host/prompt leak. - Notification retirement tombstones preserved across redelivery; permission episodes tracked so an old completion isn't promoted to a new ask. - Long ask bodies wrap/reserve control space so the option strip is never truncated away while send stays enabled. - Confirmation poll: single non-overlapping awaited loop with a wall-clock deadline + late reconcile (stalled→answered). - Terminal tail: frozen browsing window (history no longer jumps on new output), empty→'No output yet', resolving vs no-active-terminal states, wide lines wrapped so they can't overflow the body region. 445 tests; tc + build + oxlint green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Too many files changed for review (131 files, 100 file limit). Bypass the limit by tagging |
There was a problem hiding this comment.
Important
The terminal-tail feature cannot work against a real desktop: it resolves the terminal via terminal.resolveActive, which is not in the mobile RPC allowlist. Details inline.
Reviewed changes
A greenfield standalone web app (even-g2/) that brings Orca's companion experience to Even Realities G2 glasses — an E2EE WebSocket client speaking the existing mobile wire protocol, an in-memory mock server + canvas simulator, and a phone-side pairing/settings page. It ships with 445 tests and does not touch mobile/ or the desktop build.
- E2EE transport — browser port of
src/shared/e2ee-crypto.ts(tweetnacl, atob/btoa framing) plus a reimplementation of mobile'sDirectRpcClient(handshake, request/subscription registries, reconnect backoff, post-auth liveness probe). - Ask-answer quick actions — resolves the worktree's unique waiting terminal via
terminal.list+terminal.agentStatus(fail-closed on zero/ambiguous/unverifiable), re-validates prompt identity across async gaps, and latches against double-sends. - HUD rendering — page spec/validator/differ, serialized render queue, text pagination, and navigation state machine over firmware text/list containers.
- Simulator + tests —
MockOrcaServerperforming the real E2EE handshake,GlassesBridgecanvas preview, and unit/integration coverage of the ask/exit/terminal flows.
ℹ️ The client never sends a client field, so mobile terminal semantics don't engage
The even-g2 client pairs as a mobile-scoped device, but its terminal.subscribe / terminal.send requests omit client ({ type: 'mobile', id }). On the host, terminal-subscribe-method.ts keys isMobile off params.client?.type === 'mobile', so even-g2 is treated as a legacy/clientless client: handleMobileSubscribe is skipped and the requested viewport: { cols: 60, rows: 20 } is silently ignored (output streams at native PTY width). terminal.send still works via the legacy "missing client = unlocked" fallback in terminal-input-delivery.ts, and binary streaming is unaffected (it keys off capabilities.terminalBinaryStream + sendBinary, not client). Worth confirming this is the intended posture rather than a missed field — if you want the host to auto-fit to the HUD viewport, terminal.subscribe needs a client id.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
📝 WalkthroughWalkthroughAdds a standalone Merge Risk: 🟡 Moderate · up to Connection changes can produce stale simulator responses, transient terminal lookup failures can break navigation, and host restarts can duplicate inbox notifications. These should be addressed before merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description provides substantial context about the app, its scope, rationale, features, limitations, and testing. However, it omits required template sections, including Linked Issue, Visual Proof, Review, Agent skill upstream boundary, Notes, and Checklist. It also does not include the required issue reference or visual proof statement, and its test count conflicts with the PR objectives. Resolution Add every required template section. Include a valid Linked Issue entry with Full details: Docstring CoverageExplanation Docstring coverage is 31.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 169 functions across 72 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 14
🧹 Nitpick comments (1)
even-g2/package.json (1)
21-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin
@evenrealities/evenhub-clito0.1.14.The lockfile resolves
latestto0.1.14, while the manifest still permits a future lockfile refresh to select another CLI version. Theqrandpackscripts execute this CLI directly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 1784b94f-7778-48df-9b02-9602b230481f
⛔ Files ignored due to path filters (2)
even-g2/assets/icon-24.pngis excluded by!**/*.pngeven-g2/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (124)
docs/superpowers/specs/2026-09-05-even-g2-app-design.mdeven-g2/.gitignoreeven-g2/app.jsoneven-g2/assets/README.mdeven-g2/index.htmleven-g2/package.jsoneven-g2/pnpm-workspace.yamleven-g2/sim.htmleven-g2/src/app-boot.integration.test.tseven-g2/src/app/agent-terminal-resolution.test.tseven-g2/src/app/agent-terminal-resolution.tseven-g2/src/app/app-shell.test.tseven-g2/src/app/app-shell.tseven-g2/src/app/ask-interaction-tracking.tseven-g2/src/app/bridge-detection.test.tseven-g2/src/app/bridge-detection.tseven-g2/src/app/host-session-manager.test.tseven-g2/src/app/host-session-manager.tseven-g2/src/app/nav-context.test.tseven-g2/src/app/nav-context.tseven-g2/src/app/nav-ports.test.tseven-g2/src/app/nav-ports.tseven-g2/src/app/orca-handshake-test-server.tseven-g2/src/app/phone-page-mount.tseven-g2/src/app/profile-controller.test.tseven-g2/src/app/profile-controller.tseven-g2/src/app/terminal-tail-frame-patch.tseven-g2/src/ask-flow.integration.test.tseven-g2/src/exit-flow.integration.test.tseven-g2/src/glasses/even-hub-bridge.test.tseven-g2/src/glasses/even-hub-bridge.tseven-g2/src/glasses/glasses-bridge.tseven-g2/src/glasses/glasses-event-normalization.test.tseven-g2/src/glasses/glasses-event-normalization.tseven-g2/src/glasses/glasses-storage-cache.test.tseven-g2/src/glasses/glasses-storage-cache.tseven-g2/src/hud/hud-glyphs.test.tseven-g2/src/hud/hud-glyphs.tseven-g2/src/hud/hud-page-differ.test.tseven-g2/src/hud/hud-page-differ.tseven-g2/src/hud/hud-page-spec.test.tseven-g2/src/hud/hud-page-spec.tseven-g2/src/hud/hud-page-validator.test.tseven-g2/src/hud/hud-page-validator.tseven-g2/src/hud/hud-render-queue.test.tseven-g2/src/hud/hud-render-queue.tseven-g2/src/hud/hud-text-pagination.test.tseven-g2/src/hud/hud-text-pagination.tseven-g2/src/main.tseven-g2/src/navigation/ask-quick-action.test.tseven-g2/src/navigation/ask-quick-action.tseven-g2/src/navigation/hud-input-router.test.tseven-g2/src/navigation/hud-input-router.tseven-g2/src/navigation/hud-navigation-dashboard.test.tseven-g2/src/navigation/hud-navigation-dashboard.tseven-g2/src/navigation/hud-navigation-frames.tseven-g2/src/navigation/hud-navigation-list-select.test.tseven-g2/src/navigation/hud-navigation-list-select.tseven-g2/src/navigation/hud-navigation.test.tseven-g2/src/navigation/hud-navigation.tseven-g2/src/navigation/nav-contract.tseven-g2/src/phone-page/phone-settings-page.test.tseven-g2/src/phone-page/phone-settings-page.tseven-g2/src/screens/ask-screen.test.tseven-g2/src/screens/ask-screen.tseven-g2/src/screens/blocked-compat-screen.tseven-g2/src/screens/dashboard-screen.test.tseven-g2/src/screens/dashboard-screen.tseven-g2/src/screens/host-list-screen.test.tseven-g2/src/screens/host-list-screen.tseven-g2/src/screens/pairing-screen.test.tseven-g2/src/screens/pairing-screen.tseven-g2/src/screens/screen-view-model.test.tseven-g2/src/screens/screen-view-model.tseven-g2/src/screens/terminal-tail-screen.test.tseven-g2/src/screens/terminal-tail-screen.tseven-g2/src/screens/worktree-list-screen.test.tseven-g2/src/screens/worktree-list-screen.tseven-g2/src/sim/glasses-canvas-preview.tseven-g2/src/sim/memory-socket-pair.test.tseven-g2/src/sim/memory-socket-pair.tseven-g2/src/sim/memory-socket-web-socket-adapter.tseven-g2/src/sim/mock-glasses-bridge.test.tseven-g2/src/sim/mock-glasses-bridge.tseven-g2/src/sim/mock-orca-connection-state.tseven-g2/src/sim/mock-orca-fixtures.tseven-g2/src/sim/mock-orca-server-encryption.tseven-g2/src/sim/mock-orca-server.test.tseven-g2/src/sim/mock-orca-server.tseven-g2/src/sim/mock-orca-terminal-methods.tseven-g2/src/sim/mock-terminal-registry.tseven-g2/src/sim/mock-terminal-stream-frames.tseven-g2/src/sim/sim-entry.tseven-g2/src/state/connection-status-state.test.tseven-g2/src/state/connection-status-state.tseven-g2/src/state/hud-store.test.tseven-g2/src/state/hud-store.tseven-g2/src/state/notification-inbox-state.test.tseven-g2/src/state/notification-inbox-state.tseven-g2/src/state/terminal-tail-state.test.tseven-g2/src/state/terminal-tail-state.tseven-g2/src/state/worktree-dashboard-state.test.tseven-g2/src/state/worktree-dashboard-state.tseven-g2/src/terminal-tail.integration.test.tseven-g2/src/transport/glasses-e2ee.test.tseven-g2/src/transport/glasses-e2ee.tseven-g2/src/transport/host-profile-store.test.tseven-g2/src/transport/host-profile-store.tseven-g2/src/transport/orca-connection-stage-timer.tseven-g2/src/transport/orca-reconnect-scheduler.tseven-g2/src/transport/orca-request-registry.tseven-g2/src/transport/orca-rpc-wire.tseven-g2/src/transport/orca-socket-client.test.tseven-g2/src/transport/orca-socket-client.tseven-g2/src/transport/orca-socket-frames.tseven-g2/src/transport/orca-socket-handshake.tseven-g2/src/transport/orca-subscription-registry.tseven-g2/src/transport/pairing-code-decode.test.tseven-g2/src/transport/pairing-code-decode.tseven-g2/src/transport/terminal-tail-decoder.test.tseven-g2/src/transport/terminal-tail-decoder.tseven-g2/tsconfig.jsoneven-g2/vite.config.tseven-g2/vitest.config.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
- CRITICAL: terminal.resolveActive is not in the mobile RPC allowlist, so it 403s on a real desktop and the tail never opens. Replace it with an allowlisted terminal.list-based viewer resolver. All RPC methods used are now allowlisted. - Security: limit Vite server.fs.allow to project + ../src/shared (CWE-200); don't latch reconnects on an unauthenticated plaintext e2ee_error (CWE-345). - Correctness: reset connection/dashboard/inbox slices on session close; invalidate compat probes on every connection transition + teardown; reset the notification watermark seq when the epoch changes; keep the list-source input fallback when metadata is absent. - Stability: catch rejected rebuildPage()/upgradeText(); force-reconnect (and close the socket) when the handshake can't start. - app.json: mark the network whitelist dev-only (not portal-submission-ready). - Simulator: dedupe peer close, guard base64 decode, deliver notification backlog to the subscriber only, preserve subscribe response-before-frame order under delayMs, clear the canvas when no HUD page exists. 472 tests; tc + build + oxlint green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks @coderabbitai and @pullfrog — all suggestions addressed in the latest commit. Summary: Critical / Major
Correctness / Stability / Security
Simulator/mock
Each change has colocated tests. Full suite: 472 tests, |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
One fix commit landed since the prior pullfrog review (7b3e356), addressing the earlier terminal.resolveActive allowlist finding plus a set of hardening items.
- Terminal-tail resolution (finding #1) — replaced the non-allowlisted
terminal.resolveActivewithterminal.list, now a documented best-candidate heuristic (agentIdentity-preferred, newestlastOutputAttie-break) plus tests assertingterminal.resolveActiveis never emitted. - Render-queue error handling (finding #5) — a rejecting
rebuildPage/upgradeTextbridge call is caught, retried once, and reported rather than surfacing as an unhandled rejection. - Event normalization (finding #4) — a
source: 'list'click with neither metadata field maps tolistSelect(-1)instead of a no-op generic click. - Session teardown (finding #3) —
close()now resets the host-scopedconnection/dashboard/inboxslices, not justterminalTail. - Probe/watermark correctness (findings #6, #7) — in-flight compat probes are invalidated on disconnect/dispose, and the notification watermark resets on a new
notificationEpoch. - Socket lifecycle (findings #8, #9) — a pre-auth plaintext
e2ee_errornow reconnects instead of latching (CWE-345), and the socket closes whenbeginE2eeHandshakethrows. - Dev-server/manifest scoping — Vite
fs.allowis scoped to the project root +../src/shared(no longer..), and thenetwork.whitelistplaceholder is emptied.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior review, commit 7b3e356 addressed every open finding, each with a colocated regression test:
- Terminal-tail resolution moved off
terminal.resolveActive— the tail-open path now usesresolveViewableTerminalHandle, resolving via the allowlistedterminal.list(prefers anagentIdentityrow, tie-broken by newestlastOutputAt) instead of the mobile-forbiddenterminal.resolveActive. - Vite dev
fs.allowscoped — narrowed from the whole repo ('..') to the project root +../src/shared, closing the/@fs/exposure while keeping the project's own files servable. - Handshake hardening (CWE-345) — a plaintext pre-auth
e2ee_erroris now transient (reconnect) rather than a latched rejection, since it carries no proof of origin; only an authenticated, decrypted rejection latches. - Connection/inbox lifecycle fixes —
HostSessionManager.close()now resets the connection/dashboard/inbox slices;probeSeqinvalidation covers every non-connected transition and teardown; the notification watermark resets on a new epoch. - Mock/simulator fidelity — no duplicate peer
onclose;terminal.subscriberesponse ordered before its binary frames underdelayMs; the initial notification backlog goes only to the subscribing socket; the canvas clears when there's no HUD page. - Render-queue error recovery — rejecting
rebuildPage()/upgradeText()calls are caught and routed throughonRenderError+ retry/rebuild instead of escaping as unhandled rejections.
I verified the RPC surface against MOBILE_RPC_METHOD_ALLOWLIST: terminal.list, terminal.agentStatus, terminal.send, terminal.subscribe, terminal.unsubscribe, notifications.subscribe, notifications.getMissedSince, runtime.clientCapabilities.update, status.get, and worktree.ps are all present, and terminal.resolveActive is (correctly) absent — no client path emits it.
Non-blocking leftover from the swap: nav-ports.test.ts still declares the now-dead resolveActiveResult knob (and its terminal.resolveActive fake branch), and the comment above openTerminalTail still reads "in-flight resolveActive round-trip". Harmless, removable in a follow-up.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 61062343-9fff-47f7-9ea7-2c41447bc3d5
📒 Files selected for processing (33)
docs/superpowers/specs/2026-09-05-even-g2-app-design.mdeven-g2/app.jsoneven-g2/src/app/agent-terminal-resolution.test.tseven-g2/src/app/agent-terminal-resolution.tseven-g2/src/app/host-session-manager.test.tseven-g2/src/app/host-session-manager.tseven-g2/src/app/nav-ports.tseven-g2/src/glasses/glasses-event-normalization.test.tseven-g2/src/glasses/glasses-event-normalization.tseven-g2/src/hud/hud-render-queue.test.tseven-g2/src/hud/hud-render-queue.tseven-g2/src/sim/glasses-canvas-preview.test.tseven-g2/src/sim/glasses-canvas-preview.tseven-g2/src/sim/memory-socket-pair.test.tseven-g2/src/sim/memory-socket-pair.tseven-g2/src/sim/mock-orca-server-encryption.test.tseven-g2/src/sim/mock-orca-server-encryption.tseven-g2/src/sim/mock-orca-server-handshake.tseven-g2/src/sim/mock-orca-server-send-queue.tseven-g2/src/sim/mock-orca-server.test.tseven-g2/src/sim/mock-orca-server.tseven-g2/src/sim/mock-orca-terminal-methods.tseven-g2/src/sim/sim-entry.test.tseven-g2/src/sim/sim-entry.tseven-g2/src/state/connection-status-state.test.tseven-g2/src/state/connection-status-state.tseven-g2/src/state/notification-inbox-state.test.tseven-g2/src/state/notification-inbox-state.tseven-g2/src/terminal-tail.integration.test.tseven-g2/src/transport/orca-socket-client.test.tseven-g2/src/transport/orca-socket-client.tseven-g2/src/transport/orca-socket-handshake.tseven-g2/vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (12)
- even-g2/src/app/host-session-manager.ts
- even-g2/vite.config.ts
- even-g2/src/glasses/glasses-event-normalization.test.ts
- even-g2/app.json
- even-g2/src/glasses/glasses-event-normalization.ts
- even-g2/src/app/host-session-manager.test.ts
- even-g2/src/sim/mock-orca-server-encryption.ts
- even-g2/src/sim/memory-socket-pair.ts
- even-g2/src/hud/hud-render-queue.test.ts
- even-g2/src/sim/memory-socket-pair.test.ts
- even-g2/src/hud/hud-render-queue.ts
- even-g2/src/sim/mock-orca-server.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| port: RpcPort, | ||
| worktreeId: string | ||
| ): Promise<string | null> { | ||
| const response = await port.sendRequest('terminal.list', { worktree: `id:${worktreeId}` }) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Handle rejected terminal.list requests.
RpcPort.sendRequest rejects on timeout and authentication failure. Line 34 lets that rejection escape this resolver. openTerminalTail awaits the resolver without a catch, so a transient request failure rejects navigation instead of returning null and leaving the terminal-tail state unchanged.
Catch the request rejection and return null. Add a rejection test.
|
|
||
| /** Drops the queue tail for a closed/detached socket. */ | ||
| forget(socket: MemorySocketLike): void { | ||
| this.tails.delete(socket) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Invalidate queued sends when detaching a socket.
If MockOrcaServer.attach() detaches an still-open socket, PerSocketSendQueue.forget() only removes the queue entry. An existing setTimeout callback can still run, pass the OPEN check in respond(), and deliver a stale response to the client. Invalidate queued work per socket and check the token before calling run().
| }) | ||
|
|
||
| port.sendRequestQueue.push(okMissedResponse([], 'epoch-2')) | ||
| port.onData?.({ type: 'ready', epoch: 'epoch-2' }) // resubscribe after reconnect |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Reset the watermark when reconnect ready changes epoch.
handleReady() updates lastSeenEpoch only on cold start. If the host emits a new epoch before any notification, backfillMissed() can send the old epoch and lastSeenSeq. MobileNotificationReplayBuffer.getMissedSince() can then return the full retained buffer, while toEntry() gives entries without notificationId new local-* IDs and appends duplicates. Adopt the new epoch and reset lastSeenSeq before backfill. Add a ready-first regression case.
| serverPublicKeyB64: harness.serverPublicKeyB64, | ||
| socketFactory: harness.socketFactory | ||
| }) | ||
| await flushMicrotasks() |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Inject the plaintext error before authentication completes.
The initial flushMicrotasks() completes the fake handshake before the test sends e2ee_error. Remove that flush so the test covers the pre-authentication regression path. Production already reconnects without entering auth-failed; the current ordering only leaves that behavior without direct coverage.
Proposed fix
- await flushMicrotasks()
-
// An on-path attacker (or a confused host) sends a plaintext e2ee_error BEFORE
// authentication — it carries no cryptographic proof of origin, unlike the encrypted
// rejection the "latches auth-failed" test above exercises.
harness.servers[0]!.socket.send(JSON.stringify({ type: 'e2ee_error' }))
await flushMicrotasks()|
Tip For best results, initiate chat on the files or code changes.
🐇 ✅ ✏️ Learnings added
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! You are interacting with an AI system. |

Orca for Even Realities G2 — smart‑glasses companion
Adds
even-g2/, a new standalone web app that brings Orca's mobile companion experience to Even Realities G2 smart glasses, reinterpreted for a glanceable heads‑up display. There was no G2 app in this repo before; this is a greenfield addition and does not touch the desktop ormobile/builds.Why a web app (and not raw BLE)
The G2's official, app‑store‑distributable path is the Even Hub SDK: your app is a web app served to the phone's Even App, which renders firmware "containers" (text/list) on the glasses and relays tap/scroll/double‑tap input back over BLE.
even-g2/follows that model and talks to an Orca desktop over Orca's existing end‑to‑end‑encrypted WebSocket JSON‑RPC protocol, reusing thesrc/shared/*wire types. Zero wire changes; it advertises an empty client‑capability set and version‑gates viastatus.get.What it does on the HUD
▲ N need you · x/yheader.Sending… / Sent — checking… / Not sent — click to retryfeedback.How it was built & reviewed
Planned with a design spec (
docs/superpowers/specs/2026-09-05-even-g2-app-design.md), implemented in modular units, then put through two adversarial code‑review passes — a general correctness/wire‑compat pass and a real‑wear usability + bug pass — with all CRITICAL and HIGH findings fixed and regression‑tested. Notably fixed during review:terminal.agentStatus.status === 'permission'(the realRuntimeTerminalAgentStatuscontract) and fail closed on zero/multiple/unverifiable matches — never desktop focus, never a guess. Prompt identity is carried through and re‑validated after async resolution so an expired ask can't answer a later prompt; the send is host+prompt‑scoped and latched against double‑sends.Testing
even-g2is self‑contained with its own lockfile, mirroring howmobile/is isolated).pnpm simopens the simulator;pnpm dev+pnpm qrsideloads onto the Even App for real‑device QA.pnpm tc,pnpm build, andoxlintare all green.Known limitations / follow‑ups (documented, not blocking)
1 2 3 Enter Esc) and fails closed when the terminal can't be resolved. Rendering exact option text vianative-chat-askis the v2 upgrade (no wire change needed).requireV2on relay.worktreeListscreen is currently unreachable now that the dashboard serves as the navigable list — to be formally removed or given an entry point in a follow‑up..ehpknetwork whitelist remain a hardware‑QA gate before store submission.🤖 Generated with Claude Code