Summary:
The main editor page page.tsx is corrupted and contains duplicated imports, hooks, and UI blocks which cause the editor/preview UI to render incorrectly and break expected interactions.
File: page.tsx
Steps to reproduce:
- Start the app (dev server).
- Open the main editor page.
- Observe duplicated UI sections and broken editor → preview behavior (iframe preview may not load or shows stale content).
Observed behavior:
- Duplicate UI elements rendered on the page.
- Editor and live preview out of sync or failing to update.
- Unsafe base64 helpers using escape/unescape present (can corrupt Unicode in share links).
- Fragile preview blob revocation logic (uses fixed timeout).
- Potential client-side import of Node-targeted prettier (bundling/runtime issues).
Expected behavior:
- Single, consistent editor UI.
L2. ive preview updates reliably when code changes.
- Safe base64 encoding/decoding for share/export.
- Robust blob lifecycle management and no Node-only libs imported into client bundles.
Impact:
- Blocks normal editing and preview workflows for users.
- Can corrupt shared payloads and increase bundle size / cause runtime errors.
BEFORE:
AFTER:

Summary:
The main editor page page.tsx is corrupted and contains duplicated imports, hooks, and UI blocks which cause the editor/preview UI to render incorrectly and break expected interactions.
File: page.tsx
Steps to reproduce:
Observed behavior:
Expected behavior:
L2. ive preview updates reliably when code changes.
Impact:
BEFORE:
AFTER: