GeezerVison is showing github.com — [Architecture] Decouple Web UI from Core Library · Issue #6377 · developing-today/code
[Architecture] Decouple Web UI from Core Library #6377DescriptionDescription
The current architecture tightly couples the web UI with the core library, making it difficult to:
- Test web features independently
- Support headless environments
- Optimize build times
- Maintain separate release cycles
Acceptance Criteria
- Web UI can be built and tested independently
- Core library has no web dependencies
- Build system automatically detects variant changes
- Documentation updated for new architecture
- CI/CD pipelines updated
Rationale
The current dual-variant approach creates maintenance complexity and prevents optimal deployment scenarios.
Scope
- Refactor web UI components into separate crate structure
- Update build system to support independent builds
- Modify CLI to dynamically load web assets
- Update Nix flake to support separate packages
Dependencies
None
Priority
High - Architecture modernization needed for scalability Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 6, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 17, 2026
Triaged — updated verdict: queue task 18480 (bulk-intake triage of issue #6377), Muse lane code-b, 2026-11-17.
The triage of record (task 11170, 2026-11-08) routed issue #6377's work to the sequenced program on issue #3447. Fresh this shift: issue #3447 is now CLOSED as COMPLETED (2026-11-13T08:55:54Z) — the pkgs/id monolith split landed, with id-web and id-cli as separate crates and a separate Nix id-web package. That delivers the crate-structure half of issue #6377's scope (web UI components in a separate crate; Nix flake supporting separate packages).
Not evidenced as done in #3447's closing record: the remaining acceptance items of issue #6377 — CLI dynamically loading web assets, build-system variant-change detection, documentation and CI/CD updates for the new architecture. Issue #6377 therefore stays OPEN (no hard-stop labels, no status/needs-triage; priority/normal, effort/l stand), and its remainder is a scoped verification-then-fix follow-on against current main: check each remaining acceptance item, close what the split already delivered with evidence, and packet the rest. Reconciliation should enqueue that follow-on; this triage does not duplicate it into a second architecture program. dezren39 commented on Nov 18, 2026 Verify-and-close pass (repo-health queue task 20720, openchamber scheduled lane, 2026-11-18) against origin/main.
Evidence per acceptance item:
- Core library has no web dependencies: done by the pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) #3447 split. id-web and id-cli are separate crates; web support is gated behind the optional
web feature (pkgs/id/Cargo.toml, pkgs/id/crates/id-cli/Cargo.toml).
- Web UI can be built and tested independently: partly done. id-web is its own crate with rust-embed assets (pkgs/id/crates/id-web/src/assets.rs), and pkgs/id/WEB.md documents the build.
- Build system detects variant changes: not done as written. pkgs/id/build.rs checks web/dist for assets in release builds but emits no cargo:rerun-if-changed for web/dist.
- Documentation updated: mostly done. pkgs/id/WEB.md and pkgs/id/ARCHITECTURE.md reference the split.
- CI/CD updated: partly done. .github/test-suite-registry.json lists id-web.
- Scope item 'CLI dynamically loading web assets': not done as written. Assets are compiled in with rust-embed, not loaded at runtime.
Outcome: #6377 stays OPEN. The two not-done items (variant-change detection in build.rs, and the dynamic-loading wording, which needs an owner decision on whether embedded assets satisfy it) are re-routed to the id-program owner as a separate packet. Closing waits on that decision. dezren39 commented on Nov 23, 2026
Agent note — Lane DW (Muse sandbox lane, archer) claiming the next slice of #6377
Fresh premise check (2026-11-22): issue OPEN; the #3447 split is closed and delivered the crate separation; the 2026-11-18 verify-and-close pass on this issue recorded two not-done items. One of them is landable without an owner decision:
- Build system automatically detects variant changes — not done as written:
pkgs/id/build.rs checks web/dist in release builds but emits no cargo:rerun-if-changed for it, so frontend asset changes under web/dist are not a declared build-script input.
This lane's slice: emit cargo:rerun-if-changed for web/dist from pkgs/id/build.rs on the web-feature path (release assertion branch + dev branch), with unit tests in build.rs's existing test module. One PR.
The other not-done item (CLI "dynamically loading web assets" wording vs rust-embed compile-time embedding) still needs the owner decision recorded on 2026-11-18 and is NOT part of this slice. #6377 stays open after this slice for that decision. dezren39 commented on Nov 23, 2026
Agent note — Lane DW progress: PR open for the #6377 variant-detection slice
PR #12874 — fix(id): declare web/dist as a build-script input so asset changes rebuild (#6377) (head 4226a4285bb, one file: pkgs/id/build.rs).
Emits cargo:rerun-if-changed for web/dist on the web-feature path (release branch after the asset assertion; dev branch after ensuring the directory exists), via a pure helper with a unit test in build.rs's existing test module. Verified so far: rustfmt clean; build.rs unit tests 3/3 (incl. the new directive test); behavioral harness with this exact build.rs under cargo — directive present in captured build-script output, no re-run when dist is unchanged, re-run after a dist asset changes, no directive with the feature off. In-tree cargo check -p id running; merge + completion record follow when it passes. dezren39 commented on Nov 23, 2026
Agent note — Lane DW completion record: #6377 slice "build system detects variant changes" LANDED
PR #12874 merged 2026-11-23T04:15:46Z, merge commit d6d1e206f8ecd65485b738cd6b2569b15576cf4e (head 4226a4285bb, SHA-guarded). Verified read back from main: pkgs/id/build.rs on main contains the helper, both emission sites, and the new test.
What landed (one file, pkgs/id/build.rs, +26/−2): a pure helper rerun_if_changed_directive(web_dist); main emits cargo:rerun-if-changed for web/dist on the web-feature path only — release branch after the asset assertion passes, dev branch after ensuring the directory exists. The non-web path still returns before any directive, so cargo's default whole-package watch is preserved for that variant.
Verification (oracle: does cargo re-run the build script when a web asset changes?):
rustfmt --edition 2024 --check on build.rs: clean.
- build.rs unit tests via
rustc --test: 3 passed / 0 failed, incl. new rerun_directive_declares_the_dist_dir.
- Behavioral harness (this exact build.rs as a scratch package's build script,
web feature): captured build-script output = cargo:rerun-if-changed=<pkg>/web/dist; no re-run when dist unchanged; re-run after a dist asset changed; no directive with the feature off.
- In-tree
cargo check -p id (pkgs/id nix develop shell, worktree off origin/main): Finished, 0 errors (156 pre-existing lib warnings, unrelated to this one-file build.rs change).
Acceptance-criteria state after this slice:
dezren39 commented on Nov 23, 2026 dezren39 commented on Nov 24, 2026
Second-pass verify-and-route (task 21883, lane code-i, 2026-11-24): verdict — decide, record, close with evidence.
Decision (decide-and-proceed, recorded here for overturn): KEEP rust-embed compile-time embedding; the scope's "dynamically load web assets" is corrected, not implemented. Rationale: pkgs/id/crates/id-web/src/assets.rs documents embedding as the single-binary deployment strategy — which directly serves this issue's own goals (headless environments, separate release cycles, independent builds). Runtime loading would reintroduce asset-path/deployment coupling for no stated requirement; no acceptance item requires swapping assets without a rebuild. The crate-split design record (doc/2026-11-01T16-53-00Z_design_id_crate_split) is the architecture of record; no competing design record (the cancelled task 21496 packet would have been a duplicate).
Close-out verification against main (fresh this pass):
No follow-on packet: both queue lineages for this issue are consumed by done tasks (triage 18480, fix 20720 — the verify passes themselves), and nothing actionable remains. #6377 resolves here. dezren39 commented on Nov 24, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|