unify _ui and _web UI #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
the _ui is admin section and can be under /admin/ part on the new _ui
_web functions are the enduser parts and get in _ui server
so new server is _ui and has enduser parts as well as admin parts, admin parts under /admin/
make sure we have self start using /hero_proc_log_selfstart_check
make all clean and shiny
make sure we don't have unneeded scripts
Implementation Spec for Issue #8: Unify _ui and _web UI
Objective
Merge
hero_collab_web(end-user Slack-like chat UI) andhero_collab_ui(admin dashboard) into a single unifiedhero_collab_uicrate. Admin dashboard moves under/admin/path prefix. End-user chat interface becomes the root/page. Removehero_collab_webentirely. Simplify Makefile to use self-start only.Requirements
hero_collab_uibinary serves both end-user and admin pages from one Unix socket/(chat SPA) and/editor/admin//ws/{channel_id}for chat/rpcshared by both UIs--start/--stop) via hero_proc_sdkhero_collab_webfrom workspace, Cargo.toml, buildenv.sh, Makefile--start/--stoppattern (no scripts)Files to Modify/Create
Cargo.toml(root)hero_collab_webfrom workspace membersbuildenv.shhero_collab_webfrom BINARIESMakefilecrates/hero_collab_ui/Cargo.tomlcrates/hero_collab_ui/src/main.rscrates/hero_collab_ui/src/routes.rs/admin/, end-user at rootcrates/hero_collab_ui/templates/base.htmlcrates/hero_collab_ui/templates/chat.htmlcrates/hero_collab_ui/templates/editor.htmlcrates/hero_collab_web/Implementation Plan
Step 1: Update workspace and build configuration
hero_collab_webfrom rootCargo.tomlmembersbuildenv.shBINARIESStep 2: Add hyper-util dependency to hero_collab_ui
hyper-util = { workspace = true }to_ui/Cargo.tomlStep 3: Extract end-user HTML into template files
templates/chat.htmltemplates/editor.html/static/asset pathsStep 4: Restructure router in routes.rs
/to/admin/GET /(chat),GET /editorStep 5: Update main.rs with hyper accept loop
axum::serve()with manual hyper accept loop +.with_upgrades()Step 6: Update admin templates for /admin/ prefix
base.htmlto use absolute/static/paths for assetsStep 7: Update Makefile for self-start pattern
--start/--stopflagsStep 8: Delete hero_collab_web crate
crates/hero_collab_web/directoryStep 9: Verify build and clean up
cargo check,cargo build --releasehero_collab_webreferencesAcceptance Criteria
hero_collab_webcrate fully removed from workspacehero_collab_uiserves chat SPA atGET /hero_collab_uiserves editor atGET /editorGET /admin//static/{*path}for both UIs/ws/{channel_id}POST /rpc--start/--stopflags workmake run/make stopuse self-start patterncargo checkandcargo build --releasepasshero_collab_webremain in codebaseNotes
_webcrate has a 3837-line main.rs with ~3000 lines of inline HTML_ui/static/scripts/run.shandscripts/stop.shdon't actually exist on disk (onlyscripts/build_lib.sh)Test Results
Branch:
development@d616108Date: 2026-03-20
All tests passing, release build succeeds.
Implementation Summary
Changes Made
Workspace & Build Config:
hero_collab_webfrom workspace members in rootCargo.tomlhero_collab_webfrombuildenv.shBINARIESUnified UI Server (
hero_collab_ui):routes.rs): End-user chat SPA atGET /, editor atGET /editor, admin dashboard moved toGET /admin/main.rs): Replacedaxum::serve()with manual hyper accept loop +.with_upgrades()for WebSocket relay over Unix socketstemplates/chat.htmlandtemplates/editor.html/static/assetsbase.html): Static asset paths changed to absolute/static/pathsMakefile:
make runnow uses--startself-start patternmake stopnow uses--stopself-stop patternlogs-webtargetstatus,logs,removetargets to exclude web serviceDeleted:
crates/hero_collab_web/directoryDocumentation:
TECH_SPEC.mdto reflect unified architectureShared Endpoints (all at root level)
GET /— End-user chat SPAGET /editor— Markdown editorGET /admin/— Admin dashboardGET /ws/{channel_id}— WebSocket relayPOST /rpc— JSON-RPC proxyGET /health— Health checkGET /static/{*path}— Shared static assetsTest Results
cargo check: ✅ passcargo test --workspace: ✅ 4 tests, 0 failurescargo build --release: ✅ pass