Skip to content

feat: add simplified cross-media visual themes - #23

Draft
xueyang-dev wants to merge 5 commits into
codex/zero-beginner-courseware-qualityfrom
codex/visual-theme-v1
Draft

feat: add simplified cross-media visual themes#23
xueyang-dev wants to merge 5 commits into
codex/zero-beginner-courseware-qualityfrom
codex/visual-theme-v1

Conversation

@xueyang-dev

@xueyang-dev xueyang-dev commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the first version of simplified, cross-media visual themes. Teachers choose one visual direction once per project; the system then carries that decision into presentation, image, and video request metadata without exposing individual design parameters.

User experience

  • Keeps the existing auto recommendation mode, with a deterministic reason shown to the teacher.
  • Offers exactly five named themes: Classroom Clear, Active Learning, Warm Story, Eastern Elegance, and Future Exploration.
  • Provides an accessible native dialog with explicit save/cancel behavior.
  • Detects older media that does not match the selected theme and offers a guarded, backend-authorized way to unify it.
  • Keeps unavailable video honest: the UI receives a styled request plan, never a fabricated video asset.

Architecture

  • A versioned backend registry is the single source of truth for theme definitions, recommendation, availability, mismatch state, and available actions.
  • Selection is persisted per project and supports legacy project data through safe normalization.
  • Theme changes only invalidate downstream render/quality/delivery state when those artifacts exist.
  • Media provenance distinguishes inherited historical assets from newly generated themed assets, so unknown old assets are not silently relabelled as current.
  • Image-provider capabilities advertise visual-theme support; video remains an explicitly unsupported request contract in v1.

Scope cuts

  • No theme editor, arbitrary palette/typography controls, template marketplace, or provider-specific visual configuration UI.
  • No real video generation executor or claim that a provider can render video.
  • No retroactive mutation of historical media; unification remains an explicit regeneration action.

Validation

  • Focused backend theme tests: 37 passed (one existing FastAPI/Starlette deprecation warning).
  • Full backend suite: 488 passed, 1 skipped, 7 warnings.
  • Frontend state contracts, TypeScript check, and production build: passed.
  • Playwright E2E: 8 passed.
  • Remote GitHub Actions: both CI jobs passed.
  • Real local-browser recheck used an isolated runtime at 1280×800 and 390×844: recommendation, manual selection, persistence after reload, mismatch/confirmation cancellation, focus restoration, and no horizontal overflow passed. Console warnings/errors were empty.
  • git diff --check passed. The repository currently provides no lint or formatter script.

Known limitation

The current browser-host injection channel remains unavailable because it attempts to redefine process; the browser acceptance was completed with the repository’s local Playwright/Chrome stack instead. This PR does not add a real video executor.

Stacked PR

This is a focused stacked PR with base codex/zero-beginner-courseware-quality, rather than main, so the six prior zero-beginner courseware commits are not mixed into the visual-theme review. Its parent work ultimately depends on Draft PR #22.

Review focus

  • Registry/API authority, persistence, and legacy normalization.
  • Downstream invalidation and mismatch semantics.
  • No fake availability or video output.
  • Dialog accessibility and responsive behavior.
  • Tests around historical-media provenance and selection persistence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant