feat(sources): removing a source deletes its files and index entries behind a confirmation modal
This commit is contained in:
+141
-13
@@ -1915,6 +1915,147 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; }
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
/* ---------- Remove confirmation modal (phase 69, task 02) ----------
|
||||
/git-sources.html: the in-app confirmation that replaces the
|
||||
native confirm() — the total-removal warning (the row, the
|
||||
source's indexed documents, and — for git clones and uploaded
|
||||
archives — the files on the server's disk). The .doc-modal overlay contract:
|
||||
a fixed full-viewport dim backdrop + a centered panel (z-index
|
||||
1000, above the sticky header (20) + skip-link (100); NO blur —
|
||||
the phase-08 no-blur perf anchor), scaled to a compact dialog:
|
||||
the 46rem chat-column width or the viewport, whichever is
|
||||
narrower. Phase-08 tokens only; system fonts; no CDN.
|
||||
|
||||
AA pairs: title/copy are --ink on --surface (13.8:1); the source
|
||||
value is --ink on --bg (16.7:1); the error line is the err pair
|
||||
(err-ink on err-bg 9.3:1, the err-line border); the destructive
|
||||
button rides the err token family — the .tuning-delete /
|
||||
.steering-delete hover convention used as the resting state
|
||||
(err-ink on err-bg 9.3:1; the hover inverts to dark --bg on
|
||||
--err-line, 5.2:1 — both AA); Cancel is the ghost ink-soft family
|
||||
(5.1:1 on --surface). :focus-visible via the global 3px outline
|
||||
rule (no local suppression — focus lands on Cancel at open and is
|
||||
visible); both buttons >=44px; no animation (reduced-motion safe
|
||||
by construction). */
|
||||
.remove-confirm {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1000;
|
||||
display: flex; /* the panel is the only in-flow child — margin: auto centers it */
|
||||
}
|
||||
/* Explicit (the global [hidden] rule already wins — the documented,
|
||||
testable contract for the skeleton). */
|
||||
.remove-confirm[hidden] { display: none; }
|
||||
|
||||
.remove-confirm-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
/* --bg at 82% — the doc-modal dim, no backdrop-filter (no-blur). */
|
||||
background: rgba(15, 10, 10, 0.82);
|
||||
}
|
||||
|
||||
.remove-confirm-panel {
|
||||
/* position:relative lifts the panel above the fixed backdrop
|
||||
(positioned elements paint over in-flow siblings otherwise). */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin: auto;
|
||||
width: min(46rem, calc(100vw - 2rem));
|
||||
padding: 1.5rem;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
|
||||
.remove-confirm-title {
|
||||
margin: 0 0 0.75rem;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.3;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
/* The source's value (git URL or local path) — mono, wrapped (a long
|
||||
URL must not overflow the panel), --ink on --bg (16.7:1). */
|
||||
.remove-confirm-source {
|
||||
display: block;
|
||||
margin: 0 0 0.75rem;
|
||||
padding: 0.5rem 0.65rem;
|
||||
font-family: var(--mono);
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.5;
|
||||
color: var(--ink);
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius-sm);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.remove-confirm-copy {
|
||||
margin: 0;
|
||||
color: var(--ink); /* 13.8:1 on --surface */
|
||||
}
|
||||
|
||||
/* The in-modal failure line (role=alert): the err pair (err-ink on
|
||||
err-bg 9.3:1, the err-line border) — the .git-source-error banner
|
||||
language, boxed. */
|
||||
.remove-confirm-error {
|
||||
margin: 0.75rem 0 0;
|
||||
padding: 0.5rem 0.65rem;
|
||||
color: var(--err-ink);
|
||||
background: var(--err-bg);
|
||||
border: 1px solid var(--err-line);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.remove-confirm-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.6rem;
|
||||
margin-top: 1.1rem;
|
||||
}
|
||||
|
||||
/* The two modal buttons: >=44px targets, the house 3px :focus-visible
|
||||
via the global outline rule (no local override). */
|
||||
.remove-confirm-btn {
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
padding: 0.55rem 1.1rem;
|
||||
border-radius: var(--radius-sm);
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
.remove-confirm-btn:disabled { opacity: 0.5; cursor: wait; }
|
||||
|
||||
/* Cancel — the ghost ink-soft family (5.1:1 on --surface), like the
|
||||
row's Remove / .tuning-edit; the brand pair on hover (6.9:1). */
|
||||
.remove-confirm-cancel {
|
||||
border: 1px solid var(--line);
|
||||
background: transparent;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
.remove-confirm-cancel:hover:not(:disabled) {
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* "Remove source" — the destructive button on the err token family
|
||||
(the .tuning-delete / .steering-delete convention): err-ink on
|
||||
err-bg 9.3:1, the err-line border; the hover inverts to dark --bg
|
||||
on --err-line (5.2:1 — AA). */
|
||||
.remove-confirm-remove {
|
||||
border: 1px solid var(--err-line);
|
||||
background: var(--err-bg);
|
||||
color: var(--err-ink);
|
||||
}
|
||||
.remove-confirm-remove:hover:not(:disabled) {
|
||||
background: var(--err-line);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
/* The list: the Sources page's table pattern — full width in the
|
||||
72rem frame, surface card, horizontally scrollable wrapper (the
|
||||
URL column never wraps or ellipsizes: long URLs, credentials
|
||||
@@ -1998,19 +2139,6 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; }
|
||||
.git-source-remove:hover:not(:disabled) { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); }
|
||||
.git-source-remove:disabled { opacity: 0.5; cursor: wait; }
|
||||
|
||||
/* Per-row delete failure (role=alert): the err pair, inline after the
|
||||
(re-enabled) button. */
|
||||
.git-source-row-error {
|
||||
margin-left: 0.6rem;
|
||||
background: var(--err-bg);
|
||||
color: var(--err-ink);
|
||||
border: 1px solid var(--err-line);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 0.3rem 0.6rem;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Env-fallback rows carry no Remove (nothing is stored to remove) —
|
||||
the tag says where the row comes from (brand pair, 6.9:1). */
|
||||
.git-source-env-tag {
|
||||
|
||||
Reference in New Issue
Block a user