Skip to content

Extract inline JS from public/index.html into ES modules #8

@flyingrobots

Description

@flyingrobots

Context

public/index.html has grown to 1150+ lines with inline <script> containing the full Admin UI: state management, API client, DOM manipulation, history panel, file upload, autosave, etc. This makes it harder to navigate, test, and maintain.

Proposal

Extract the inline JS into ES modules under public/js/ (or similar), e.g.:

  • api.js — fetch wrappers (api.list, api.snapshot, api.restore, etc.)
  • state.js — shared UI state object
  • ui.js — DOM manipulation, toast, badges, panel logic
  • history.js — history panel fetch/select/restore flows

Load via <script type="module" src="..."> to keep the HTML as a thin shell.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions