Skip to content

Commit 1b028d0

Browse files
authored
revert: roll back git-backed review modes (#19295)
1 parent d500a84 commit 1b028d0

23 files changed

Lines changed: 227 additions & 1102 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export async function bootstrapDirectory(input: {
190190
input.sdk.vcs.get().then((x) => {
191191
const next = x.data ?? input.store.vcs
192192
input.setStore("vcs", next)
193-
if (next) input.vcsCache.setStore("value", next)
193+
if (next?.branch) input.vcsCache.setStore("value", next)
194194
}),
195195
),
196196
() => retry(() => input.sdk.command.list().then((x) => input.setStore("command", x.data ?? []))),

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,8 @@ describe("applyDirectoryEvent", () => {
494494
})
495495

496496
test("updates vcs branch in store and cache", () => {
497-
const [store, setStore] = createStore(baseState({ vcs: { branch: "main", default_branch: "main" } }))
498-
const [cacheStore, setCacheStore] = createStore({
499-
value: { branch: "main", default_branch: "main" } as State["vcs"],
500-
})
497+
const [store, setStore] = createStore(baseState())
498+
const [cacheStore, setCacheStore] = createStore({ value: undefined as State["vcs"] })
501499

502500
applyDirectoryEvent({
503501
event: { type: "vcs.branch.updated", properties: { branch: "feature/test" } },
@@ -513,8 +511,8 @@ describe("applyDirectoryEvent", () => {
513511
},
514512
})
515513

516-
expect(store.vcs).toEqual({ branch: "feature/test", default_branch: "main" })
517-
expect(cacheStore.value).toEqual({ branch: "feature/test", default_branch: "main" })
514+
expect(store.vcs).toEqual({ branch: "feature/test" })
515+
expect(cacheStore.value).toEqual({ branch: "feature/test" })
518516
})
519517

520518
test("routes disposal and lsp events to side-effect handlers", () => {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ export function applyDirectoryEvent(input: {
271271
break
272272
}
273273
case "vcs.branch.updated": {
274-
const props = event.properties as { branch?: string }
274+
const props = event.properties as { branch: string }
275275
if (input.store.vcs?.branch === props.branch) break
276-
const next = { ...input.store.vcs, branch: props.branch }
276+
const next = { branch: props.branch }
277277
input.setStore("vcs", next)
278278
if (input.vcsCache) input.vcsCache.setStore("value", next)
279279
break

packages/app/src/i18n/en.ts

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

541539
"session.files.selectToOpen": "Select a file to open",
542540
"session.files.all": "All files",

0 commit comments

Comments
 (0)