This document is the single source of truth for the next user-facing panel refactor. It covers:
/memberuser console/marketstandalone market- shared visual language in
sharelife/webui/style.css - runtime binding constraints in
sharelife/webui/app.jsandsharelife/webui/market_page.js
- Vanilla modular architecture is already split across focused files:
- page orchestrators:
app.js,market_page.js - view models:
market_cards.js,detail_panel.js,compare_panel.js,profile_pack_compare_view.js - state helpers:
collection_state.js,workspace_state.js,workspace_payload.js - capability gate and scope:
console_scope.js,/api/ui/capabilitiescontract - i18n:
webui_i18n.js(en-US / zh-CN / ja-JP)
- page orchestrators:
- Existing E2E coverage already verifies:
- member role locking
- market cards and detail drawer
- wizard submit flow
- compare/detail render
- capability-gated controls
- Template flow: list/detail/submit/trial/install/prompt/package/download.
- Profile-pack flow: submit/catalog/detail/compare/featured, import/export/dryrun/apply/rollback.
- Reviewer/Admin split and capability gating already implemented at HTTP + UI layers.
- Keep existing API paths and response envelope:
{"ok": bool, "message": str, "data": any, "error": {...}}
- Keep critical DOM IDs used by orchestrators/E2E.
- Keep
/api/ui/capabilitiesas backend source of truth for button-level operation gates.
User panel must center around 4 workflows with low cognitive load:
- Store Search: global command search entry, keyboard-first.
- Manage Installations: installed resources as default view, status-first.
- Upload Center: drag/drop plus explicit option set.
- Download & Task Management: running queue + history + failure reason.
Additionally:
- Add top-center actionable button:
刷新本地已有配置. - Align
/marketwith the same upload/install options model used in/member. - Keep non-frequent controls collapsed by default or behind developer mode.
- Color mode: dark-only at root (
:root { color-scheme: dark; }). - Core palette:
- background:
#131313/#1c1b1b - surface:
#201f1f/#2a2a2a - text:
#e5e2e1, muted#bfc9c3 - accent: emerald
#68dba9,#4fd09f
- background:
- Border/shadow:
- default border token
--border: #404944 - primary shadow
0 22px 48px rgba(0,0,0,0.45)
- default border token
- Main UI text:
Sora - Titles/brand:
Manrope - Code/status payload zones:
JetBrains Mono
- Rounded corners: 14px/16px/20px common radii.
- Sticky top utility bar + card-driven sections.
- Dense but still readable layout; current weakness is workflow scattering.
- Buttons must remain mapped to operation keys in
CONTROL_CAPABILITY_MAP. - Any new action button requires:
- capability key mapping
- locked hint fallback
- disabled/aria-disabled consistency
- All new labels/buttons/placeholders must have keys in
webui_i18n.jsfor:en-USzh-CNja-JP
- Avoid literal strings in templates except fallback text.
- Market keeps URL-sync for local filters:
q,sort,facet_*,pack_id
- New installation/task filters should follow the same deterministic serialization model.
POST /api/templates/submit(already supports package payload)POST /api/templates/installGET /api/profile-pack/catalog+/insights+/detail+/compareGET /api/ui/capabilities
- Installation list/refresh endpoints for local configuration visibility.
- Extend template install payload with option block (preflight/reinstall/source policy).
- Extend template submit/profile-pack submit with option blocks (scan/visibility/sections strategy).
All extensions must be backward compatible (optional fields with server defaults).
- Stitch output is design source, not runtime source.
- Preserve runtime IDs and event boundaries while remapping structure and class system.
- Reject any generated fragment that:
- breaks i18n key-based rendering
- bypasses capability gating
- removes existing E2E anchor IDs without replacement adapters
- No full framework migration to React/Vue.
- No replacement of current auth/rbac model.
- No rewrite of submission/review domain logic.