feat(git): add opt-in for unrelated histories during pull
Allow pulling repositories with unrelated commit histories when the user explicitly opts in. The pull argument construction was refactored and branch resolution made more robust so the backend can include the --allow-unrelated-histories flag when requested. - Extract pull argument logic and add support for allowing unrelated histories. - Prompt users in the UI to confirm merging separate histories and retry pull. - Restyle and improve the update toast UI for better layout and responsiveness.
This commit is contained in:
+83
-77
@@ -1486,73 +1486,61 @@
|
||||
right: 18px;
|
||||
bottom: 18px;
|
||||
z-index: 70;
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
width: min(430px, calc(100vw - 32px));
|
||||
padding: 14px;
|
||||
width: min(410px, calc(100vw - 28px));
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(100, 108, 255, 0.42);
|
||||
border-radius: 14px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-top: 2px solid var(--color-accent);
|
||||
color: var(--color-ink);
|
||||
background:
|
||||
linear-gradient(135deg, rgba(100,108,255,0.22), rgba(189,52,254,0.12) 42%, rgba(65,209,255,0.08)),
|
||||
rgba(12, 13, 24, 0.96);
|
||||
box-shadow: 0 24px 72px rgba(0,0,0,0.48), 0 0 0 1px rgba(255,255,255,0.04) inset;
|
||||
backdrop-filter: blur(18px);
|
||||
background: var(--app-dialog-bg);
|
||||
box-shadow: 0 18px 48px rgba(0,0,0,0.42);
|
||||
animation: update-toast-in 180ms cubic-bezier(.2,.8,.2,1) both;
|
||||
}
|
||||
.update-toast.error {
|
||||
border-color: rgba(232,96,96,0.45);
|
||||
background:
|
||||
linear-gradient(135deg, rgba(232,96,96,0.16), rgba(100,108,255,0.11)),
|
||||
rgba(12, 13, 24, 0.96);
|
||||
border-top-color: var(--code-delete-strong);
|
||||
}
|
||||
.update-toast.installed {
|
||||
border-color: rgba(78,202,118,0.38);
|
||||
background:
|
||||
linear-gradient(135deg, rgba(78,202,118,0.15), rgba(65,209,255,0.1), rgba(100,108,255,0.12)),
|
||||
rgba(12, 13, 24, 0.96);
|
||||
border-top-color: var(--code-add-strong);
|
||||
}
|
||||
|
||||
.update-toast-glow {
|
||||
position: absolute;
|
||||
inset: auto 18px -46px auto;
|
||||
width: 170px;
|
||||
height: 95px;
|
||||
border-radius: 999px;
|
||||
background: rgba(65,209,255,0.18);
|
||||
filter: blur(34px);
|
||||
pointer-events: none;
|
||||
.update-toast-header {
|
||||
display: grid;
|
||||
grid-template-columns: 34px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 58px;
|
||||
padding: 10px 11px;
|
||||
border-bottom: 1px solid var(--color-border-subtle);
|
||||
background: var(--app-dialog-chrome);
|
||||
}
|
||||
|
||||
.update-toast-icon {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
flex: 0 0 auto;
|
||||
border: 1px solid rgba(255,255,255,0.14);
|
||||
border-radius: 12px;
|
||||
color: #ffffff;
|
||||
background: linear-gradient(135deg, rgba(65,209,255,0.28), rgba(100,108,255,0.54), rgba(189,52,254,0.42));
|
||||
box-shadow: 0 14px 32px rgba(100,108,255,0.22), inset 0 1px 0 rgba(255,255,255,0.16);
|
||||
border: 1px solid color-mix(in srgb, var(--color-accent) 32%, var(--color-border));
|
||||
color: var(--color-accent);
|
||||
background: color-mix(in srgb, var(--color-accent) 9%, var(--color-surface-raised));
|
||||
}
|
||||
.update-toast-icon.busy { color: #bfefff; }
|
||||
|
||||
.update-toast-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: grid;
|
||||
gap: 9px;
|
||||
min-width: 0;
|
||||
.update-toast.error .update-toast-icon {
|
||||
border-color: color-mix(in srgb, var(--code-delete-strong) 34%, var(--color-border));
|
||||
color: var(--code-delete-strong);
|
||||
background: var(--code-delete-bg);
|
||||
}
|
||||
.update-toast.installed .update-toast-icon {
|
||||
border-color: color-mix(in srgb, var(--code-add-strong) 34%, var(--color-border));
|
||||
color: var(--code-add-strong);
|
||||
background: var(--code-add-bg);
|
||||
}
|
||||
.update-toast-icon.busy { color: var(--color-accent); }
|
||||
|
||||
.update-toast-top {
|
||||
.update-toast-body {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: start;
|
||||
gap: 8px;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
padding: 12px;
|
||||
background: var(--app-dialog-bg);
|
||||
}
|
||||
|
||||
.update-toast-copy { min-width: 0; }
|
||||
@@ -1561,55 +1549,54 @@
|
||||
overflow: hidden;
|
||||
color: var(--color-accent);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .035em;
|
||||
text-transform: uppercase;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.update-toast h2 {
|
||||
margin: 2px 0 0;
|
||||
color: #ffffff;
|
||||
font-size: 15px;
|
||||
margin: 3px 0 0;
|
||||
color: var(--color-ink);
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.update-toast p {
|
||||
margin: 0;
|
||||
color: var(--color-ink-muted);
|
||||
font-size: 12.5px;
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.update-toast-close {
|
||||
width: 28px;
|
||||
min-width: 28px;
|
||||
min-height: 28px;
|
||||
width: 26px;
|
||||
min-width: 26px;
|
||||
min-height: 26px;
|
||||
padding: 0;
|
||||
border-color: rgba(255,255,255,0.1);
|
||||
border-radius: 8px;
|
||||
border-color: var(--color-border-subtle);
|
||||
color: var(--color-ink-dim);
|
||||
background: rgba(255,255,255,0.04);
|
||||
background: transparent;
|
||||
}
|
||||
.update-toast-close:hover:not(:disabled) {
|
||||
border-color: rgba(255,255,255,0.2);
|
||||
color: #ffffff;
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-color: var(--color-border);
|
||||
color: var(--color-ink);
|
||||
background: var(--color-surface-hover);
|
||||
}
|
||||
|
||||
.update-progress {
|
||||
position: relative;
|
||||
height: 6px;
|
||||
height: 4px;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: rgba(255,255,255,0.09);
|
||||
background: var(--color-surface-hover);
|
||||
}
|
||||
.update-progress span {
|
||||
position: absolute;
|
||||
inset: 0 auto 0 0;
|
||||
min-width: 0;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #4db6d6, #6f8cff, #238eb4);
|
||||
background: var(--color-accent);
|
||||
transition: width 160ms ease;
|
||||
}
|
||||
.update-progress.indeterminate span {
|
||||
@@ -1627,29 +1614,48 @@
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
gap: 7px;
|
||||
min-height: 49px;
|
||||
padding: 8px 11px;
|
||||
border-top: 1px solid var(--color-border-subtle);
|
||||
background: var(--app-dialog-chrome);
|
||||
}
|
||||
.update-toast-primary,
|
||||
.update-toast-secondary {
|
||||
min-height: 32px;
|
||||
border-radius: 8px;
|
||||
font-size: 12.5px;
|
||||
min-height: 31px;
|
||||
font-size: 11.5px;
|
||||
font-weight: 800;
|
||||
}
|
||||
.update-toast-primary {
|
||||
border-color: rgba(111,140,255,0.72);
|
||||
border-color: var(--color-primary);
|
||||
color: #ffffff;
|
||||
background: linear-gradient(135deg, #5f7df2, #238eb4);
|
||||
background: var(--color-primary);
|
||||
}
|
||||
.update-toast-primary:hover:not(:disabled) {
|
||||
border-color: rgba(77,182,214,0.74);
|
||||
border-color: var(--color-primary-dark);
|
||||
color: #ffffff;
|
||||
background: linear-gradient(135deg, #6f8cff, #2da0c7);
|
||||
background: var(--color-primary-dark);
|
||||
}
|
||||
.update-toast-secondary {
|
||||
border-color: rgba(255,255,255,0.1);
|
||||
border-color: var(--color-border);
|
||||
color: var(--color-ink-muted);
|
||||
background: rgba(255,255,255,0.05);
|
||||
background: var(--app-button-bg);
|
||||
}
|
||||
|
||||
@keyframes update-toast-in {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.update-toast {
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
width: calc(100vw - 16px);
|
||||
}
|
||||
.update-toast-actions > button {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* --- Workspace layout --- */
|
||||
|
||||
Reference in New Issue
Block a user