Adopts the reusable RuleBuilder (#176) for inline query authoring in the Channel Builder (/app/new-channel).
What
Extract CollectionsScreen's smart-collection dialog into a shared, self-contained component SmartCollectionDialog (web/src/builder/); consume it in both CollectionsScreen and the Channel Builder.
The Channel Builder's Collections source gains a "New smart query" action: author an ad-hoc query with RuleBuilder → createSmartCollection persists it as a real named SmartCollection → it is added to the lineup by smartCollectionId.
Pure frontend — no REST/OpenAPI/MCP/migration change (the MCP already exposes ersatztv_create_smart_collection; the SPA reuses existing endpoints).
The Auto-Tune half is a different primitive (group-by, not single-query filtering) and a backend epic. It is designed separately in docs/superpowers/specs/2026-07-23-auto-tune-arbitrary-field-design.md and filed as its own issue — not wired here. Key finding: ISearchIndex has no facet API, so distinct-value enumeration must be DB-sourced (extending #434's seam).
Verification
web typecheck + lint clean; full vitest suite green (981), incl. a new inline-smart-query test that drives the real component through create→lineup→from-lineup body (asserts smartCollectionId).
Cold-context review: clean, no findings (verified the constructed lineup item field-by-field against GetLibraryBrowseItemsHandler.AppendSmartCollections).
Live-E2E on a real instance: query authored in the SPA persisted as SmartCollection Action Picks (genre:"Action") and added to the lineup; 0 console errors; RuleBuilder loaded the real field catalog.
Adopts the reusable **RuleBuilder** (#176) for inline query authoring in the **Channel Builder** (`/app/new-channel`).
## What
- Extract CollectionsScreen's smart-collection dialog into a shared, self-contained component **`SmartCollectionDialog`** (`web/src/builder/`); consume it in both CollectionsScreen and the Channel Builder.
- The Channel Builder's **Collections source** gains a **"New smart query"** action: author an ad-hoc query with RuleBuilder → `createSmartCollection` persists it as a real named SmartCollection → it is added to the lineup by `smartCollectionId`.
- Pure **frontend** — no REST/OpenAPI/MCP/migration change (the MCP already exposes `ersatztv_create_smart_collection`; the SPA reuses existing endpoints).
## Scope note (the "and/or" in #437)
The **Auto-Tune** half is a *different primitive* (group-by, not single-query filtering) and a **backend epic**. It is designed separately in `docs/superpowers/specs/2026-07-23-auto-tune-arbitrary-field-design.md` and filed as its own issue — not wired here. Key finding: `ISearchIndex` has no facet API, so distinct-value enumeration must be DB-sourced (extending #434's seam).
## Verification
- web typecheck + lint clean; **full vitest suite green (981)**, incl. a new inline-smart-query test that drives the real component through create→lineup→`from-lineup` body (asserts `smartCollectionId`).
- Cold-context review: **clean, no findings** (verified the constructed lineup item field-by-field against `GetLibraryBrowseItemsHandler.AppendSmartCollections`).
- **Live-E2E** on a real instance: query authored in the SPA persisted as SmartCollection `Action Picks` (`genre:"Action"`) and added to the lineup; 0 console errors; RuleBuilder loaded the real field catalog.
## Docs
- `docs/spa-conventions.md` §12 updated (shared-component boundary + interface).
fixes #437
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adopt the reusable RuleBuilder (#176) for inline query authoring in the Channel
Builder (/app/new-channel). Extract CollectionsScreen's smart-collection dialog
into a shared, self-contained component (SmartCollectionDialog) and consume it in
both screens; the Channel Builder's Collections source gains a "New smart query"
action that persists the authored query as a real SmartCollection and adds it to
the lineup by smartCollectionId. Pure frontend — no REST/MCP surface change (the
MCP already exposes ersatztv_create_smart_collection).
The Auto-Tune half of #437 is a different primitive (group-by, not single-query
filtering) and a backend epic; it is designed separately in
docs/superpowers/specs/2026-07-23-auto-tune-arbitrary-field-design.md and filed as
its own issue rather than wired here.
Verification: web typecheck + lint clean; full vitest suite green (981, incl. a new
inline-smart-query test); cold-context review clean; live-E2E on a real instance
(query authored in the SPA persisted as SmartCollection "Action Picks" and added to
the lineup, 0 console errors).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cold-context adversarial review (fresh reviewer, no implementation role) on this head sha: clean, no findings. Verified extraction fidelity (SmartCollectionDialog is a behavior-preserving move of CollectionsScreen's SmartDialog), the constructed lineup item field-by-field against GetLibraryBrowseItemsHandler.AppendSmartCollections, dialog open/close/reset + busy guard + error surfacing, and lineupKey dedup. Frontend-only: no auth/lock/migration/API-write surface. Local gate green (typecheck, lint, 981 vitest) + live-E2E on a real instance.
Review-verdict: MERGEABLE @ 5fba6187ce9839b97246f4bd6327fc3c5638e18c
Cold-context adversarial review (fresh reviewer, no implementation role) on this head sha: **clean, no findings**. Verified extraction fidelity (SmartCollectionDialog is a behavior-preserving move of CollectionsScreen's SmartDialog), the constructed lineup item field-by-field against `GetLibraryBrowseItemsHandler.AppendSmartCollections`, dialog open/close/reset + busy guard + error surfacing, and lineupKey dedup. Frontend-only: no auth/lock/migration/API-write surface. Local gate green (typecheck, lint, 981 vitest) + live-E2E on a real instance.
CI note — the EF migration integrity red is an environmental cache-action flake, not this PR.
The job died at the Cache NuGet packages step, before any migration logic ran:
❌ Failure - Main Cache NuGet packages
remove /root/.cache/act/…/.gitignore: no such file or directory
This is a transient Gitea/act cache-tarball glitch (ci.infra-shaped-red-under-load). This PR touches no .cs, no migration, and no Directory.Packages.props, so it cannot introduce migration drift.
Confirming it is isolated: Build & test (.NET) passed on the same runner using the identicalCache NuGet packages step, as did API docs in sync and Formatting.
Per protocol I am not re-pushing (that re-runs the whole pipeline and can't be cancelled). Resolution is an operator UI rerun of the EF migration integrity job; the H6/H10 gate reads overall status, so merge stays blocked until that job is green.
**CI note — the `EF migration integrity` red is an environmental cache-action flake, not this PR.**
The job died at the **Cache NuGet packages** step, *before* any migration logic ran:
```
❌ Failure - Main Cache NuGet packages
remove /root/.cache/act/…/.gitignore: no such file or directory
```
This is a transient Gitea/act cache-tarball glitch (`ci.infra-shaped-red-under-load`). This PR touches **no `.cs`, no migration, and no `Directory.Packages.props`**, so it cannot introduce migration drift.
Confirming it is isolated: **`Build & test (.NET)` passed** on the same runner using the *identical* `Cache NuGet packages` step, as did `API docs in sync` and `Formatting`.
Per protocol I am **not** re-pushing (that re-runs the whole pipeline and can't be cancelled). Resolution is an **operator UI rerun of the `EF migration integrity` job**; the H6/H10 gate reads overall status, so merge stays blocked until that job is green.
timothy
merged commit be1070de51 into main2026-07-23 23:17:42 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adopts the reusable RuleBuilder (#176) for inline query authoring in the Channel Builder (
/app/new-channel).What
SmartCollectionDialog(web/src/builder/); consume it in both CollectionsScreen and the Channel Builder.createSmartCollectionpersists it as a real named SmartCollection → it is added to the lineup bysmartCollectionId.ersatztv_create_smart_collection; the SPA reuses existing endpoints).Scope note (the "and/or" in #437)
The Auto-Tune half is a different primitive (group-by, not single-query filtering) and a backend epic. It is designed separately in
docs/superpowers/specs/2026-07-23-auto-tune-arbitrary-field-design.mdand filed as its own issue — not wired here. Key finding:ISearchIndexhas no facet API, so distinct-value enumeration must be DB-sourced (extending #434's seam).Verification
from-lineupbody (assertssmartCollectionId).GetLibraryBrowseItemsHandler.AppendSmartCollections).Action Picks(genre:"Action") and added to the lineup; 0 console errors; RuleBuilder loaded the real field catalog.Docs
docs/spa-conventions.md§12 updated (shared-component boundary + interface).fixes #437
🤖 Generated with Claude Code
Review-verdict: MERGEABLE @
5fba6187ceCold-context adversarial review (fresh reviewer, no implementation role) on this head sha: clean, no findings. Verified extraction fidelity (SmartCollectionDialog is a behavior-preserving move of CollectionsScreen's SmartDialog), the constructed lineup item field-by-field against
GetLibraryBrowseItemsHandler.AppendSmartCollections, dialog open/close/reset + busy guard + error surfacing, and lineupKey dedup. Frontend-only: no auth/lock/migration/API-write surface. Local gate green (typecheck, lint, 981 vitest) + live-E2E on a real instance.CI note — the
EF migration integrityred is an environmental cache-action flake, not this PR.The job died at the Cache NuGet packages step, before any migration logic ran:
This is a transient Gitea/act cache-tarball glitch (
ci.infra-shaped-red-under-load). This PR touches no.cs, no migration, and noDirectory.Packages.props, so it cannot introduce migration drift.Confirming it is isolated:
Build & test (.NET)passed on the same runner using the identicalCache NuGet packagesstep, as didAPI docs in syncandFormatting.Per protocol I am not re-pushing (that re-runs the whole pipeline and can't be cancelled). Resolution is an operator UI rerun of the
EF migration integrityjob; the H6/H10 gate reads overall status, so merge stays blocked until that job is green.