mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 16:02:37 +00:00
styles and restore fix
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
--accent-foreground: #fafafa;
|
||||
--destructive: #ff6568;
|
||||
--destructive-foreground: #df2225;
|
||||
--border: rgb(255 255 255 / 0.1);
|
||||
--border: rgb(255 255 255 / 0.07);
|
||||
--input: rgb(255 255 255 / 0.15);
|
||||
--ring: #737373;
|
||||
--chart-1: var(--color-blue-300);
|
||||
@@ -117,7 +117,7 @@
|
||||
--sidebar-primary-foreground: #fafafa;
|
||||
--sidebar-accent: #262626;
|
||||
--sidebar-accent-foreground: #fafafa;
|
||||
--sidebar-border: rgb(255 255 255 / 0.1);
|
||||
--sidebar-border: rgb(255 255 255 / 0.07);
|
||||
--sidebar-ring: #525252;
|
||||
}
|
||||
|
||||
|
||||
@@ -747,8 +747,8 @@ function Settings(): React.JSX.Element {
|
||||
|
||||
return (
|
||||
<div className="settings-view-shell flex min-h-0 flex-1 overflow-hidden bg-background">
|
||||
<aside className="flex w-[260px] shrink-0 flex-col border-r bg-card/40">
|
||||
<div className="border-b px-3 py-3">
|
||||
<aside className="flex w-[260px] shrink-0 flex-col border-r border-border/50 bg-card/40">
|
||||
<div className="border-b border-border/50 px-3 py-3">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
@@ -835,7 +835,7 @@ function Settings(): React.JSX.Element {
|
||||
</aside>
|
||||
|
||||
<div className="flex min-h-0 flex-1 flex-col">
|
||||
<div className="sticky top-0 z-10 border-b bg-background/95 py-6 backdrop-blur supports-[backdrop-filter]:bg-background/80">
|
||||
<div className="sticky top-0 z-10 border-b border-border/50 bg-background/95 py-6 backdrop-blur supports-[backdrop-filter]:bg-background/80">
|
||||
<div className={contentClassName}>{pageHeader}</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,6 +24,14 @@ export default function Terminal(): React.JSX.Element | null {
|
||||
const tabs = activeWorktreeId ? (tabsByWorktree[activeWorktreeId] ?? []) : []
|
||||
const allWorktrees = Object.values(worktreesByRepo).flat()
|
||||
const prevTabCountRef = useRef(tabs.length)
|
||||
|
||||
// Track which worktrees have been activated during this app session.
|
||||
// Only mount TerminalPanes for visited worktrees to prevent mass PTY
|
||||
// spawning when restoring a session with many saved worktree tabs.
|
||||
const mountedWorktreeIdsRef = useRef(new Set<string>())
|
||||
if (activeWorktreeId) {
|
||||
mountedWorktreeIdsRef.current.add(activeWorktreeId)
|
||||
}
|
||||
const tabBarRef = useRef<HTMLDivElement>(null)
|
||||
const initialTabCreationGuardRef = useRef<string | null>(null)
|
||||
|
||||
@@ -218,29 +226,31 @@ export default function Terminal(): React.JSX.Element | null {
|
||||
|
||||
{/* Terminal panes container */}
|
||||
<div className="relative flex-1 min-h-0 overflow-hidden">
|
||||
{allWorktrees.map((worktree) => {
|
||||
const worktreeTabs = tabsByWorktree[worktree.id] ?? []
|
||||
const isVisible = activeView !== 'settings' && worktree.id === activeWorktreeId
|
||||
{allWorktrees
|
||||
.filter((wt) => mountedWorktreeIdsRef.current.has(wt.id))
|
||||
.map((worktree) => {
|
||||
const worktreeTabs = tabsByWorktree[worktree.id] ?? []
|
||||
const isVisible = activeView !== 'settings' && worktree.id === activeWorktreeId
|
||||
|
||||
return (
|
||||
<div
|
||||
key={worktree.id}
|
||||
className={isVisible ? 'absolute inset-0' : 'absolute inset-0 hidden'}
|
||||
aria-hidden={!isVisible}
|
||||
>
|
||||
{worktreeTabs.map((tab) => (
|
||||
<TerminalPane
|
||||
key={tab.id}
|
||||
tabId={tab.id}
|
||||
worktreeId={worktree.id}
|
||||
cwd={worktree.path}
|
||||
isActive={isVisible && tab.id === activeTabId}
|
||||
onPtyExit={(ptyId) => handlePtyExit(tab.id, ptyId)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
return (
|
||||
<div
|
||||
key={worktree.id}
|
||||
className={isVisible ? 'absolute inset-0' : 'absolute inset-0 hidden'}
|
||||
aria-hidden={!isVisible}
|
||||
>
|
||||
{worktreeTabs.map((tab) => (
|
||||
<TerminalPane
|
||||
key={tab.id}
|
||||
tabId={tab.id}
|
||||
worktreeId={worktree.id}
|
||||
cwd={worktree.path}
|
||||
isActive={isVisible && tab.id === activeTabId}
|
||||
onPtyExit={(ptyId) => handlePtyExit(tab.id, ptyId)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -166,7 +166,9 @@ const WorktreeCard = React.memo(function WorktreeCard({
|
||||
<div
|
||||
className={cn(
|
||||
'group relative flex items-start gap-2 px-2.5 py-1.5 rounded-md cursor-pointer transition-colors',
|
||||
isActive ? 'bg-accent' : 'hover:bg-accent/50',
|
||||
isActive
|
||||
? 'bg-accent dark:bg-accent/45 ring-1 ring-primary/25 dark:ring-primary/40'
|
||||
: 'hover:bg-accent/50',
|
||||
isDeleting && 'opacity-70'
|
||||
)}
|
||||
onClick={handleClick}
|
||||
|
||||
Reference in New Issue
Block a user