11import { Show , createEffect , createMemo , createResource , untrack } from "solid-js"
22import { createStore } from "solid-js/store"
3+ import { Portal } from "solid-js/web"
34import { useSearchParams } from "@solidjs/router"
5+ import { Tooltip } from "@opencode-ai/ui/tooltip"
46import { NewSessionDesignView } from "@/components/session"
57import { PromptInput } from "@/components/prompt-input"
8+ import { StatusPopoverV2 } from "@/components/status-popover"
69import { useSettingsCommand } from "@/components/settings-dialog"
710import {
811 PromptProjectAddButton ,
@@ -15,11 +18,13 @@ import { useSDK } from "@/context/sdk"
1518import { useSync } from "@/context/sync"
1619import { useServerSync } from "@/context/server-sync"
1720import { useLanguage } from "@/context/language"
21+ import { useSettings } from "@/context/settings"
1822import { createPromptInputController , createPromptProjectControls } from "@/pages/session/composer"
1923import { useSessionKey } from "@/pages/session/session-layout"
2024import { useComposerCommands } from "@/pages/session/use-composer-commands"
2125import { NEW_SESSION_CONTENT_WIDTH } from "@/pages/session/new-session-layout"
2226import { PromptWorkspaceSelector } from "@/components/prompt-workspace-selector"
27+ import { useTitlebarRightMount } from "@/components/titlebar"
2328
2429const showWorkspaceBar = import . meta. env . VITE_OPENCODE_CHANNEL !== "prod"
2530
@@ -35,6 +40,7 @@ export default function NewSessionPage() {
3540 const serverSync = useServerSync ( )
3641 const comments = useComments ( )
3742 const language = useLanguage ( )
43+ const settings = useSettings ( )
3844 const route = useSessionKey ( )
3945 const [ searchParams , setSearchParams ] = useSearchParams < { draftId ?: string ; prompt ?: string } > ( )
4046
@@ -55,6 +61,7 @@ export default function NewSessionPage() {
5561 } )
5662
5763 const [ store , setStore ] = createStore < { worktree ?: string } > ( { } )
64+ const rightMount = useTitlebarRightMount ( )
5865
5966 const newSessionWorktree = createMemo ( ( ) => {
6067 if ( store . worktree ) return store . worktree
@@ -92,6 +99,17 @@ export default function NewSessionPage() {
9299
93100 return (
94101 < div class = "relative size-full overflow-hidden flex flex-col" >
102+ < Show when = { rightMount ( ) } >
103+ { ( mount ) => (
104+ < Portal mount = { mount ( ) } >
105+ < Show when = { settings . visibility . status ( ) } >
106+ < Tooltip placement = "bottom" value = { language . t ( "status.popover.trigger" ) } >
107+ < StatusPopoverV2 />
108+ </ Tooltip >
109+ </ Show >
110+ </ Portal >
111+ ) }
112+ </ Show >
95113 < div class = "flex-1 min-h-0 flex flex-col gap-2 p-2" >
96114 < div class = "@container relative flex flex-col min-h-0 h-full flex-1" >
97115 < div class = "flex-1 min-h-0 overflow-hidden rounded-[10px]" >
0 commit comments