feat(mobile-remote): add secure browser session control - #1150
Open
beruro wants to merge 17 commits into
Open
Conversation
…e-control # Conflicts: # src-tauri/crates/orgtrack-core/src/sources/imported_history/cache.rs # src-tauri/src/lib.rs
…e-control # Conflicts: # src-tauri/src/orgtrack/history_commands/provider_commands.rs
Collaborator
Author
|
@Neonforge98 麻烦帮忙处理这个阻塞项: 生产 Supabase 项目
请不要使用 wildcard,也不要修改 GitHub OAuth App callback。保存后麻烦在这里回读确认:列表中能看到该完整 URL,Total URLs 为 4。 代码侧已验证客户端请求的就是该 callback,Worker 路由也已返回 200;当前故障是 Supabase 未 allowlist 时回退到 Site URL。Infra 配置说明在 https://github.com/org2AI/ORGII-cloud-infra/pull/31 。你确认配置完成后,我会继续跑真实登录回跳 smoke。 |
sudomaggie
marked this pull request as ready for review
September 1, 2026 16:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ORGII sessions could only be operated reliably from the Desktop ChatPanel. The browser/mobile surface had no authenticated transport into the desktop runtime, no canonical projection for provider history and rounds, and no shared browser-safe presentation path for messages, tools, permissions, loading, file previews, session rows, settings, or device state. This caused stale or misordered rounds, submitted prompts appearing late or in the previous round, empty loading states, overlapping long settings values, inconsistent file-diff surfaces, raw protocol values, inert settings actions, and UI drift from Desktop.
The hosted mobile surface also accepted a device pairing credential without first requiring an ORG2 Cloud identity, so pairing and account authentication were not separate security boundaries.
Solution
Add Mobile Remote as one authenticated end-to-end lifecycle:
/orgii/mobilebrowser entry and settings/pairing flow for LAN or outbound relay connections#pairstate into the dedicated opaque intent store before login, persist only the sanitized return path, and prevent BYOK skip from bypassing mobile authenticationdevelopthrough68e7aff15; preserve the shared Desktop/Mobile session-row tokens across the Tailwind v4 migration, bind the new pill regression to its canonical shared token, and restore the generated-title repair helpers at their new cache module boundariesThe Cloudflare authentication boundary is reviewed separately in ORGII-cloud-infra#31. The
session_turns.turn_intent_idcolumn remains nullable and is added idempotently; the turn index is rebuilt from canonical events rather than destructive history cleanup.Potential risks
ChatCodeBlockor auth atom would pull editor/Tauri ownership into the public bundle, so shared browser-safe schema and presentation leaves are the reuse boundary.Verification
Latest develop integration (2026-09-02)
origin/developat68e7aff15; final PR head is31296cdc0SESSION_ROW_PRESENTATIONownership while adopting Tailwind v4 canonical class names and orderingpnpm install --frozen-lockfile— passedpnpm typecheck— passedpnpm lint— passed after fixing 13 Tailwind v4 class-order violations in PR-owned filescargo clippy -p orgtrack_core --all-targets -- -D warnings— passed, covering the prior missing generated-name helper failure pathpnpm test -- --reporter=dot— 1,369 files and 10,600 tests passed on the final basedevelop's bounded Vitest pool, the final full suite passedgit diff --check, conflict-marker scan, and staged secret/personal-path scan — passedExisting feature verification
#pairout of generic router/login storagepnpm check:test-placement— 468 test-bearing directories passedFAST_PROD=true pnpm build:release— production Webpack build passed in 27.438 secondscargo check -p orgtrack_core— passeda7f9d501-0fb5-4734-8251-e6a0341ee99adeployed athttps://orgii-mobile-relay.superficial-jasper.workers.dev/orgii/mobile/healthzreturned protocol version 1;/orgii/mobileand/orgii/mobile/auth/callback?code=probereturned 200 with the mobile shell; invalid auth exchange and unauthenticated WebSocket upgrade both returned 401https://org2-cloud-infra.vercel.app, 3 existing redirects, and no Worker callback; current account exposes disabled edit controlsSUPABASE_ACCESS_TOKEN, full physical-device matrix, accessibility review, security review, and soak testingFrontend UI audit
Architecture audit
#pairstate into the dedicated bounded intent before generic login state is created; malformed callbacks and permanent auth failures fail closedPerformance guard