Skip to content

[Bug] : Corrupted page.tsx causing duplicated UI and broken editor/preview #148

@Dushyantcoder07

Description

@Dushyantcoder07

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:

  1. Start the app (dev server).
  2. Open the main editor page.
  3. Observe duplicated UI sections and broken editor → preview behavior (iframe preview may not load or shows stale content).

Observed behavior:

  1. Duplicate UI elements rendered on the page.
  2. Editor and live preview out of sync or failing to update.
  3. Unsafe base64 helpers using escape/unescape present (can corrupt Unicode in share links).
  4. Fragile preview blob revocation logic (uses fixed timeout).
  5. Potential client-side import of Node-targeted prettier (bundling/runtime issues).

Expected behavior:

  1. Single, consistent editor UI.
    L2. ive preview updates reliably when code changes.
  2. Safe base64 encoding/decoding for share/export.
  3. Robust blob lifecycle management and no Node-only libs imported into client bundles.

Impact:

  1. Blocks normal editing and preview workflows for users.
  2. Can corrupt shared payloads and increase bundle size / cause runtime errors.

BEFORE:

Image

AFTER:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions