Repository navigation
fix(web-ui): preserve internal MiniApp session scope - #3792
Merged
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
Opening an Agentic MiniApp's existing conversation could report that its permission mode could not be read. MiniApp conversations use hidden runtime sessions, but the composer omitted
includeInternal, so the host rejected an otherwise valid session as missing.Use one internal-session visibility policy for permission reads/changes, model routing status, mode changes, history restore/paging/settlement, runtime restoration before send, and model-pool refresh. Permission requests preserve the owning workspace and remote locator, including when a review inherits its MiniApp parent's selection. Actual read failures still surface to the user.
Type and Areas
Type: bug fix
Areas: Web UI, MiniApp conversations, session permissions and history
Motivation / Impact
Fixes the shared Agentic MiniApp path, including restored topics, permission changes, older-history reads, and canonical response repair after a turn finishes. Ordinary sessions retain their existing visibility, and explicit history visibility overrides remain authoritative. Existing request fields and stored data formats remain compatible; no migration is needed.
Verification
pnpm --dir src/web-ui run test:run src/flow_chat/utils/sessionPermissionMode.test.ts src/flow_chat/utils/modelSelectionTarget.test.ts src/app/scenes/miniapps/hooks/useMiniAppBridge.test.tsx src/flow_chat/store/FlowChatStore.test.ts src/flow_chat/services/flow-chat-manager/SessionModule.test.ts src/flow_chat/services/flow-chat-manager/EventHandlerModule.test.ts src/flow_chat/services/inheritReviewPermissionMode.test.ts src/flow_chat/components/ModelSelectorProviderLevels.test.tsx src/flow_chat/hooks/useSessionModeSelection.test.tsx— 620 tests passed across 9 files.pnpm run check:web— passed, including TypeScript and Appearance/theme governance.pnpm --dir src/web-ui run lint— passed with existing unrelated warnings.git diff --check— passed.Reviewer Notes
AI-assisted change with focused automated verification. The local fixes for unmaterialized sessions (
9326301874) and parent-backed BTW sessions (6dfdbb784a) do not address internal MiniApp visibility; those lifecycle rules are preserved.Checklist