phase: 89_source_ignore_paths
All verification complete — TODO.md was already cleared in the roadmap commit; the two extra unit-test diffs are necessary fake-signature adaptations for the new keywords. Everything is green, no fixes were needed. ## Phase 89 — final verification pass: ALL GREEN **Verified (all 6 task files present in `complete/`):** - `git_sources.ignore_paths` JSONB column + migration 0013; `alembic downgrade -1 && upgrade head` round-trips (head `0013`) - Importer: `normalize_ignore_path`/`is_ignored`/`_ignore_for_root`, `ignore` in walk + progress pre-walk, `ignore_by_root` in `import_sources` - API: GET/POST carry list; admin-only `PATCH` (replace, 404/422 fixed details, anonymous 403) - Pipelines wired: `_run_sync`, `_run_upload` re-upload, `scripts/import_docs.py` - Sources-page box: dialog, §7.4 save lifecycle, `N ignored` tag, a11y; env rows get no box **Test/lint results:** - `uv run pytest` → 1808 passed - `uv run pytest --cov=app --cov-report=term-missing` → TOTAL **99%** (>90%) - `uv run pytest tests/e2e/test_source_ignore_paths.py -v --no-cov` → 6 passed (isolated, DB up) - Regressions in isolation: `test_git_sources_admin` 6, `test_archive_upload_sources` 5, `test_sync_button` 3, `test_smoke` 3 — all passed - `uv run ruff check . && uv run pyright` → clean (0 errors) **Completion criteria:** box→PATCH 200→count+GET round-trip ✅ · sync excludes `ignore/` (no docs/chunks/embeddings/summaries) + prunes newly-ignored (pruned==2) ✅ · no-mid-path rule E2E ✅ · PATCH 404/422/replace/clear/403 ✅ · full gate green ✅ · commit + phase move left to harness per rules. **Deviations:** none blocking — E2E pins `files == 4` (overview's "5" was an off-by-one vs its own 6-file tree, documented in-test); `tests/unit/test_importer.py` + `test_sync_button.py` test-double fakes extended for the new keywords (needed for the suite to stay green). **Next pending phase:** none — `todo/` holds only this phase.
This commit is contained in:
@@ -2183,6 +2183,173 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; }
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
/* ---------- Per-source ignore-paths editor (phase 89, task 05) ----------
|
||||
The shell's Sources view: the page-local alertdialog that edits
|
||||
one source's ignore list (one path per line — the phase-89 A1
|
||||
prefix rule, stated in plain words in the helper copy). The EXACT
|
||||
#remove-confirm-dialog overlay contract (phase 69): 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 the 46rem chat-column width or the
|
||||
viewport, whichever is narrower. The box: a VISIBLE block label
|
||||
(WCAG — never aria-label-only) over a mono textarea (the box is a
|
||||
data entry, not prose — the var(--mono) stack); the error line is
|
||||
the err pair (err-ink on err-bg 9.3:1, the err-line border);
|
||||
Cancel is the ghost ink-soft family (5.1:1 on --surface); Save is
|
||||
the solid brand family (--bg text on --brand 5.2:1 — the
|
||||
.new-chat-btn convention; the hover lightens the fill). Both
|
||||
buttons >=44px; :focus-visible via the global 3px outline rule (no
|
||||
local suppression — focus lands on Cancel at open and is visible);
|
||||
no animation (reduced-motion safe by construction). AA pairs: title
|
||||
/ copy / label are --ink (or ink-soft) on --surface (13.8:1 /
|
||||
5.1:1); the source value is --ink on --bg (16.7:1). Phase-08
|
||||
tokens only; system fonts; no CDN. */
|
||||
.ignore-editor {
|
||||
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). */
|
||||
.ignore-editor[hidden] { display: none; }
|
||||
|
||||
.ignore-editor-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
/* --bg at 82% — the doc-modal dim, no backdrop-filter (no-blur). */
|
||||
background: rgba(15, 10, 10, 0.82);
|
||||
}
|
||||
|
||||
.ignore-editor-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);
|
||||
}
|
||||
|
||||
.ignore-editor-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). */
|
||||
.ignore-editor-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;
|
||||
}
|
||||
|
||||
.ignore-editor-copy {
|
||||
margin: 0 0 1rem;
|
||||
color: var(--ink); /* 13.8:1 on --surface */
|
||||
}
|
||||
.ignore-editor-copy code { font-family: var(--mono); font-size: 0.85em; }
|
||||
|
||||
/* Visible block label (WCAG — the textarea is NEVER labelled only via
|
||||
aria-label); ink-soft on --surface (5.1:1). */
|
||||
.ignore-editor-label {
|
||||
display: block;
|
||||
margin-bottom: 0.35rem;
|
||||
color: var(--ink-soft);
|
||||
font-size: 0.88rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* The box: full panel width, mono (the var(--mono) stack), theme-
|
||||
consistent border on --bg; the focus-visible ring is the global
|
||||
3px outline (no local suppression); vertical resize for long
|
||||
lists (up to 200 entries, A4). */
|
||||
.ignore-editor-textarea {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 9rem;
|
||||
padding: 0.55rem 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);
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* The in-dialog failure line (role=alert): the err pair (err-ink on
|
||||
err-bg 9.3:1, the err-line border) — the .remove-confirm-error
|
||||
language. */
|
||||
.ignore-editor-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);
|
||||
}
|
||||
|
||||
.ignore-editor-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.6rem;
|
||||
margin-top: 1.1rem;
|
||||
}
|
||||
|
||||
/* The two dialog buttons: >=44px targets, the house 3px :focus-visible
|
||||
via the global outline rule (no local override). */
|
||||
.ignore-editor-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;
|
||||
}
|
||||
.ignore-editor-btn:disabled { opacity: 0.5; cursor: wait; }
|
||||
|
||||
/* Cancel — the ghost ink-soft family (5.1:1 on --surface), like the
|
||||
remove dialog's Cancel; the brand pair on hover (12.4:1 on
|
||||
brand-soft). */
|
||||
.ignore-editor-cancel {
|
||||
border: 1px solid var(--line);
|
||||
background: transparent;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
.ignore-editor-cancel:hover:not(:disabled) {
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* "Save" — the solid brand family (the .new-chat-btn convention):
|
||||
--bg text on --brand (5.2:1 — AA); the hover lightens the brand
|
||||
fill (the .new-chat-btn hover pair). */
|
||||
.ignore-editor-save {
|
||||
border: 0;
|
||||
background: var(--brand);
|
||||
color: var(--bg);
|
||||
}
|
||||
.ignore-editor-save:hover:not(:disabled) { background: #f55a72; }
|
||||
|
||||
/* 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
|
||||
@@ -2266,6 +2433,54 @@ 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; }
|
||||
|
||||
/* Phase 89: the per-row "Ignore paths" trigger (makeRow — left of
|
||||
Remove): the .git-source-remove idiom (same size/spacing, >=44px
|
||||
target) in a NEUTRAL secondary fill — it must read distinct from
|
||||
the destructive Remove (text label included, never icon-only; the
|
||||
hover takes the brand-soft pair, 12.4:1 — Remove hovers to the err
|
||||
pair, 9.3:1). */
|
||||
.git-source-ignore {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
flex: 0 0 auto;
|
||||
padding: 0.35rem 0.7rem;
|
||||
margin-right: 0.4rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius-sm);
|
||||
background: transparent;
|
||||
color: var(--ink-soft);
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
font-size: 0.82rem;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
.git-source-ignore:hover:not(:disabled) {
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
/* Phase 89: the "N ignored" count tag — next to the location <code>
|
||||
in the Source cell (TEXT + a distinct background, never color
|
||||
alone — WCAG 1.4.1): --ink on --bg (16.7:1) inside the --surface
|
||||
card; the line border keeps the chip legible when the row hover
|
||||
swaps the cell onto --bg too. */
|
||||
.git-source-ignore-count {
|
||||
display: inline-block;
|
||||
margin-left: 0.55rem;
|
||||
padding: 0.08rem 0.5rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
background: var(--bg);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 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