make admin ui #1
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard#1
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?
like _ui
how we did for ../hero_collab
follow skill
some examples of what we did on hero_collab
we want groups, rights on groups
users
workspaces, so we can put whiteboards per workspace
rights on workspaces
right mouse button for mgmt
in a subagent do /hero_admin_connection_status
in another subagent check /hero_crates_best_practices_check
Implementation Spec for Issue #1: Make Admin UI
Objective
Rebuild the
hero_whiteboard_uiadmin dashboard following the proven patterns fromhero_collab_ui, replacing the current placeholder implementation with a full-featured, single-page admin interface. Add Groups with role-based security rights, workspace-scoped permissions, right-click context menus for all entities, and a connection status widget. The server must also gain group/rights RPC endpoints and a new database migration.Requirements
index.htmlextendingbase.html), matching thehero_collab_uiarchitecturerust-embedgroups,group_members,group_rightstables via migration 003clapfor CLI args andaxum::serve/healthand/.well-known/heroservice.jsonendpointsImplementation Plan (10 Steps)
Step 1: Server -- Add Groups Database Migration
003_groups.sql(groups, group_workspaces, group_members, group_rights, group_right_workspaces tables)Step 2: Server -- Add Group Models and Queries
Step 3: Server -- Add Group RPC Handlers and Wire into Dispatch
Step 4: Server -- Update OpenRPC Specification
Step 5: UI -- Download and Embed Static Assets
Step 6: UI -- Rewrite Rust Backend
Step 7: UI -- Rewrite Templates (base.html + index.html)
Step 8: UI -- Rewrite CSS (dashboard.css)
Step 9: UI -- Rewrite JavaScript (dashboard.js)
Step 10: Integration Testing and Verification
Acceptance Criteria
Test Results
Details
cargo build— compiled all workspace crates without errorscargo test— 0 failed, 0 errors across all crate test suitesImplementation Summary
Server Changes (
hero_whiteboard_server)New files:
src/migrations/003_groups.sql— Migration adding 5 tables:groups,group_workspaces,group_members,group_rights,group_right_workspacessrc/handlers/group.rs— 11 RPC handler functions for group CRUD, member management, and security rightsModified files:
src/db/mod.rs— Registered migration 003src/db/models.rs— AddedGroup,GroupMember,GroupRightstructssrc/db/queries.rs— Added 11 query functions (group CRUD, members with recursive resolution, rights with workspace scoping)src/handlers/mod.rs— Addedpub mod group,group_countin health responsesrc/rpc.rs— Wired 11group.*methods +system.pinginto dispatchopenrpc.json— Added 12 new method definitions + 3 new schemasAdmin UI Changes (
hero_whiteboard_ui)New files:
scripts/download-assets.sh— Downloads vendor assets (Bootstrap 5.3.3, Bootstrap Icons, Unpoly)static/js/connection-status.js— Reusable connection status poller (from hero_collab_ui)static/css/bootstrap.min.css,static/js/bootstrap.bundle.min.js— Bootstrap 5.3.3static/css/bootstrap-icons.min.css,static/css/fonts/— Bootstrap Icons 1.13.1static/js/unpoly.min.js,static/css/unpoly.min.css— Unpoly 3.12.1Rewritten files:
Cargo.toml— Added clap, removed unused depssrc/main.rs— Clap CLI args, AppState, Unix socket binding via axum::servesrc/routes.rs— Newline-delimited JSON RPC proxy, /health, /.well-known/heroservice.jsonsrc/assets.rs— Simplified rust-embed static assetstemplates/base.html— Full SPA layout: navbar with connection status, tabs, stats sidebar, theme toggletemplates/index.html— All tab panes (Dashboard, Workspaces, Boards, Users, Groups, API Docs), modals, context menustatic/css/dashboard.css— Complete CSS matching hero_collab_ui patternsstatic/js/dashboard.js— Complete client-side app: RPC, tabs, CRUD, groups with members/rights, context menus, auto-refreshDeleted:
templates/partials/— All partial templates (replaced by single-file SPA)Test Results
Implementation committed:
6b99870Browse:
6b99870