Skip to content

Documentation: "Standalone UI (works without server)" is incorrect #375

@akn-trackunit

Description

@akn-trackunit

Description

The CI/CD documentation states that the exported UI is "Standalone UI (works without server)", but this is not accurate for local file viewing. The export requires an HTTP server to function properly, which contradicts the documentation's claim.

Current Documentation

The docs state under "Export Structure":

index.html - Standalone UI (works without server)

However, immediately after in "Viewing Exports", the documentation shows:

npx serve -s ./evalite-export

Issue

When opening the exported index.html file directly (via file:// protocol), the following errors occur:

Access to script at 'file:///.../assets/index-*.js' from origin 'null' has been blocked by CORS policy: 
Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, 
data, http, https, isolated-app.

Root Causes

  1. Absolute paths: The generated HTML uses absolute paths (/assets/...) that require a web server's document root to resolve correctly
  2. ES Module restrictions: Modern browsers block ES module imports from file:// protocol for security reasons
  3. CORS policies: Browsers prevent fetching JSON data files via file:// protocol

Steps to Reproduce

  1. Run evalite export --output ./my-export
  2. Navigate to the export directory
  3. Double-click or open index.html in a browser directly
  4. Observe CORS errors and blank page

Expected Behavior (based on docs)

Based on the "works without server" claim, I expected to:

  • Double-click index.html
  • View results immediately without any server setup

Actual Behavior

The export requires an HTTP server to function:

npx serve ./my-export
# or
python3 -m http.server
# or similar

Questions

  1. Is the "works without server" claim intended to mean:

    • "No backend/Node.js server required" (static hosting only)?
    • "Can be opened directly without any server" (file:// protocol)?
  2. Are there plans to support true serverless viewing (e.g., by using relative paths and inlining data)?

Environment

  • Evalite version: 1.0.0-beta.15
  • Browser: Chrome/Safari/Firefox (all modern browsers have these restrictions)
  • OS: macOS/Linux/Windows (affects all platforms)

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