@@ -10,17 +10,15 @@ import {
1010 ParentProps ,
1111 Show ,
1212 untrack ,
13- type JSX ,
1413} from "solid-js"
15- import { A , useNavigate , useParams } from "@solidjs/router"
14+ import { useNavigate , useParams } from "@solidjs/router"
1615import { useLayout , LocalProject } from "@/context/layout"
1716import { useGlobalSync } from "@/context/global-sync"
1817import { Persist , persisted } from "@/utils/persist"
1918import { base64Encode } from "@opencode-ai/util/encode"
2019import { decode64 } from "@/utils/base64"
2120import { ResizeHandle } from "@opencode-ai/ui/resize-handle"
2221import { Button } from "@opencode-ai/ui/button"
23- import { Icon } from "@opencode-ai/ui/icon"
2422import { IconButton } from "@opencode-ai/ui/icon-button"
2523import { Tooltip } from "@opencode-ai/ui/tooltip"
2624import { DropdownMenu } from "@opencode-ai/ui/dropdown-menu"
@@ -59,7 +57,6 @@ import { Titlebar } from "@/components/titlebar"
5957import { useServer } from "@/context/server"
6058import { useLanguage , type Locale } from "@/context/language"
6159import {
62- childMapByParent ,
6360 displayName ,
6461 effectiveWorkspaceOrder ,
6562 errorMessage ,
@@ -1846,7 +1843,7 @@ export default function Layout(props: ParentProps) {
18461843 } }
18471844 style = { { width : panelProps . mobile ? undefined : `${ Math . max ( layout . sidebar . width ( ) - 64 , 0 ) } px` } }
18481845 >
1849- < Show when = { panelProps . project } keyed >
1846+ < Show when = { panelProps . project } >
18501847 { ( p ) => (
18511848 < >
18521849 < div class = "shrink-0 px-2 py-1" >
@@ -1855,7 +1852,7 @@ export default function Layout(props: ParentProps) {
18551852 < InlineEditor
18561853 id = { `project:${ projectId ( ) } ` }
18571854 value = { projectName }
1858- onSave = { ( next ) => renameProject ( p , next ) }
1855+ onSave = { ( next ) => renameProject ( p ( ) , next ) }
18591856 class = "text-14-medium text-text-strong truncate"
18601857 displayClass = "text-14-medium text-text-strong truncate"
18611858 stopPropagation
@@ -1864,15 +1861,15 @@ export default function Layout(props: ParentProps) {
18641861 < Tooltip
18651862 placement = "bottom"
18661863 gutter = { 2 }
1867- value = { p . worktree }
1864+ value = { p ( ) . worktree }
18681865 class = "shrink-0"
18691866 contentStyle = { {
18701867 "max-width" : "640px" ,
18711868 transform : "translate3d(52px, 0, 0)" ,
18721869 } }
18731870 >
18741871 < span class = "text-12-regular text-text-base truncate select-text" >
1875- { p . worktree . replace ( homedir ( ) , "~" ) }
1872+ { p ( ) . worktree . replace ( homedir ( ) , "~" ) }
18761873 </ span >
18771874 </ Tooltip >
18781875 </ div >
@@ -1883,7 +1880,7 @@ export default function Layout(props: ParentProps) {
18831880 icon = "dot-grid"
18841881 variant = "ghost"
18851882 data-action = "project-menu"
1886- data-project = { base64Encode ( p . worktree ) }
1883+ data-project = { base64Encode ( p ( ) . worktree ) }
18871884 class = "shrink-0 size-6 rounded-md data-[expanded]:bg-surface-base-active"
18881885 classList = { {
18891886 "opacity-0 group-hover/project:opacity-100 data-[expanded]:opacity-100" : ! panelProps . mobile ,
@@ -1892,24 +1889,24 @@ export default function Layout(props: ParentProps) {
18921889 />
18931890 < DropdownMenu . Portal mount = { ! panelProps . mobile ? state . nav : undefined } >
18941891 < DropdownMenu . Content class = "mt-1" >
1895- < DropdownMenu . Item onSelect = { ( ) => showEditProjectDialog ( p ) } >
1892+ < DropdownMenu . Item onSelect = { ( ) => showEditProjectDialog ( p ( ) ) } >
18961893 < DropdownMenu . ItemLabel > { language . t ( "common.edit" ) } </ DropdownMenu . ItemLabel >
18971894 </ DropdownMenu . Item >
18981895 < DropdownMenu . Item
18991896 data-action = "project-workspaces-toggle"
1900- data-project = { base64Encode ( p . worktree ) }
1901- disabled = { p . vcs !== "git" && ! layout . sidebar . workspaces ( p . worktree ) ( ) }
1902- onSelect = { ( ) => toggleProjectWorkspaces ( p ) }
1897+ data-project = { base64Encode ( p ( ) . worktree ) }
1898+ disabled = { p ( ) . vcs !== "git" && ! layout . sidebar . workspaces ( p ( ) . worktree ) ( ) }
1899+ onSelect = { ( ) => toggleProjectWorkspaces ( p ( ) ) }
19031900 >
19041901 < DropdownMenu . ItemLabel >
1905- { layout . sidebar . workspaces ( p . worktree ) ( )
1902+ { layout . sidebar . workspaces ( p ( ) . worktree ) ( )
19061903 ? language . t ( "sidebar.workspaces.disable" )
19071904 : language . t ( "sidebar.workspaces.enable" ) }
19081905 </ DropdownMenu . ItemLabel >
19091906 </ DropdownMenu . Item >
19101907 < DropdownMenu . Item
19111908 data-action = "project-clear-notifications"
1912- data-project = { base64Encode ( p . worktree ) }
1909+ data-project = { base64Encode ( p ( ) . worktree ) }
19131910 disabled = { unseenCount ( ) === 0 }
19141911 onSelect = { clearNotifications }
19151912 >
@@ -1920,8 +1917,8 @@ export default function Layout(props: ParentProps) {
19201917 < DropdownMenu . Separator />
19211918 < DropdownMenu . Item
19221919 data-action = "project-close-menu"
1923- data-project = { base64Encode ( p . worktree ) }
1924- onSelect = { ( ) => closeProject ( p . worktree ) }
1920+ data-project = { base64Encode ( p ( ) . worktree ) }
1921+ onSelect = { ( ) => closeProject ( p ( ) . worktree ) }
19251922 >
19261923 < DropdownMenu . ItemLabel > { language . t ( "common.close" ) } </ DropdownMenu . ItemLabel >
19271924 </ DropdownMenu . Item >
@@ -1941,15 +1938,15 @@ export default function Layout(props: ParentProps) {
19411938 size = "large"
19421939 icon = "plus-small"
19431940 class = "w-full"
1944- onClick = { ( ) => navigateWithSidebarReset ( `/${ base64Encode ( p . worktree ) } /session` ) }
1941+ onClick = { ( ) => navigateWithSidebarReset ( `/${ base64Encode ( p ( ) . worktree ) } /session` ) }
19451942 >
19461943 { language . t ( "command.session.new" ) }
19471944 </ Button >
19481945 </ div >
19491946 < div class = "flex-1 min-h-0" >
19501947 < LocalWorkspace
19511948 ctx = { workspaceSidebarCtx }
1952- project = { p }
1949+ project = { p ( ) }
19531950 sortNow = { sortNow }
19541951 mobile = { panelProps . mobile }
19551952 />
@@ -1959,7 +1956,7 @@ export default function Layout(props: ParentProps) {
19591956 >
19601957 < >
19611958 < div class = "shrink-0 py-4 px-3" >
1962- < Button size = "large" icon = "plus-small" class = "w-full" onClick = { ( ) => createWorkspace ( p ) } >
1959+ < Button size = "large" icon = "plus-small" class = "w-full" onClick = { ( ) => createWorkspace ( p ( ) ) } >
19631960 { language . t ( "workspace.new" ) }
19641961 </ Button >
19651962 </ div >
@@ -1984,7 +1981,7 @@ export default function Layout(props: ParentProps) {
19841981 < SortableWorkspace
19851982 ctx = { workspaceSidebarCtx }
19861983 directory = { directory }
1987- project = { p }
1984+ project = { p ( ) }
19881985 sortNow = { sortNow }
19891986 mobile = { panelProps . mobile }
19901987 />
@@ -2096,11 +2093,9 @@ export default function Layout(props: ParentProps) {
20962093 />
20972094 </ div >
20982095 < Show when = { ! layout . sidebar . opened ( ) ? hoverProjectData ( ) ?. worktree : undefined } keyed >
2099- { ( worktree ) => (
2100- < div class = "absolute inset-y-0 left-16 z-50 flex" onMouseEnter = { aim . reset } >
2101- < SidebarPanel project = { hoverProjectData ( ) } />
2102- </ div >
2103- ) }
2096+ < div class = "absolute inset-y-0 left-16 z-50 flex" onMouseEnter = { aim . reset } >
2097+ < SidebarPanel project = { hoverProjectData ( ) } />
2098+ </ div >
21042099 </ Show >
21052100 < Show when = { layout . sidebar . opened ( ) } >
21062101 < ResizeHandle
0 commit comments