mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-11-16 13:11:03 +00:00
test(ui): register the standalone Mission reader occurrence
The foreground intent API correctly refuses gestures on closed occurrences. Register the standalone reader fixture's tab occurrence and carry one intent through its synthetic async reader-open action, matching the real shell's lifecycle admission. Keep the Escape, focus-return, pagination and draft assertions unchanged. The Windows affected-browser run passes 242 tests. Full Linux browser qualification exposed only this fixture-lifecycle omission alongside the two known prompt-menu failures; the complete mission-primitives suite now passes on Windows. Production source and the gesture/passive contract are unchanged.
This commit is contained in:
parent
bcc3b81005
commit
97b23df235
1 changed files with 9 additions and 3 deletions
|
|
@ -8,7 +8,9 @@ import { ConfigProvider, updatePreferences } from "../../../src/stores/preferenc
|
|||
import { I18nProvider, useI18n } from "../../../src/lib/i18n"
|
||||
import { ThemeProvider } from "../../../src/lib/theme"
|
||||
import { initializeClientState } from "../../../src/stores/client-state"
|
||||
import { missionProjectView, updateMissionProjectView } from "../../../src/stores/mission-view-state"
|
||||
import { missionProjectView, navigateMissionProjectView } from "../../../src/stores/mission-view-state"
|
||||
import { captureSessionSurfaceIntent } from "../../../src/stores/session-surface"
|
||||
import { publishInstanceLifecycleAuthority } from "../../../src/stores/instance-lifecycle-authority"
|
||||
import { missionStore } from "../../../src/stores/missions"
|
||||
import type { Instance } from "../../../src/types/instance"
|
||||
import "../../../src/index.css"
|
||||
|
|
@ -17,12 +19,16 @@ import { markSessionListsRestored } from "./session-list-restored"
|
|||
await initializeClientState()
|
||||
markSessionListsRestored("track3")
|
||||
const instance: Instance = { id: "track3", folder: "/fixture", port: 0, pid: 0, proxyPath: "/fixture", status: "ready", client: null }
|
||||
publishInstanceLifecycleAuthority({ type: "opened", instanceId: instance.id, folder: instance.folder, occurrence: 0 })
|
||||
function Fixture() {
|
||||
const { t } = useI18n()
|
||||
;(window as any).track3 = {
|
||||
show: async (kind: "overview" | "task" | "report" | "change", itemId?: string) => {
|
||||
await missionStore.refresh(instance.id)
|
||||
updateMissionProjectView(instance.id, { reader: { missionId: "reader", kind, itemId } })
|
||||
const intent = captureSessionSurfaceIntent({ instanceId: instance.id, sessionId: null })
|
||||
try {
|
||||
await missionStore.refresh(instance.id)
|
||||
navigateMissionProjectView(instance.id, { reader: { missionId: "reader", kind, itemId } }, intent)
|
||||
} finally { intent.release() }
|
||||
},
|
||||
locale: (locale: "en" | "he" | "tr") => updatePreferences({ locale }),
|
||||
bounded: (text: string) => getRenderTextWindow(text, MARKDOWN_TEXT_RENDER_CHARACTER_LIMIT).text,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue