diff options
| author | Albin Groen <[email protected]> | 2026-01-05 18:24:49 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-05 11:24:49 -0600 |
| commit | bbd1c071c4f3258cc2612f20a7ba306ac730060a (patch) | |
| tree | 6a2047b1016278404cce36c7d4bf028fbf3a7292 /packages/app/src/context/layout.tsx | |
| parent | 8e9a0c4ad014eb54d7ddd8de3b5f321de931f2f7 (diff) | |
| download | opencode-bbd1c071c4f3258cc2612f20a7ba306ac730060a.tar.gz opencode-bbd1c071c4f3258cc2612f20a7ba306ac730060a.zip | |
fix(app): fix flicker and navigation when collapsing/expanding projects (#6658)
Diffstat (limited to 'packages/app/src/context/layout.tsx')
| -rw-r--r-- | packages/app/src/context/layout.tsx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/app/src/context/layout.tsx b/packages/app/src/context/layout.tsx index bc0d49758..5836365ba 100644 --- a/packages/app/src/context/layout.tsx +++ b/packages/app/src/context/layout.tsx @@ -6,6 +6,7 @@ import { useGlobalSDK } from "./global-sdk" import { useServer } from "./server" import { Project } from "@opencode-ai/sdk/v2" import { persisted } from "@/utils/persist" +import { same } from "@/utils/same" const AVATAR_COLOR_KEYS = ["pink", "mint", "orange", "purple", "cyan", "lime"] as const export type AvatarColorKey = (typeof AVATAR_COLOR_KEYS)[number] @@ -23,13 +24,6 @@ export function getAvatarColors(key?: string) { } } -function same<T>(a: readonly T[] | undefined, b: readonly T[] | undefined) { - if (a === b) return true - if (!a || !b) return false - if (a.length !== b.length) return false - return a.every((x, i) => x === b[i]) -} - type SessionTabs = { active?: string all: string[] |
