Skip to content

Commit baa2041

Browse files
chore: generate
1 parent aeece61 commit baa2041

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

packages/app/e2e/projects/projects-switch.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import { base64Decode } from "@opencode-ai/util/encode"
22
import type { Page } from "@playwright/test"
33
import { test, expect } from "../fixtures"
4-
import { defocus, createTestProject, cleanupTestProject, openSidebar, sessionIDFromUrl, waitDir, waitSlug } from "../actions"
4+
import {
5+
defocus,
6+
createTestProject,
7+
cleanupTestProject,
8+
openSidebar,
9+
sessionIDFromUrl,
10+
waitDir,
11+
waitSlug,
12+
} from "../actions"
513
import { projectSwitchSelector, promptSelector, workspaceItemSelector, workspaceNewSessionSelector } from "../selectors"
614
import { dirSlug, resolveDirectory } from "../utils"
715

packages/app/src/pages/layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,8 @@ export default function Layout(props: ParentProps) {
633633
if (!expanded) continue
634634
const key = workspaceKey(directory)
635635
const project = projects.find(
636-
(item) => workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
636+
(item) =>
637+
workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
637638
)
638639
if (!project) continue
639640
if (project.vcs === "git" && layout.sidebar.workspaces(project.worktree)()) continue
@@ -1163,7 +1164,8 @@ export default function Layout(props: ParentProps) {
11631164
const project = layout.projects
11641165
.list()
11651166
.find(
1166-
(item) => workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
1167+
(item) =>
1168+
workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
11671169
)
11681170
if (project) return project.worktree
11691171

packages/app/src/pages/layout/helpers.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ function sortSessions(now: number) {
3131
const isRootVisibleSession = (session: Session, directory: string) =>
3232
workspaceKey(session.directory) === workspaceKey(directory) && !session.parentID && !session.time?.archived
3333

34-
const roots = (store: SessionStore) => (store.session ?? []).filter((session) => isRootVisibleSession(session, store.path.directory))
34+
const roots = (store: SessionStore) =>
35+
(store.session ?? []).filter((session) => isRootVisibleSession(session, store.path.directory))
3536

3637
export const sortedRootSessions = (store: SessionStore, now: number) => roots(store).sort(sortSessions(now))
3738

38-
export const latestRootSession = (stores: SessionStore[], now: number) => stores.flatMap(roots).sort(sortSessions(now))[0]
39+
export const latestRootSession = (stores: SessionStore[], now: number) =>
40+
stores.flatMap(roots).sort(sortSessions(now))[0]
3941

4042
export function hasProjectPermissions<T>(
4143
request: Record<string, T[] | undefined>,

0 commit comments

Comments
 (0)