Skip to content

feat: friendly Smart Mix editor built from provider descriptors - #47

Merged
ant1fr merged 2 commits into
developfrom
feat/smart-mix-editor
Nov 19, 2026
Merged

ant1fr merged 2 commits into
developfrom
feat/smart-mix-editor

Conversation

@ant1fr

@ant1fr ant1fr commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Each source kind now describes the rules it accepts (fields, widgets, choices, presets, summary recipe). Providers own their descriptor (app/providers/<name>/rule_spec.py); GET /api/smart-mix/kinds serves them (new capability smart_mix_kinds, contract 1.2, additive).
  • The Smart Mix settings page replaces the raw-JSON params textarea with entry cards (one-line summary, share of refreshes), a preset picker and a form generated from the descriptor: people and album pickers, theme chips, on-this-day, date range, TMDB title lookup.
  • Raw JSON stays as an opt-in escape hatch; params keys the form does not know are preserved, and kinds without a descriptor open as raw JSON.
  • tests/test_rule_catalog.py checks every descriptor against its request model so the form cannot drift from what the provider accepts.
  • docs/API_CONTRACT.md (table + changelog), docs/openapi.json, README.md and CONTRIBUTING.md updated.

Test plan

  • ruff check ., ruff format --check .
  • pytest (1139 passed), including the OpenAPI/contract drift tests
  • Driven in headless Chrome against a scratch engine: add from presets, edit, validation, save/reload round-trip, legacy kind, phone width, no console errors

🤖 Generated with Claude Code

ant1fr and others added 2 commits November 19, 2026 16:10
Adds GET /api/smart-mix/kinds (capability smart_mix_kinds): per kind, the
fields, widgets, choices, presets and a summary recipe, owned by the
provider (rule_spec.py) and checked against the request models by tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replaces the raw JSON params textarea with entry cards (one-line summary,
share of refreshes), a preset picker and a form generated from
GET /api/smart-mix/kinds: people and album pickers, theme chips, on-this-day,
date range, TMDB title lookup. Raw JSON stays as an opt-in escape hatch and
unknown params keys are preserved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the feat New feature label Nov 19, 2026
@ant1fr
ant1fr merged commit e3c8a4b into develop Nov 19, 2026
5 checks passed
@ant1fr
ant1fr deleted the feat/smart-mix-editor branch November 19, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant