Prepare TUI lifecycle for scenario tests (#28258)

This commit is contained in:
Sebastian
2026-05-26 21:02:02 +02:00
committed by GitHub
parent fdfd0afed7
commit 848d763d08
9 changed files with 596 additions and 280 deletions

View File

@@ -67,7 +67,6 @@ export const AttachCommand = cmd({
})()
const headers = ServerAuth.headers({ password: args.password, username: args.username })
const config = await TuiConfig.get()
const { tui } = await import("./app")
try {
await validateSession({
@@ -82,9 +81,12 @@ export const AttachCommand = cmd({
return
}
await tui({
const { createTuiRenderer, tui } = await import("./app")
const renderer = await createTuiRenderer(config)
const handle = tui({
url: args.url,
config,
renderer,
args: {
continue: args.continue,
sessionID: args.session,
@@ -93,6 +95,7 @@ export const AttachCommand = cmd({
directory,
headers,
})
await handle.done
} finally {
unguard?.()
}