Skip to content

fix(web-ui): preserve internal MiniApp session scope - #3792

Merged
bobleer merged 2 commits into
openBitFun:mainfrom
bobleer:bob/fix-miniapp-permission-mode
Nov 7, 2026
Merged

bobleer merged 2 commits into
openBitFun:mainfrom
bobleer:bob/fix-miniapp-permission-mode

Conversation

@bobleer

@bobleer bobleer commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

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.
  • Six added history/restore regression cases failed before the correction and passed after it. Request, store and DOM fixtures also cover all three permission operations, legacy path-only scopes, internal subagents, MiniApp review inheritance, host routing restrictions, and owning-project scope for a simulated SSH worktree. Existing store suites exercise simulated Peer changes and history recovery.
  • No native desktop UI verification or live Remote Workspace, Remote Control, Peer Device, or Detached Dispatch run was performed.

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

  • 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.

@bobleer bobleer changed the title fix(web-ui): preserve internal MiniApp permission scope fix(web-ui): preserve internal MiniApp session scope Nov 7, 2026
@bobleer
bobleer merged commit bf2d0b7 into openBitFun:main Nov 7, 2026
9 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