Skip to content

fix(demo): resolve demo loading and stale cache behavior#27

Open
lattln wants to merge 6 commits intomainfrom
demo-load-example-fix
Open

fix(demo): resolve demo loading and stale cache behavior#27
lattln wants to merge 6 commits intomainfrom
demo-load-example-fix

Conversation

@lattln
Copy link
Copy Markdown
Collaborator

@lattln lattln commented Apr 10, 2026

Overview

This PR addresses multiple issues affecting the demo experience and deployment behavior. The primary focus is ensuring that demo routes load reliably under the /demo base path and that users do not encounter stale UI after deployments.

Additionally, it introduces improvements to Nginx caching and redirect behavior to better support atomic deploys and local testing environments. Minor UI adjustments were made to reduce noise in non-builder contexts.


🔧 What Changed

  • Demo Routing & Loading

    • Forced full document navigation from demo landing cards to prevent stale SPA state
    • Updated renderer example schema URLs to be base-path aware (/demo compatible)
  • Builder UI

    • Scoped Canvas header (FIELDS, expand/collapse controls) to builder mode only
    • Removed unnecessary UI elements from preview/runtime contexts
  • Nginx Configuration

    • Added no-cache headers for HTML entry points
    • Preserved long-term caching for static assets
    • Improved redirect handling using absolute_redirect off
    • Aligned local (local.conf) and production (default.conf) behavior

🧪 How to Test

Demo Routing

  1. Run the demo app locally or in a deployed environment

  2. Navigate to /demo

  3. Click any example card on the landing page

  4. Verify:

    • Page fully reloads (not SPA navigation)
    • Example loads correctly without missing schema/data

Base Path Handling

  1. Serve app under /demo (or simulate via config)
  2. Load a renderer example
  3. Confirm schema URLs resolve correctly (no 404s)

Cache Behavior

  1. Deploy changes (or simulate via Docker/local Nginx)

  2. Load the demo app

  3. Make a change and redeploy

  4. Refresh the page

  5. Verify:

    • No stale UI (HTML is refreshed)
    • Static assets remain cached (no unnecessary re-downloads)

Builder UI

  1. Open builder mode

    • Confirm Canvas header is visible
  2. Switch to preview/runtime mode

    • Confirm header is hidden

Redirect Behavior

  1. Test navigation in local environment (port-based)
  2. Verify redirects preserve correct host/port
  3. Validate no unexpected URL rewrites

Breaking Changes

No breaking changes.

@lattln lattln changed the title fix(deploy): resolve demo loading and stale cache behavior fix(repo): resolve demo loading and stale cache behavior Apr 10, 2026
@lattln lattln changed the title fix(repo): resolve demo loading and stale cache behavior fix(demo): resolve demo loading and stale cache behavior Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant