Skip to content

Introduce typed PLATFORM_SIZES, improved font/WASM pipeline, API param parsing, UI refresh, and workspace reorg#3

Merged
saurabhsharma2u merged 2 commits intocodex/restructure-repo-for-clean-structurefrom
codex/restructure-repo-for-clean-structure-j3jmsi
Mar 6, 2026
Merged

Introduce typed PLATFORM_SIZES, improved font/WASM pipeline, API param parsing, UI refresh, and workspace reorg#3
saurabhsharma2u merged 2 commits intocodex/restructure-repo-for-clean-structurefrom
codex/restructure-repo-for-clean-structure-j3jmsi

Conversation

@saurabhsharma2u
Copy link
Copy Markdown
Contributor

Motivation

  • Provide a single source of truth for platform output sizes and stronger typing across the stack to avoid mismatched size/format values.
  • Make the core rendering pipeline more robust: better font loading with fallbacks, deterministic cache keys, and runtime-aware WASM initialization.
  • Harden request handling in adapters/servers by validating and coercing query params and formats.
  • Refresh the web UI and reorganize internal packages (sandbox -> internal-sandbox) to align with the updated core contracts.

Description

  • Add a new @og-engine/types package (canonical PLATFORM_SIZES, PlatformSize, request/template contracts) and update consumers to use typed sizes.
  • Update server/adapters (apps/server-node, apps/web, apps/worker-cf) to parse and coerce size and format query params with safe defaults and stricter template validation.
  • Refactor @og-engine/core: add docs/comments, move sandbox dependency to internal/sandbox, implement buildCacheKey, runtime-aware initWasm/getResvg, improved fonts.ts with Google Fonts CSS discovery, CDN and local fallbacks, and typed handler/render interfaces (RenderResult, handler response shapes).
  • Adjust rendering pipeline to use the renamed internal-sandbox in render.ts, and make pre-generation/background generation robust and properly referenced.
  • Update Next.js app: new global styles (globals.css), site layout (layout.tsx) and home/preview pages for a refreshed UI/UX and async preview route handling.
  • Update templates (dark, minimal, sunset) with redesigned metadata, schemas and render implementations, remove in-repo binary preview PNGs from the repo and add .gitignore rule for generated previews.
  • Workspace/tooling changes: rename packages/sandbox -> internal/sandbox, update references in packages/core and lockfile, update pnpm-workspace.yaml, and change turbo.json schema/tasks.

Testing

  • Ran a monorepo build with pnpm -w -s build, which completed successfully.
  • Performed TypeScript checks with pnpm -w -s typecheck, which passed without type errors.
  • There are no unit test suites in the affected packages (most test scripts are placeholders returning "no tests").

Codex Task

@saurabhsharma2u saurabhsharma2u changed the base branch from main to codex/restructure-repo-for-clean-structure March 6, 2026 12:30
@saurabhsharma2u saurabhsharma2u merged commit 71d30f2 into codex/restructure-repo-for-clean-structure Mar 6, 2026
0 of 3 checks passed
@saurabhsharma2u saurabhsharma2u deleted the codex/restructure-repo-for-clean-structure-j3jmsi branch March 6, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant