Skip to content

feat: resilient desktop login and MCP service guidance - #224

Merged
Luhaozhu merged 2 commits into
mainfrom
sync/ce-20261106-mcp-network
Nov 6, 2026
Merged

Luhaozhu merged 2 commits into
mainfrom
sync/ce-20261106-mcp-network

Conversation

@Luhaozhu

@Luhaozhu Luhaozhu commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Purpose and behavior

  • Before: Slow cloud startup or session checks could discard a saved desktop login. Models lacked service-level MCP guidance. Switching knowledge-base visibility could leave details from the previous category open.
  • After: Bounded network retries preserve saved sessions unless the server explicitly returns 401/403, expired device-login requests stop polling, models receive guidance for connected and visible MCP services, and knowledge-base details follow the selected category.

Change walkthrough

  • Flow: desktop/src-tauri/src/bootstrap.rs uses net.rs for connection budgets; session.rs, auth.rs, and device_login.rs handle startup, saved-session verdicts, and login retries. Backend MCP discovery retains service metadata in core/llm/mcp/session.py and lifetime.py; server_guidance.py renders it and core/llm/factory/assembly.py appends it to the runtime prompt. features/desktop/bridge/gateway.py carries gateway service labels/descriptions. CatalogPanel.tsx closes details outside the selected category.
  • Decisions: Share bounded retry behavior, distinguish authentication rejection from network uncertainty, and render deterministic guidance only for services exposing visible tools. Service instructions remain subordinate to system/user instructions and approvals. The CE content comes from the standard upstream derivation. Latest public main ed9253e1 is merged; the documentation conflict retains the implemented 10-second connection timeout from net.rs. Main's review workflow and shared rules are preserved. With feat: persistent sandbox snapshots and design workflow skills #222 and feat: slim desktop updates, cached capabilities, and current CE features #223 merged, the current diff is 21 files, 515 insertions, and 124 deletions.

Risk and compatibility

  • Risk: high
  • Boundaries: Desktop authentication, startup routing, cancellation epochs, and third-party MCP prompt text are sensitive boundaries. Saved credentials are removed only on explicit rejection. This delta does not change updater keys, database schemas, tool-approval requirements, or CE edition exclusions. It requires rebuilding clients to deliver shell changes.
  • Human review: A maintainer should assess saved-session handling, late-response cancellation, and the scope of service-provided MCP instructions before merging. No human approval is claimed.

Verification

  • Evidence: On merge head a5e018a4, all 19 PR-context unit tests, all 79 desktop-script tests, and git diff --cached --check passed before the commit. The merge leaves no unresolved paths. Prior validation of parent 64835085 passed CE publication gates, isolated import/OpenAPI/ORM checks, CE release regressions, and the CE frontend build. The corresponding product changes passed 32 backend tests, 117 UOS tests, and three native macOS retry tests.
  • Limits: Native CE CI is rerunning for the merge head. No new installer upgrade acceptance was performed for this documentation-only conflict resolution. The previously reported full-product frontend lint baseline remains 245 errors and 21 warnings.

Recovery

  • Steps: Keep the PR unmerged to avoid distributing these changes. If merged and a regression is found, revert the feature changes through a reviewed follow-up and rebuild affected clients. A code revert alone does not replace installed clients or restore externally changed state; this delta introduces no data migration.

Review follow-up

Community checklist

  • This is a maintainer-requested generated CE sync.
  • CONTRIBUTING.md was read; the resolved internal design reference matches the implementation and requires no new public bilingual behavior documentation.
  • Referenced repository paths and the timeout constant were checked.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T01:22:11.206352Z 6483508 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Luhaozhu
Luhaozhu merged commit 780c736 into main Nov 6, 2026
6 of 7 checks passed
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