Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
bc12421
Show project status dots when collapsed in the sidebar (#1097)
maria-rcks Mar 20, 2026
d373389
feat(web): persist modelOptions, refactor provider specific logic (#1…
maria-rcks Mar 20, 2026
46e63b3
fix(ChatView): update scroll button styles to improve user interactio…
pranavgoel29 Mar 20, 2026
25c7003
fix(web): show health banner for selected provider instead of default…
Marve10s Mar 20, 2026
34cef62
fix(web): update add-project toggle label in cancel state (#1248)
UtkarshUsername Mar 20, 2026
ef25691
Prefer Claude user ID for telemetry identity (#1249)
juliusmarminge Mar 20, 2026
9e29c9d
feat: added configurable base directory. (#826)
mcking-07 Mar 20, 2026
2b6640a
fix(claude): load Claude SDK filesystem setting sources (#1334)
harshit97 Mar 23, 2026
754cded
Load PTY adapter at runtime (#1311)
shivamhwp Mar 23, 2026
843d6d8
fix: add license field to npm package (#1272)
gameroman Mar 23, 2026
d415558
Flatten Git service layer and switch server paths to base dir (#1255)
juliusmarminge Mar 24, 2026
e11fb6e
fix(web): avoid false draft attachment persistence warnings (#1153)
shivamhwp Mar 24, 2026
2b08d86
Add resizable chat sidebar (#1347)
shivamhwp Mar 24, 2026
e823f8f
ci(github): exclude test files from mixed PR size calculation (#1105)
binbandit Mar 24, 2026
4199dd0
Merge remote-tracking branch 'upstream/main' into upstream-ancestry-s…
aaditagrawal Mar 24, 2026
4d3c8bf
fix: address CodeRabbit review findings on upstream code
aaditagrawal Mar 24, 2026
a3185a7
fix: address second round of CodeRabbit review findings
aaditagrawal Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions .github/workflows/pr-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,39 @@ jobs:
(response) => response.data,
);

if (files.length >= 3000) {
const isFileListTruncated = files.length >= 3000;
if (isFileListTruncated) {
core.warning(
"The GitHub pull request files API may truncate results at 3,000 files; PR size may be undercounted.",
"The GitHub pull request files API may truncate results at 3,000 files; forcing size:XXL.",
);
}

let testChangedLines = 0;
let nonTestChangedLines = 0;

for (const file of files) {
const changedLinesForFile = (file.additions ?? 0) + (file.deletions ?? 0);
if (!isFileListTruncated) {
for (const file of files) {
const changedLinesForFile = (file.additions ?? 0) + (file.deletions ?? 0);

if (changedLinesForFile === 0) {
continue;
}
if (changedLinesForFile === 0) {
continue;
}

if (isTestFile(file.filename)) {
testChangedLines += changedLinesForFile;
continue;
}
if (isTestFile(file.filename)) {
testChangedLines += changedLinesForFile;
continue;
}

nonTestChangedLines += changedLinesForFile;
nonTestChangedLines += changedLinesForFile;
}
}

const changedLines = nonTestChangedLines === 0 ? testChangedLines : nonTestChangedLines;
const nextLabelName = resolveSizeLabel(changedLines);
const changedLines = isFileListTruncated
? 1000
: (nonTestChangedLines === 0 ? testChangedLines : nonTestChangedLines);
const nextLabelName = isFileListTruncated
? "size:XXL"
: resolveSizeLabel(changedLines);

const { data: currentLabels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
Expand Down
41 changes: 29 additions & 12 deletions apps/server/src/git/Layers/GitCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,20 @@ export const makeGitCore = (options?: { executeOverride?: GitCoreShape["execute"
allowNonZeroExit: true,
timeoutMs: Duration.toMillis(STATUS_UPSTREAM_REFRESH_TIMEOUT),
},
).pipe(Effect.asVoid);
).pipe(
Effect.flatMap((result) =>
result.code === 0
? Effect.void
: Effect.fail(
createGitCommandError(
"GitCore.fetchUpstreamRefForStatus",
cwd,
["fetch", "--quiet", "--no-tags", upstream.remoteName, refspec],
`upstream fetch exited with code ${result.code}`,
),
),
),
);
};

const statusUpstreamRefreshCache = yield* Cache.makeWith({
Expand Down Expand Up @@ -629,7 +642,7 @@ export const makeGitCore = (options?: { executeOverride?: GitCoreShape["execute"

const listRemoteNames = (cwd: string): Effect.Effect<ReadonlyArray<string>, GitCommandError> =>
runGitStdout("GitCore.listRemoteNames", cwd, ["remote"]).pipe(
Effect.map((stdout) => parseRemoteNames(stdout).toReversed()),
Effect.map((stdout) => parseRemoteNames(stdout)),
);

const resolvePrimaryRemoteName = (cwd: string): Effect.Effect<string, GitCommandError> =>
Expand All @@ -638,9 +651,10 @@ export const makeGitCore = (options?: { executeOverride?: GitCoreShape["execute"
return "origin";
}
const remotes = yield* listRemoteNames(cwd);
const [firstRemote] = remotes;
if (firstRemote) {
return firstRemote;
// Prefer "upstream" when "origin" is absent, then fall back to first listed remote.
const preferred = remotes.find((r) => r === "upstream") ?? remotes[0];
if (preferred) {
return preferred;
}
return yield* createGitCommandError(
"GitCore.resolvePrimaryRemoteName",
Expand Down Expand Up @@ -943,16 +957,19 @@ export const makeGitCore = (options?: { executeOverride?: GitCoreShape["execute"

const prepareCommitContext: GitCoreShape["prepareCommitContext"] = (cwd, filePaths) =>
Effect.gen(function* () {
if (filePaths && filePaths.length > 0) {
if (filePaths !== undefined && filePaths !== null) {
yield* runGit("GitCore.prepareCommitContext.reset", cwd, ["reset"]).pipe(
Effect.catch(() => Effect.void),
);
yield* runGit("GitCore.prepareCommitContext.addSelected", cwd, [
"add",
"-A",
"--",
...filePaths,
]);
if (filePaths.length > 0) {
yield* runGit("GitCore.prepareCommitContext.addSelected", cwd, [
"add",
"-A",
"--",
...filePaths,
]);
}
// filePaths is an explicit empty array — leave the index empty.
} else {
yield* runGit("GitCore.prepareCommitContext.addAll", cwd, ["add", "-A"]);
}
Expand Down
Loading