Skip to content

fix(miniapp): preserve research and isolate topic sessions #7206

fix(miniapp): preserve research and isolate topic sessions

fix(miniapp): preserve research and isolate topic sessions #7206

Triggered via pull request October 9, 2026 04:59
Status Cancelled
Total duration 14m 37s
Artifacts –

ci.yml

on: pull_request
Build Impact
19s
Build Impact
Shell Deploy Scripts
14s
Shell Deploy Scripts
Matrix: cli-test
Matrix: Impact-selected Linux / Relay Contract / build
Waiting for pending jobs
Matrix: rust-build-check
DSH Profile Packaging (windows-latest)
0s
DSH Profile Packaging (windows-latest)
Frontend Build
10m 57s
Frontend Build
Rust / CLI Validation
3s
Rust / CLI Validation
Fit to window
Zoom out
Zoom in

Annotations

10 errors, 10 warnings, and 8 notices
Frontend Build
Process completed with exit code 1.
src/flow_chat/components/toolbar-mode/toolbarModeSessionSurface.test.ts > floating mini chat bubble MiniApp registration > hydrates a restored hidden topic session instead of substituting the latest chat: src/web-ui/src/flow_chat/components/toolbar-mode/toolbarModeSessionSurface.test.ts#L186
AssertionError: expected '/**\n * useMiniAppBridge — handles po…' to contain 'if (!result.created)' - Expected + Received - if (!result.created) + /** + * useMiniAppBridge — handles postMessage JSON-RPC from the MiniApp iframe: + * worker.call → JS Worker, dialog.open/save/message → Tauri dialog, + * ai.* → Host AI client, agent.* → Host agent bridge (hidden subagent runs), + * deck.renderPage → hidden host WebView slide rasterization (export), + * chat.* → floating session bubble composer claims and session focus, + * clipboard.* → Host navigator.clipboard. + * Also handles openbitfun/request-appearance and pushes Appearance changes to the iframe. + */ + import { useLayoutEffect, useRef, useEffect, useState, RefObject } from 'react'; + import { miniAppAPI } from '@/infrastructure/api/service-api/MiniAppAPI'; + import { open as dialogOpen, save as dialogSave, message as dialogMessage } from '@tauri-apps/plugin-dialog'; + import type { MiniApp } from '@/infrastructure/api/service-api/MiniAppAPI'; + import { useCurrentWorkspace } from '@/infrastructure/contexts/WorkspaceContext'; + import { useAppearance } from '@/infrastructure/appearance'; + import { buildMiniAppAppearancePayload } from '../utils/buildMiniAppAppearancePayload'; + import { api } from '@/infrastructure/api/service-api/ApiClient'; + import { useI18n } from '@/infrastructure/i18n'; + import type { MiniAppRunScope } from '../customization/miniAppCustomizationTypes'; + import { systemAPI } from '@/infrastructure/api/service-api/SystemAPI'; + import { workspaceAPI } from '@/infrastructure/api'; + import { + useMiniAppStore, + MINIAPP_COMPOSER_MESSAGE_EVENT, + MINIAPP_COMPOSER_DRAFT_EVENT, + MINIAPP_COMPOSER_FOCUS_EVENT, + normalizeMiniAppBubbleCustomization, + type MiniAppComposerMessageDetail, + } from '../miniAppStore'; + import { + completeMiniAppComposerMessage, + rejectPendingMiniAppComposerMessages, + } from '../miniAppComposerMessages'; + import { shouldOpenMiniAppAgentRunInMainScene } from './miniAppAgentVisibility'; + import { flowChatStore } from '@/flow_chat/store/FlowChatStore'; + import { openMainSession } from '@/flow_chat/services/sessionActivation'; + import { getActiveSurfaceScope } from '@/infrastructure/peer-device/deviceSurface'; + import { beginMiniAppOperation, isMiniAppClosing, trackMiniAppStream } from '../miniAppLifecycle'; + + interface JSONRPC { + jsonrpc?: string; + id: number | string; + method: string; + params?: Record<string, unknown>; + } + + interface AiStreamPayload { + appId: string; + streamId: string; + type: 'chunk' | 'done' | 'error'; + data: Record<string, unknown>; + } + + /** Distinguishes runners of the same app (installed app vs. draft preview). */ + let composerTokenSeq = 0; + + export function useMiniAppBridge( + iframeRef: RefObject<HTMLIFrameElement>, + app: MiniApp, + runScope: MiniAppRunScope, + strictRuntime = false, + ) { + const [bridgeReady, setBridgeReady] = useState(false); + const surfaceScope = useRef(getActiveSurfaceScope()).current; + const { workspacePath } = useCurrentWorkspace(); + const { current: currentAppearance } = useAppearance(); + const { currentLanguage } = useI18n('scenes/miniapp'); + const appearanceRef = useRef(currentAppearance); + appearanceRef.current = currentAppearance; + const workspacePathRef = useRef(workspacePath); + workspacePathRef.current = workspacePath; + const localeRef = useRef(currentLanguage); + localeRef.current = currentLanguage; + + const runScopeRef = useRef<MiniAppRunScope>(runScope); + runScopeRef.current = runScope; + // Whether this app opts out of the JS Worker. When true, framework primitive + // calls (fs.*/shell.*/os.*/net.*) are routed to the host directly via + // `miniapp_host_call`, so the app does not require Bun/Node at runtime. + // `storage.*` and any custom user RPC method still go through `worker.call`, + // but for `node.enabled = false` apps `storage.*` is served by the manager + // (no worker), and any non-namespaced custom call will fail
Rust Build Check (windows-latest)
Canceling since a higher priority waiting request for ci-refs/pull/3317/merge exists
Rust Build Check (windows-latest)
The operation was canceled.
Rust Build Check (ubuntu-latest)
Canceling since a higher priority waiting request for ci-refs/pull/3317/merge exists
Rust Build Check (ubuntu-latest)
The operation was canceled.
Rust Build Check (macos-15)
Canceling since a higher priority waiting request for ci-refs/pull/3317/merge exists
Rust Build Check (macos-15)
The operation was canceled.
Rust / CLI Validation
Process completed with exit code 1.
CI
Canceling since a higher priority waiting request for ci-refs/pull/3317/merge exists
Frontend Build: src/web-ui/src/shared/utils/lazyWithRecovery.tsx#L26
Fast refresh only works when a file only exports components. Move your component(s) to a separate file
Frontend Build: src/web-ui/src/infrastructure/file-export/saveHtmlFile.ts#L5
Unexpected control character(s) in regular expression: \x00, \x1f
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L144
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L139
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L135
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L130
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L111
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L101
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Frontend Build: src/web-ui/src/flow_chat/timeline/readerState.tsx#L92
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Shell Deploy Scripts
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"
Build Impact
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"
CLI Tests (ubuntu-latest)
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"
Frontend Build
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"
CLI Tests (macos-15)
Due to capacity constraints, jobs targeting macOS arm64 runners may experience longer queue times.
Rust Build Check (ubuntu-latest)
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"
Rust Build Check (macos-15)
Due to capacity constraints, jobs targeting macOS arm64 runners may experience longer queue times.
Rust / CLI Validation
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"