Skip to content

id: idea — migrate the web UI from HTMX to Datastar #1073

Closed

Description

@dezren39

Idea: migrate the web UI from HTMX to Datastar

From planning/roadmaps/id.md (Ideas): a plan to move the web UI from HTMX to Datastar exists at .opencode/plans/htmx-to-datastar-migration.md; its state is not checked.

First step when picked up: re-validate the plan against the current web codebase (it has moved a lot since — the ProseMirror codec work alone changed much of web/), then adopt, revise, or drop it with a note. Long-term idea, low priority.

Coordination (2026-10-26 reprioritization, per Drew): every id roadmap item now has its own GitHub issue, and priority encodes the order: (1) the path to Phase 12 — now + priority/high; (2) Phase 12 itself — next; (3) Phase 13 and long-term ideas — priority/low. The dashboard mirrors this list (org Project "Developing Today" #4, Area id-train; Grist Program roadmap, Area id). If this item turns out to be blocked, wrong, or superseded, park or close it with a note rather than letting it stall the queue — dropping an issue is always allowed; silently stalling is not.

Acceptance criteria

  • The existing migration plan (.opencode/plans/htmx-to-datastar-migration.md) is re-validated against the current web/ codebase, with the deltas recorded on this issue.
  • A decision is recorded here: adopt the plan as-is, adopt a revised plan (linked), or drop the idea with a note.
  • If adopted, the first migration step is filed as its own implementation issue.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    priority/lowNice to have; do when convenient
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    on Oct 27, 2026
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: Plan: .opencode/plans/htmx-to-datastar-migration.md (in-repo) · source: planning/roadmaps/id.md (Ideas)

    Notes: Long-term idea at priority/low by Drew's 2026-10-26 reprioritization. The plan's state is unchecked and the web codebase has moved substantially since (the ProseMirror codec work alone) — the re-validation is the real first deliverable, not the migration.

    Risks: A stale plan adopted uncritically would mis-scope the whole migration; conversely, re-validating indefinitely is its own stall — the decision is the exit.

    Suggested approach: Diff the plan's assumptions against current web/ structure first; only then decide adopt/revise/drop.

    Labels were already normalized by the filer (kind, source/human, status/needs-triage, priority, effort, app/id all present); this pass appended the acceptance criteria above and adds meta/enriched.

    🤖 Agent note · filed

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-10-26 22:19 CDT
    • Found via: monitor reconciliation (intake enrichment, protocol §5)
    • Task: Intake review — verified still live (filed this evening as part of Drew's roadmap/validation batch; no merged PR or commit resolves it), appended acceptance criteria, posted this review.
    • Expectation: done when the acceptance criteria above are met (effort class as labelled by the filer).
  4. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Oct 27, 2026
  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane C
    • Session / ID: queue task 2358
    • Found via: queue claim
    • Task: Triage id: idea — migrate the web UI from HTMX to Datastar #1073 — re-validate the HTMX-to-Datastar migration plan against the current web/ codebase at HEAD, record deltas and a decision (adopt / revise / drop)
    • Expectation: effort s; done = triage verdict with HEAD evidence posted and the issue routed per the decision
    • Links: queue task 2358 · plan .opencode/plans/htmx-to-datastar-migration.md
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Triage verdict: SUPERSEDED — the migration already happened; the plan as written is stale

    Re-validated at main HEAD e561ab58ff76ea8e84f2b9a1f108770ebe44a734:

    The plan's goal state is on main:

    1. HTMX is gone from the id UI. Repo-wide search finds no hx-* attributes and no HX-Request handling anywhere; the only HTMX mentions left under pkgs/id are stale docs (see spinoff below) and the plan itself. (HTMX hits in pkgs/identity/ are a different, Go/templ app — out of this issue's scope.)
    2. Datastar is the client framework. pkgs/id/web/package.json depends on @starfederation/datastar ^1.0.0-beta.11; web/src/main.ts line 6 imports it, and line ~445 documents "datastar SSE-based navigation" for token refresh.
    3. Plan Branch 2 + 3 landed literally. build:css runs Tailwind CLI v4 (tailwindcss -i src/input.css ...), daisyui ^5.7.47 is a devDependency, and web/src/input.css implements the plan's spec: DaisyUI plugin, @source scanning of ../../src/web/templates.rs + TS files, and the three custom CRT themes (sneak/arch/mech, pure-black base scale, zero border-radius). web/src/theme.ts switches via data-theme.
    4. WebSockets kept, as the plan required — src/web/ still has collab.rs and tags_ws.rs (plus a newer world_ws.rs the plan predates).

    Deltas — where reality diverged from the plan:

    • Branch 1 was NOT adopted as written. There is no Rust DatastarResponse builder and no datastar-merge-fragments SSE emission in src/web/ (templates.rs/routes.rs contain neither "datastar" nor "htmx"). Navigation/SSE handling lives in the TypeScript client (web/src/navigation.ts, main.ts) instead — the architecture moved client-side, largely through the ProseMirror/codec work this issue warned had changed web/ since the plan was written.
    • The plan's file-level todo list references a web/ layout that no longer exists (the current web/src/ is a full TS app: editor, collab, world surface, search panel, each with tests).

    Decision (per this issue's acceptance criteria)

    Drop the plan as a tracking artifact; the idea is adopted-in-effect and complete. The migration the plan described — HTMX → Datastar, custom CSS → Tailwind v4 + DaisyUI v5 with CRT themes, WebSockets untouched — is the current state of main, reached via a revised server/client split. No "first migration step" implementation issue is needed, so none is filed. This issue closes as superseded.

    Spinoff filed: #1789 — pkgs/id/WEB.md (3 mentions) and pkgs/id/ARCHITECTURE.md (1 diagram label) still describe the UI as HTMX-powered; docs-only fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/refactorCode restructuring with no behavior changemeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientsource/humanFiled directly by a humanstatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions