Skip to content

Commit aeece61

Browse files
authored
ignore: revert 3 commits that broke dev branch (#18260)
1 parent 0d7e62a commit aeece61

30 files changed

Lines changed: 232 additions & 1200 deletions

File tree

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

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

packages/app/src/context/global-sync/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export async function bootstrapDirectory(input: {
158158
input.sdk.vcs.get().then((x) => {
159159
const next = x.data ?? input.store.vcs
160160
input.setStore("vcs", next)
161-
if (next) input.vcsCache.setStore("value", next)
161+
if (next?.branch) input.vcsCache.setStore("value", next)
162162
}),
163163
input.sdk.permission.list().then((x) => {
164164
const grouped = groupBySession(

packages/app/src/context/global-sync/event-reducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ export function applyDirectoryEvent(input: {
268268
break
269269
}
270270
case "vcs.branch.updated": {
271-
const props = event.properties as { branch?: string }
271+
const props = event.properties as { branch: string }
272272
if (input.store.vcs?.branch === props.branch) break
273-
const next = { ...input.store.vcs, branch: props.branch }
273+
const next = { branch: props.branch }
274274
input.setStore("vcs", next)
275275
if (input.vcsCache) input.vcsCache.setStore("value", next)
276276
break

packages/app/src/i18n/en.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,6 @@ export const dict = {
533533
"session.review.noVcs.createGit.action": "Create Git repository",
534534
"session.review.noSnapshot": "Snapshot tracking is disabled in config, so session changes are unavailable",
535535
"session.review.noChanges": "No changes",
536-
"session.review.noUncommittedChanges": "No uncommitted changes yet",
537-
"session.review.noBranchChanges": "No branch changes yet",
538536

539537
"session.files.selectToOpen": "Select a file to open",
540538
"session.files.all": "All files",

packages/app/src/pages/layout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,7 @@ export default function Layout(props: ParentProps) {
633633
if (!expanded) continue
634634
const key = workspaceKey(directory)
635635
const project = projects.find(
636-
(item) =>
637-
workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
636+
(item) => workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
638637
)
639638
if (!project) continue
640639
if (project.vcs === "git" && layout.sidebar.workspaces(project.worktree)()) continue
@@ -1164,8 +1163,7 @@ export default function Layout(props: ParentProps) {
11641163
const project = layout.projects
11651164
.list()
11661165
.find(
1167-
(item) =>
1168-
workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
1166+
(item) => workspaceKey(item.worktree) === key || item.sandboxes?.some((sandbox) => workspaceKey(sandbox) === key),
11691167
)
11701168
if (project) return project.worktree
11711169

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ 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) =>
35-
(store.session ?? []).filter((session) => isRootVisibleSession(session, store.path.directory))
34+
const roots = (store: SessionStore) => (store.session ?? []).filter((session) => isRootVisibleSession(session, store.path.directory))
3635

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

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

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

0 commit comments

Comments
 (0)