Repository navigation
fix(miniapp): preserve research and isolate topic sessions - #3317
Merged
bobleer merged 5 commits intoOct 9, 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
Keep MiniApp context as reference material for independent research, and make topic creation/restoration retain the correct conversation. Supplied files now point the Agent to exact per-turn paths without encouraging a field-by-field report or limiting available WebSearch/WebFetch tools.
MiniApp topic switches keep the selected dock position, wait for restored history, retry failed hydration, and reject messages delivered for an old session. PPT Live shares concurrent initialization for one topic, creates a separate session for a new topic, and preserves saved history references when restoration fails. Its bundled version is updated to 261.
Type and Areas
Type: bug fix / regression fix.
Areas: MiniApp contracts and SDK, desktop adapter, Web UI conversation routing, bundled PPT Live, documentation and regression tests.
Motivation / Impact
Starting a new PPT topic could race session initialization and move the floating conversation to an unrelated app. Restoring a missing session could silently replace its history pointer with an empty conversation. New topics now get their own session/workspace, while existing topics either restore their original conversation or report a retryable error.
The SDK adds
app.agent.createSession(options)through the existingagent.ensureSessionoperation with no session ID. Context-enabled market Agents retain research tools and their existing read-only file scope.Verification
CI run 37889161568 succeeded for
6945487abaf917a873826fe88e63036ec61b4d3e. All 11 completed PR checks passed; the 2 impact-gated packaging jobs were skipped by the existing workflow rules.The macOS and Linux desktop library suites executed and passed. The existing Windows desktop probe compiled the test executable but hit the known Tauri loader limitation (
0xc0000139,STATUS_ENTRYPOINT_NOT_FOUND) before any desktop tests ran. The workflow reports that limitation as a warning; the remaining Windows checks passed.Passed locally:
pnpm run fmt:rsandgit diff --check.pnpm run check:web(SDK, appearance/theme contracts and TypeScript).pnpm run test:ppt-live— 199 tests.cargo check --locked -p openbitfun-desktop --lib— passed with existing warnings.cargo test --locked -p openbitfun-desktop --lib api::miniapp_agent_api::tests— 10 tests, including the exact untrusted-context instruction contract.cargo test --locked -p openbitfun-product-domains --no-default-features --features miniapp --lib miniapp::agent_bridge::tests— 7 tests.cargo test --locked -p openbitfun-product-domains --no-default-features --features miniapp --test miniapp_contracts— 39 tests.cargo test --locked -p openbitfun-agent-tools --no-default-features --lib miniapp_run_restrictions_follow_the_runtime_profile_of_the_turn— 1 test.pnpm run i18n:auditandpnpm run theme:color-audit:all.node scripts/check-git-object-sizes.mjs --base upstream/main --head HEAD— within policy.pnpm --dir src/web-ui exec vitest run src/app/scenes/miniapps/hooks/useMiniAppBridge.test.tsx src/flow_chat/components/toolbar-mode/toolbarModeSessionSurface.test.ts— 31 tests after replacing the old source-text hydration assertion with a bridge behavior test.Focused frontend commands
Reviewer Notes
Checklist