Skip to content

Mobile: Scaffold dual-runtime foundation / 移动端:搭建双运行时基础#6633

Draft
SivanCola wants to merge 6 commits into
esengine:main-v2from
SivanCola:feature/mobile-app
Draft

Mobile: Scaffold dual-runtime foundation / 移动端:搭建双运行时基础#6633
SivanCola wants to merge 6 commits into
esengine:main-v2from
SivanCola:feature/mobile-app

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • Add a versioned mobile protocol and an on-device mobilecore foundation.
  • Add the multi-session reasonix node foundation with replay and deduplication primitives for phone-to-computer/server connections.
  • Add a React + Capacitor mobile shell with dual-runtime session abstractions, node pairing, approval UI, i18n, design tokens, and a dedicated CI job.
  • Harden phone/tablet pane sizing, snake_case tool risk classification, and CJK IME submission behavior.

Current scope

This draft establishes the mobile architecture, protocol, documentation, and UI foundation. Provider streaming and controller wiring, authenticated/encrypted remote pairing, native iOS/Android projects, secure credential storage, relay/push delivery, device testing, and store packaging remain follow-up work. This is not production-ready yet.

Compatibility

Contract Existing behavior Result
Existing CLI and desktop sessions Existing session storage and flows remain unchanged Compatible
reasonix serve Existing single-session HTTP/SSE surface remains unchanged Compatible
Mobile protocol envelope Introduces a separate, versioned v1 surface Compatible with existing clients
SessionDescriptor Mobile-only metadata; it is not written into the existing session format Compatible

Validation

  • make mobile-ci
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/ci.yml
  • git diff --cached --check

Cache-impact: none; this draft adds isolated mobile packages and does not change existing provider requests, system prompts, or tool schemas.
Cache-guard: local capability order is frozen and covered by focused protocol/mobilecore tests; provider-visible byte guards will be added when provider wiring lands.
System-prompt-review: n/a; no system prompt changes.

Add the mobile foundation: versioned MobileEnvelope, mobilecore JSON SDK,
reasonix node multi-session hub, and a Capacitor-ready React shell with
platform chrome (iOS/Android), SessionBackend, and local/remote create flow.

Cache-impact: none (new packages only; no provider/system/tool schema changes)
Cache-guard: local capability order frozen at session create; covered by protocol/mobilecore tests
System-prompt-review: n/a — no system prompt changes
Polish the mobile shell with platform motion, a pairing bottom sheet that
renders QR/URI payloads and persists fingerprints, and a risk-aware
approval sheet with long-press allow for dangerous writes.
Wire a dedicated CI job that gofmt/vets/tests mobileprotocol, mobilecore,
and node, then runs npm ci/typecheck/test/build under mobile/. Document the
local make mobile-ci mirror.
- Session panes had no layout rules below 900px, so the pane height
  collapsed to content: the chat composer floated mid-screen, the
  Android FAB sat mid-screen, and long session lists were clipped by
  the overflow:hidden root with no way to scroll. Base-layer flex
  rules now size both panes at every width.
- The tablet split view was dead CSS: .app-body > .sessions-root
  (0-2-0) always beat the media query's .sessions-split display:grid
  (0-1-0), stacking the panes vertically. The grid rule now matches
  that specificity.
- riskFromTool/isDangerousWrite used \b keyword checks, but \b does
  not break at underscores, so snake_case tools (delete_file,
  write_file) always classified as low risk and the long-press allow
  flow was unreachable. Separators are normalized to spaces before
  matching; covered by new approval.test.ts wired into npm test.
- Composer Enter now ignores IME composition (isComposing) so
  committing a CJK candidate no longer sends the draft.
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development tui Terminal UI / CLI (internal/cli, internal/control) labels Jul 18, 2026
Comment thread mobile/src/App.tsx
const send = useCallback(async () => {
if (!active || !activeBackend || !draft.trim() || sending) return;
const text = draft.trim();
const sessionId = active.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tui Terminal UI / CLI (internal/cli, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants