Skip to content

fix(miniapp): restore floating chat after workspace ID migration - #3298

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-miniapp-floating-chat-workspace
Oct 8, 2026
Merged

bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-miniapp-floating-chat-workspace

Conversation

@bobleer

@bobleer bobleer commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix Agentic MiniApps failing to open floating chat after the workspace-ID migration. Existing apps using agent.ensureSession can receive Legacy session workspace is unavailable; restore its workspace record, which they surface as a floating-chat connection failure.

Prepare and register host-owned appdata workspaces before both miniapp_agent_ensure_session and miniapp_agent_run create or restore sessions. Reuse the existing workspace service's registration operation so the directory gains a stable workspace ID without opening it, changing the current workspace, or adding it to recent workspaces.

Type and Areas

Type: regression fix

Areas: Rust Core MiniApp orchestration, desktop/Tauri, regression tests

Motivation / Impact

MiniApp topic directories existed before workspace IDs and were not necessarily registered in the workspace catalog. The new session normalization requires that record, so both legacy session restoration and fresh session creation could fail. Registration now happens at the MiniApp appdata entry point, allowing existing sessions and history to remain in use without requiring apps to change their API calls or users to reset their data.

Explicit workspace operands retain the existing admission path; only host-owned appdata directories are registered locally. Generic session validation remains unchanged.

Verification

  • Passed: cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-miniapp --lib miniapp::agent_workspace::tests — 2 tests covering the original legacy-reference error, old-config deserialization and round trip, stable IDs on repeated registration, fresh appdata topics, unchanged workspace selection/recent list, explicit-path isolation, and invalid relative paths.
  • Passed: cargo check --locked -p openbitfun-desktop (existing warnings).
  • Passed: pnpm run fmt:rs and git diff --check.
  • Tests use isolated local storage. Desktop click-through and Remote Workspace, Remote Control, Peer Device Mode, and Detached Dispatch end-to-end scenarios were not exercised. The explicit remote-path operand assertion is not evidence of remote transport behavior.

Reviewer Notes

AI-assisted implementation; testing level: lightly tested (focused automated regression tests and desktop compilation, no end-to-end UI run). No wire format, permission, locale, or persisted-field changes. A backend rebuild/restart is required for the fix to take effect.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable (focused test command documented; no string or locale changes).

@bobleer
bobleer merged commit 065fa61 into GCWing:main Oct 8, 2026
13 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