User Panel + Market Refactor Execution Plan
Date:
2026-04-04
Owner: WebUI Architecture
Scope: member-facing panel and/marketparity
0. Execution Status
Implemented in the current codebase:
/membernow exposes the four user workflows as first-class surfaces:- spotlight-style store search
- installation management
- upload center with drag/drop
- task queue/history
/marketnow exposes equivalent install/upload controls, local installation refresh, and drag/drop upload affordance./marketnow includes member-scoped upload management surfaces:- my template submissions list + detail jump
- my profile-pack submissions list + detail jump
- Backward-compatible API extensions are live for:
GET /api/member/installationsPOST /api/member/installations/refreshGET /api/member/submissionsGET /api/member/submissions/detailGET /api/member/profile-pack/submissionsGET /api/member/profile-pack/submissions/detailinstall_optionsupload_optionssubmit_options
- Verification landed in interface tests, WebUI unit tests, and browser E2E.
/memberis now spotlight-first: locale switch, primary local-refresh action, and a single global search field lead the page; duplicated member-sideMarket Hubframing was removed from the result surface.
Current tradeoff:
install_options.source_preference=generatednow changes package resolution behavior.- Other option blocks are normalized, persisted, and surfaced back to the UI/API, but not all of them change downstream governance semantics yet.
Immediate closure items for the next pass:
/membertop-bar primary action must be renamed from generic config import wording to explicit local migration wording:Import Local AstrBot Config.- The
/membersurface must render only member-safe entry points in the top utility area:Member ConsoleMarket Hub
- Reviewer/admin/full-console links and developer-mode toggle must not be present in the member DOM, not merely hidden by CSS.
- Raw AstrBot import success must always deep-link into the upload review modal so the user can inspect sections before submission.
1. Target
Restructure the user-facing WebUI into four explicit workflows while preserving existing contracts and route guards:
- Store Search
- Manage Installations
- Upload Center
- Download & Task Management
2. Non-Negotiable Baseline
- Keep current vanilla modular runtime (
app.js,market_page.js, helper modules). - Keep capability gating from
/api/ui/capabilities. - Keep runtime i18n key system (
webui_i18n.js) as mandatory. - Keep existing DOM ID anchors used by tests and orchestration.
3. IA and UI Shape
3.1 Member surface
- Top bar:
- global spotlight-style search
- locale switch
- always-visible
Import Local AstrBot Configprimary utility action
- Main default pane: installed resources overview.
- Secondary pane:
- upload drop zone + upload options
- download/task queue with progress + history
- Mobile:
- side navigation collapsed to drawer
- top search remains first-class (single-row or stacked)
3.2 Market surface parity
/market must expose equivalent install/upload option controls and not degrade to a read-only shell.
4. API Contract Extensions (Backward-Compatible)
4.1 Member installation APIs
GET /api/member/installationsPOST /api/member/installations/refreshGET /api/member/submissionsGET /api/member/submissions/detailGET /api/member/profile-pack/submissionsGET /api/member/profile-pack/submissions/detail
Response envelope stays unchanged: { ok, message, data, error? }
4.2 Payload expansion
POST /api/templates/installinstall_options.preflight: boolinstall_options.force_reinstall: boolinstall_options.source_preference: auto|uploaded_submission|generated
POST /api/templates/submitupload_options.scan_mode: strict|balancedupload_options.visibility: community|privateupload_options.replace_existing: bool
POST /api/profile-pack/submitsubmit_options.pack_typesubmit_options.selected_sectionssubmit_options.redaction_mode
5. Stitch Integration Discipline
- Treat
DESIGN.mdas the source-of-truth contract. - Generate member and market layouts through Stitch.
- Only merge generated fragments through adapter boundaries:
- preserve IDs
- preserve i18n keys
- preserve capability bindings
- Reject generated snippets that break event wiring or RBAC boundaries.
6. Verification Matrix
- Interface tests:
- member installation endpoints
- payload defaults and validation
- WebUI unit tests:
- view-model mapping for installation/task/options states
- i18n key completeness
- E2E:
- card click -> detail drawer
- upload with options
- install with options
- local refresh -> installation list update
- member/market parity
7. Risks and Controls
- Risk: generated markup breaks existing runtime bindings
Control: strict ID-preservation checks in review. - Risk: simplified UX removes power-user controls
Control: collapse advanced controls instead of deleting them. - Risk: UI/back-end capability drift
Control: every control maps intoCONTROL_CAPABILITY_MAPbefore merge. - Risk: member DOM still leaks privileged console affordances even when visually hidden
Control: remove privileged links/toggles frommember.htmlentirely and keep capability enforcement server-side.