Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): skip local git status on unchanged idle remote polls #40021

Closedonly21mil(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/40021/headopened View on GitHub

Showing 6 changed files with 36 additions and 0 deletions (loading 3).

x
0 of 6 viewed, 6 left
2 additions and 0 deletionsapps/server/src/git/GitWorkflowService.tsModified
View file
@@ -69,6 +69,7 @@
readonly invalidateLocalStatus: (cwd: string) => Effect.Effect<void, never>;
readonly invalidateRemoteStatus: (cwd: string) => Effect.Effect<void, never>;
readonly readRefSnapshot: (cwd: string) => Effect.Effect<string | null>;
+ readonly readWorkingTreeSnapshot: (cwd: string) => Effect.Effect<string | null>;
readonly invalidateStatus: (cwd: string) => Effect.Effect<void, never>;
/** The checkout's own HEAD file, inside a linked worktree's admin directory when there is one. */
readonly headPath: (cwd: string) => Effect.Effect<string | null, never>;
@@ -397,6 +398,7 @@
invalidateLocalStatus: gitManager.invalidateLocalStatus,
invalidateRemoteStatus: gitManager.invalidateRemoteStatus,
readRefSnapshot: git.readRefSnapshot,
+ readWorkingTreeSnapshot: git.readWorkingTreeSnapshot,
invalidateStatus: gitManager.invalidateStatus,
headPath: Effect.fn("GitWorkflowService.headPath")(function* (cwd) {
// Clients keep watching threads whose worktree was removed; spawning there fails noisily.
2 additions and 0 deletionsapps/server/src/vcs/GitVcsDriver.tsModified
View file
@@ -350,6 +350,8 @@
) => Effect.Effect<GitRemoteStatusDetails, GitCommandError>;
/** Refs, HEAD and shallow boundaries. Null when the snapshot cannot be read. */
readonly readRefSnapshot: (cwd: string) => Effect.Effect<string | null>;
+ /** Index and working-tree state, including untracked files. Null when it cannot be read. */
+ readonly readWorkingTreeSnapshot: (cwd: string) => Effect.Effect<string | null>;
readonly prepareCommitContext: (
cwd: string,
filePaths?: readonly string[],