Skip to content

Refactor builder shell, extract toolbar & panels, and unify simple/advanced modes#49

Open
a5sh wants to merge 1 commit into
mainfrom
codex/implement-core-architecture-and-layout-engines
Open

Refactor builder shell, extract toolbar & panels, and unify simple/advanced modes#49
a5sh wants to merge 1 commit into
mainfrom
codex/implement-core-architecture-and-layout-engines

Conversation

@a5sh
Copy link
Copy Markdown
Collaborator

@a5sh a5sh commented May 8, 2026

Motivation

  • Eliminate duplicated builder implementations and consolidate the UI shell so simple and advanced experiences share the same core, reducing bloat and making layout behavior consistent.
  • Make the top toolbar, left layer panel and right inspector into discrete components so each sub-panel can be maintained in its own file and reused by other builder views.
  • Provide a single mode toggle (Simple / Advanced) in the header and persist the choice to improve discoverability and remove the inconsistent coffee/support CTA.

Description

  • Added a typed BuilderMode and persistence: introduced BuilderMode and persist selection to localStorage under posterium_builder_mode_v1 and expose initialMode to the app via BuilderApp (src/components/builder/types.ts, src/components/builder/index.tsx).
  • Extracted header and mode toggle into TopToolbar and replaced the support/coffee CTA with a Simple/Advanced toggle, centralizing header controls (new file src/components/builder/components/layout/TopToolbar.tsx).
  • Componentized left/right shell panels as small wrappers to host existing LayerPanel/Inspector content for clearer separation of layout and content (new files src/components/builder/components/panels/LeftBuilderPanel.tsx and src/components/builder/components/panels/RightInspectorPanel.tsx).
  • Unified builder entrypoints: removed the separate AdvancedBuilderApp and route both pages (/build and /abuild) through the single BuilderApp with initialMode set to simple or advanced respectively (src/pages/build.astro, src/pages/abuild.astro, deleted src/components/builder/AdvancedBuilderApp.tsx).
  • Simplified main builder layout: the Studio layout now mounts the left source/layers sidebar only in advanced mode and uses the extracted toolbar and panel shell components to reduce inline complexity in src/components/builder/index.tsx.

Testing

  • Ran a production build with npm run build, which completed successfully (Astro/Vite bundle and static pages were generated).
  • Verified formatting with npx prettier --check against the modified builder files, which passed.
  • Ran git diff --check (project lint-style diff check) which reported no issues for the changed files.
  • Ran type checking with npm run typecheck; this surfaced pre-existing unrelated TypeScript errors in admin/dashboard files (not introduced by this change) so typecheck failed overall but the new builder shell files did not produce new diagnostics when filtered.
  • Ran unit test runner with npm test (Vitest), which returned “No test files found” because the repository has no matching tests configured; the test command exited without executing tests.

Codex Task

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
posterium-frontend 1bf3dcb Commit Preview URL

Branch Preview URL
May 08 2026, 05:57 PM

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