Repository navigation
fix(miniapp): restore floating chat after workspace ID migration - #3298
Merged
bobleer merged 1 commit intoOct 8, 2026
Merged
Conversation
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.
Summary
Fix Agentic MiniApps failing to open floating chat after the workspace-ID migration. Existing apps using
agent.ensureSessioncan receiveLegacy 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_sessionandminiapp_agent_runcreate 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
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.cargo check --locked -p openbitfun-desktop(existing warnings).pnpm run fmt:rsandgit diff --check.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