@remixhq/core 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collab.js +24 -6
- package/package.json +1 -1
package/dist/collab.js
CHANGED
|
@@ -4744,7 +4744,7 @@ async function collabInit(params) {
|
|
|
4744
4744
|
operation: "`remix collab init`",
|
|
4745
4745
|
recoveryHint: "The repository changed before the Remix binding was written. Review the local changes and rerun `remix collab init`."
|
|
4746
4746
|
});
|
|
4747
|
-
const bindingMode2 =
|
|
4747
|
+
const bindingMode2 = defaultBranch && branchName !== defaultBranch ? "lane" : "explicit_root";
|
|
4748
4748
|
let bindingPath2;
|
|
4749
4749
|
if (params.forceNew && defaultBranch && canonicalLane2) {
|
|
4750
4750
|
const canonicalBinding = branchBindingFromLane(canonicalLane2, "explicit_root", {
|
|
@@ -4786,7 +4786,15 @@ async function collabInit(params) {
|
|
|
4786
4786
|
defaultBranch: canonicalLane2.defaultBranch ?? defaultBranch,
|
|
4787
4787
|
laneId: canonicalLane2.laneId ?? null,
|
|
4788
4788
|
branchName: defaultBranch,
|
|
4789
|
-
|
|
4789
|
+
// This branch is reached only when the CURRENT branch is
|
|
4790
|
+
// not the default branch — so the binding being written
|
|
4791
|
+
// here is for the DEFAULT branch (the canonical/main app).
|
|
4792
|
+
// It must always be `explicit_root` regardless of
|
|
4793
|
+
// `forceNew`; the previous `forceNew ? ... : "lane"`
|
|
4794
|
+
// produced a `lane`-marked default-branch binding for
|
|
4795
|
+
// every plain init, which silently disabled the
|
|
4796
|
+
// history-import auto-spawn.
|
|
4797
|
+
bindingMode: "explicit_root"
|
|
4790
4798
|
});
|
|
4791
4799
|
}
|
|
4792
4800
|
bindingPath2 = await writeCollabBinding(repoRoot, {
|
|
@@ -4938,7 +4946,7 @@ async function collabInit(params) {
|
|
|
4938
4946
|
operation: "`remix collab init`",
|
|
4939
4947
|
recoveryHint: "The repository changed before the Remix binding was written. Review the local changes and rerun `remix collab init`."
|
|
4940
4948
|
});
|
|
4941
|
-
const bindingMode =
|
|
4949
|
+
const bindingMode = defaultBranch && branchName !== defaultBranch ? "lane" : "explicit_root";
|
|
4942
4950
|
let bindingPath;
|
|
4943
4951
|
if (params.forceNew && defaultBranch && canonicalLane) {
|
|
4944
4952
|
const canonicalBinding = branchBindingFromLane(canonicalLane, "explicit_root", {
|
|
@@ -4980,7 +4988,12 @@ async function collabInit(params) {
|
|
|
4980
4988
|
defaultBranch: canonicalLane.defaultBranch ?? defaultBranch,
|
|
4981
4989
|
laneId: canonicalLane.laneId ?? null,
|
|
4982
4990
|
branchName: defaultBranch,
|
|
4983
|
-
|
|
4991
|
+
// Same reasoning as the queued-path default-branch write
|
|
4992
|
+
// above: this is the canonical/main-app binding for the
|
|
4993
|
+
// default branch and must be `explicit_root`, otherwise the
|
|
4994
|
+
// history-import auto-spawn (gated on explicit_root) will
|
|
4995
|
+
// silently no-op for every plain init.
|
|
4996
|
+
bindingMode: "explicit_root"
|
|
4984
4997
|
});
|
|
4985
4998
|
}
|
|
4986
4999
|
bindingPath = await writeCollabBinding(repoRoot, {
|
|
@@ -6296,7 +6309,7 @@ async function processInitJob(job, api) {
|
|
|
6296
6309
|
boundProjectId = String(readyApp.projectId ?? boundProjectId);
|
|
6297
6310
|
boundThreadId = readyApp.threadId ? String(readyApp.threadId) : boundThreadId;
|
|
6298
6311
|
}
|
|
6299
|
-
const bindingMode =
|
|
6312
|
+
const bindingMode = defaultBranch && branchName !== defaultBranch ? "lane" : "explicit_root";
|
|
6300
6313
|
if (job.payload.forceNew && defaultBranch && canonicalLane) {
|
|
6301
6314
|
const canonicalBinding = branchBindingFromLane(canonicalLane, "explicit_root", {
|
|
6302
6315
|
projectId: canonicalLane.projectId ?? boundProjectId,
|
|
@@ -6335,7 +6348,12 @@ async function processInitJob(job, api) {
|
|
|
6335
6348
|
defaultBranch: canonicalLane.defaultBranch ?? defaultBranch,
|
|
6336
6349
|
laneId: canonicalLane.laneId ?? null,
|
|
6337
6350
|
branchName: defaultBranch,
|
|
6338
|
-
|
|
6351
|
+
// This branch is reached only when the current branch is NOT
|
|
6352
|
+
// the default branch — so the binding being written here is
|
|
6353
|
+
// for the DEFAULT branch (the canonical/main app). It must
|
|
6354
|
+
// always be `explicit_root` so the history-import auto-spawn
|
|
6355
|
+
// can fire on first-ever inits (see autoSpawnHistoryImport.ts).
|
|
6356
|
+
bindingMode: "explicit_root"
|
|
6339
6357
|
});
|
|
6340
6358
|
}
|
|
6341
6359
|
await writeCollabBinding(repoRoot, {
|