@@ -56,6 +56,18 @@ When editing `apps/ui/src/App.tsx` and `apps/ui/src/styles.css`, keep the render
- Be careful with Chinese text encoding in UI files. Avoid introducing BOM or accidental encoding changes when patching `App.tsx`, `styles.css`, or other renderer text files.
- For UI skeleton changes, validate with `corepack pnpm typecheck` and `corepack pnpm build`, and manually confirm chat, experts, plugins, and settings still render with correct height and scrolling behavior.
## Chinese Encoding Safety
When editing `apps/ui/src/App.tsx`, avoid whole-file rewrites. This file contains Chinese UI copy and has previously been corrupted by PowerShell encoding conversion.
- Prefer `apply_patch` for small targeted edits.
- Do not use `Set-Content`, `Out-File`, or raw `WriteAllText` on `App.tsx` unless explicitly writing UTF-8 without BOM and after checking the diff.
- After edits, verify the file does not start with UTF-8 BOM bytes `239,187,191`.
- Inspect `git diff -- apps/ui/src/App.tsx` before validation; Chinese text must not become mojibake or `�`.
- If Chinese text is corrupted, compare against the already pushed version with `git show HEAD:apps/ui/src/App.tsx` or the target remote branch, and restore only the corrupted text/sections.
- If corruption is widespread, restore `App.tsx` from the pushed version first, then reapply intended logic changes as small patches.
- Always run `corepack pnpm --filter @qjclaw/ui typecheck` after touching `App.tsx`.
@@ -281,3 +301,28 @@ When work resumes next time, start here:
## 9. Current One-Line Status
Current status: installer, bundled runtime, preinstalled Python payload, runtime cloud config, heartbeat, events, config sync, and runtime telemetry are all working; the app can now auto-fetch OpenClaw runtime config from user-bound employee `api_key`, start bundled runtime, report cloud heartbeat/events, and export diagnostics, but Stage D is still incomplete until broader runtime hardening, product-side cloud APIs, and wider real-world acceptance are finished.
## 10. 2026-05-07 Frontend Refactor Follow-Up
Completed:
- removed `resolveExpertVisualKey` and `buildShortcutPrompt` from `AppSidebar` / `ExpertTree` props; `ExpertTree` now imports the pure helpers directly
- added `ConversationWorkspaceView` to own the chat/expert workspace display composition while keeping stream, composer, session, and smoke logic in `App.tsx`
- moved workspace status chip derivation into `features/shell/startupStatus.ts`
- reduced `App.tsx` to 2672 lines without changing smoke action shapes
Skipped intentionally:
- did not wire `useChatSessionsController`; current local session flow has subtle active-session reset behavior that should be reconciled separately
- did not delete CSS; duplicate selector areas are in the frozen conversation/final theme layers and were not safe to trim in this pass
Verified:
- App encoding check: first bytes `105,109,112`, no UTF-8 BOM