Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(web): new worktree base no longer sticks to an unborn branch while a project clones
#35103
Send to my agent
Closed
juliusmarminge
wants to merge 4 commits into
main
from
refs/pull/35103/head
·
opened
3 weeks ago
View on GitHub
Conversation
8
Commits
4
Files changed
3
Impact
Showing
3 changed files
with
72 additions
and
8 deletions
.
x
0 of 3 viewed, 3 left
Files
Hide whitespace
Unified
Split
33 additions and 0 deletions
+33
-0
apps/web/src/components/BranchToolbar.logic.test.ts
Modified
Diff
Before/After
Viewed
apps/web/src/components/BranchToolbar.logic.test.ts
View file
Show all 9 lines
@@ -10,6 +10,7 @@
10
10
resolveBranchToolbarPrBranch,
11
11
resolveLocalCheckoutBranchMismatch,
12
12
resolveLockedWorkspaceLabel,
13
+
resolveWorktreeBaseBranchSeed,
13
14
sanitizeNewRefName,
14
15
shouldIncludeBranchPickerItem,
15
16
}
from
"./BranchToolbar.logic"
;
Expand up
Expand down
Show all 239 lines
@@ -255,6 +256,38 @@
255
256
});
256
257
});
257
258
259
+
describe
(
"resolveWorktreeBaseBranchSeed"
, () => {
260
+
const
ref = (name:
string
, flags: { current?:
boolean
; isDefault?:
boolean
}):
VcsRef
=> ({
261
+
name,
262
+
current
: flags.
current
??
false
,
263
+
isDefault
: flags.
isDefault
??
false
,
264
+
worktreePath
:
null
,
265
+
});
266
+
const
seed = (
267
+
refs:
ReadonlyArray
<
VcsRef
>,
268
+
activeThreadBranch:
string
|
null
=
null
,
269
+
activeThreadBranchListed:
boolean
|
null
=
null
,
270
+
) =>
resolveWorktreeBaseBranchSeed
({ activeThreadBranch, activeThreadBranchListed, refs });
271
+
272
+
it
(
"prefers the default branch, then the current listed branch"
, () => {
273
+
expect
(
seed
([
ref
(
"feature"
, {
current
:
true
}),
ref
(
"staging"
, {
isDefault
:
true
})])).
toBe
(
274
+
"staging"
,
275
+
);
Home
Search
Explore
Menu