Skip to content

feat(visual-skin): simplify package limits and support MP4 surface backdrops - #3961

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/visual-skin-mp4-and-limits
Nov 17, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/visual-skin-mp4-and-limits

Conversation

@bobleer

@bobleer bobleer commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Consolidate visual skin package size limits to a single 128 MiB per-file expanded budget (MAX_SKIN_ASSET_BYTES), removing the separate archive size, entry count, 512 KiB manifest, and 48 MiB aggregate expansion caps while retaining preflight metadata checks, streaming extraction bounds, and CRC validation.
  • Add video/mp4 support for surface backgroundAssetId and previewAssetId:
    • Validate MP4 ftyp signatures across both ZIP path entries and embedded base64 data URLs, and reject video/mp4 in component or state slots (which paint CSS backgrounds).
    • Mount MP4 surface backdrops as muted, looping, non-interactive <video> elements inside the surface paint plane ([data-openbitfun-skin-paint]) below the scrim (::after), mapping fit to object-fit and backgroundPosition to object-position, suspending playback while document.hidden, and cleaning up player state on skin switches/deactivation.
    • Render MP4 skin previews in Appearance settings using scoped blob: URLs inside the fixed-geometry preview box.
    • Use native Uint8Array.toBase64 / Uint8Array.fromBase64 when available (with chunked fallback) so large assets encode and decode without multi-second main-thread stalls.
  • Update visual skin documentation and the openbitfun-skin-designer Skill contract, CLI helper, and tests.

Type and Areas

Type: Feature

Areas: web UI, core assembly (openbitfun-skin-designer built-in skill), docs, tests

Motivation / Impact

High-resolution or animated visual skin packs were constrained by separate manifest/archive/entry/aggregate size caps and static-image-only backdrops. Simplifying the importer budget to 128 MiB per file and supporting muted looping MP4 surface backdrops lets skin authors ship rich animated surface environments without relaxing declarative security or component geometry rules.

Note: AI-assisted review, refinement, and verification (tested with Vitest DOM + headless Chromium paint fixtures and Skill CLI tests).

Verification

  • OPENBITFUN_TEST_BROWSER="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" pnpm --dir src/web-ui run test:run src/infrastructure/visual-skin src/infrastructure/config/components/common/ConfigPageLayout.skin.test.tsx src/infrastructure/config/components/VisualSkinConfigSection.test.tsx src/app/scenes/session/ChatPane.composer-layout.test.tsx (22 test files, 175 tests passed, including headless Chromium paint fixtures)
  • node --test src/crates/assembly/core/builtin_skills/openbitfun-skin-designer/scripts/visual-skin.test.mjs (22 tests passed)
  • pnpm run check:web (passed: typography, appearance contracts, theme color audit across 27 surfaces, theme visual contract, tsc --noEmit)
  • pnpm run check:repo-hygiene && git diff --check (passed)
  • node scripts/check-git-object-sizes.mjs --base upstream/main --head HEAD (passed)
  • Remote scenarios: Visual skin selection and IndexedDB storage are host-local to the Web UI surface (docs/features/visual-skin-packs.md); no remote transport, Peer HostInvoke, Relay, or Detached Dispatch wire contracts changed (exercised in local DOM and headless Chromium fixtures only).

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit 9e11703 into openBitFun:main Nov 17, 2026
12 checks passed
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