GeezerVison is showing github.com — ignore: revert 3 commits that broke dev branch (#18260) · ainformatico/opencode@aeece61
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/app/e2e/projects/projects-switch.spec.ts +1-9Lines changed: 1 addition & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import { base64Decode } from "@opencode-ai/util/encode" | 2 | 2 | import type { Page } from "@playwright/test" | 3 | 3 | 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" | 13 | 5 | import { projectSwitchSelector, promptSelector, workspaceItemSelector, workspaceNewSessionSelector } from "../selectors" | 14 | 6 | import { dirSlug, resolveDirectory } from "../utils" | 15 | 7 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/context/global-sync/bootstrap.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -158,7 +158,7 @@ export async function bootstrapDirectory(input: { | 158 | 158 | input.sdk.vcs.get().then((x) => { | 159 | 159 | const next = x.data ?? input.store.vcs | 160 | 160 | input.setStore("vcs", next) | 161 | | - if (next) input.vcsCache.setStore("value", next) | | 161 | + if (next?.branch) input.vcsCache.setStore("value", next) | 162 | 162 | }), | 163 | 163 | input.sdk.permission.list().then((x) => { | 164 | 164 | const grouped = groupBySession( | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/context/global-sync/event-reducer.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -268,9 +268,9 @@ export function applyDirectoryEvent(input: { | 268 | 268 | break | 269 | 269 | } | 270 | 270 | case "vcs.branch.updated": { | 271 | | - const props = event.properties as { branch?: string } | | 271 | + const props = event.properties as { branch: string } | 272 | 272 | if (input.store.vcs?.branch === props.branch) break | 273 | | - const next = { ...input.store.vcs, branch: props.branch } | | 273 | + const next = { branch: props.branch } | 274 | 274 | input.setStore("vcs", next) | 275 | 275 | if (input.vcsCache) input.vcsCache.setStore("value", next) | 276 | 276 | break | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/i18n/en.ts -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -533,8 +533,6 @@ export const dict = { | 533 | 533 | "session.review.noVcs.createGit.action": "Create Git repository", | 534 | 534 | "session.review.noSnapshot": "Snapshot tracking is disabled in config, so session changes are unavailable", | 535 | 535 | "session.review.noChanges": "No changes", | 536 | | - "session.review.noUncommittedChanges": "No uncommitted changes yet", | 537 | | - "session.review.noBranchChanges": "No branch changes yet", | 538 | 536 |
| 539 | 537 | "session.files.selectToOpen": "Select a file to open", | 540 | 538 | "session.files.all": "All files", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/pages/layout.tsx +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -633,8 +633,7 @@ export default function Layout(props: ParentProps) { | 633 | 633 | if (!expanded) continue | 634 | 634 | const key = workspaceKey(directory) | 635 | 635 | 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), | 638 | 637 | ) | 639 | 638 | if (!project) continue | 640 | 639 | if (project.vcs === "git" && layout.sidebar.workspaces(project.worktree)()) continue | @@ -1164,8 +1163,7 @@ export default function Layout(props: ParentProps) { | 1164 | 1163 | const project = layout.projects | 1165 | 1164 | .list() | 1166 | 1165 | .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), | 1169 | 1167 | ) | 1170 | 1168 | if (project) return project.worktree | 1171 | 1169 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/pages/layout/helpers.ts +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,13 +31,11 @@ function sortSessions(now: number) { | 31 | 31 | const isRootVisibleSession = (session: Session, directory: string) => | 32 | 32 | workspaceKey(session.directory) === workspaceKey(directory) && !session.parentID && !session.time?.archived | 33 | 33 |
| 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)) | 36 | 35 |
| 37 | 36 | export const sortedRootSessions = (store: SessionStore, now: number) => roots(store).sort(sortSessions(now)) | 38 | 37 |
| 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] | 41 | 39 |
| 42 | 40 | export function hasProjectPermissions<T>( | 43 | 41 | request: Record<string, T[] | undefined>, | |
|