From bbd1c071c4f3258cc2612f20a7ba306ac730060a Mon Sep 17 00:00:00 2001
From: Albin Groen <albin.groen@gmail.com>
Date: Mon, 5 Jan 2026 18:24:49 +0100
Subject: fix(app): fix flicker and navigation when collapsing/expanding
 projects (#6658)

---
 packages/app/src/context/layout.tsx | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

(limited to 'packages/app/src/context/layout.tsx')

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[]
-- 
cgit v1.2.3

