Files
zpan/shared/types
Jasper Van c86c7731c1 feat: v2.6 Z7 white-label branding (logo, favicon, wordmark, hide footer) (#346)
* feat: v2.6 Z7 white-label branding — logo, favicon, wordmark, hide footer

Implements the white-label branding feature gated by `white_label` Pro entitlement:

Backend:
- GET /api/branding (public) — returns BrandingConfig from systemOptions
- PUT /api/admin/branding (admin + requireFeature) — multipart upload for
  logo/favicon files + wordmark_text/hide_powered_by fields
- DELETE /api/admin/branding/:field (admin + requireFeature) — resets one field
- server/services/branding.ts — S3 upload to _system/branding/, atomic
  upsertOption via onConflictDoUpdate

Frontend:
- BrandingProvider wraps the app; fetches branding on boot, applies favicon via
  <link>, sets --site-wordmark CSS var
- AppSidebar uses branding context: custom logo src, wordmark text, and
  "Powered by ZPan" footer (hidden when hide_powered_by is set)
- Admin /branding page: shows UpgradeHint for non-Pro, upload form with live
  preview panel for Pro users
- BrandingConfig and BrandingField types moved to shared/types/ per convention

Tests: integration tests for all auth guards (401/403/402), validation (415/422),
and happy paths; frontend api.test.ts covers getBranding, saveBranding,
resetBrandingField.

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* test: add S3 upload and validation coverage for branding routes

Add integration tests for logo/favicon file upload, MIME validation,
size limits, missing storage, and seeded branding values to bring
patch coverage above codecov threshold.

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-24 08:50:53 -04:00
..