3.3 KiB
3.3 KiB
1. Platform Env Bootstrap
- 1.1 Add a small dotenv loader in
platform/configthat reads local.envfiles without overriding explicit process environment values. - 1.2 Add config tests for
platform/.envMySQL settings, process env precedence, and missing DSN behavior through storage initialization.
2. Personal Settings Workspace
- 2.1 Add a first-party personal settings route, page id, registry entry, and navigation entry point for authenticated users.
- 2.2 Move profile, theme palette, background preset, uploaded background, and logout controls from the sidebar popover into the new page.
- 2.3 Keep profile and theme saves wired to current-user APIs and show API vs local fallback persistence state.
- 2.4 Add/update frontend tests for routing, shell account navigation, and profile/theme API calls.
3. Verification
- 3.1 Run
cd platform && go test ./config ./api ./service ./repo -count=1. - 3.2 Run
cd platform_web && npm run typecheck && npm test && npm run build. - 3.3 Run
scripts/check-structure.sh. - 3.4 Run
openspec validate fix-env-profile-settings --strict. - 3.5 Perform a browser walkthrough for the personal settings page and record the result.
Verification Evidence
- 2026-07-07:
cd platform && go test ./config ./api ./service ./repo -count=1passed. - 2026-07-07:
cd platform_web && npm run typecheckpassed. - 2026-07-07:
cd platform_web && npm testpassed with 11 files / 47 tests. - 2026-07-07:
cd platform_web && npm run buildpassed and Vite produceddist/assets. - 2026-07-07:
scripts/check-structure.shpassed. - 2026-07-07:
openspec validate fix-env-profile-settings --strictreported the change is valid; PostHog telemetry flush failed due restricted DNS and did not affect validation. - 2026-07-07: Started
cd platform_web && npm run dev -- --port 5173; Vite served the app athttp://127.0.0.1:5174/because 5173 was occupied. Browser walkthrough could not be completed in this tool session because no in-app browser/Chrome control tool or local Playwright/Puppeteer dependency was exposed. - 2026-07-08: Rechecked task
3.5before generating the next architecture-stream OpenSpec. The browser walkthrough remains explicitly blocked in this session: an in-app browser connection opened the auth page athttp://127.0.0.1:5177/, but DOM snapshot capture failed withTypeError: o.incrementalAriaSnapshot is not a function; the fallback-enabled dev server then failed to bind requested localhost ports withlisten EPERMfor127.0.0.1:5180,127.0.0.1:5173, and127.0.0.1:5177. The walkthrough is not accepted; it must be rerun manually or in a working browser/dev-server session before closing this change. - 2026-07-08: Browser walkthrough accepted after starting the platform API with file storage at
127.0.0.1:18080and using the existing Vite dev server at127.0.0.1:5173. Logged in with the seeded API-backed platform administratoroperator.local@example.test, landed on#/home, opened#/profile, verified个人设置showedAPI 已连接,Operator,operator.local@example.test,active, and platform-admin navigation. Edited the contact note toapi walkthrough verified 2026-07-08, clicked保存资料, observed个人资料已保存到数据库, reloaded#/profile, and confirmed the note value persisted through the API-backed session.