Commit Graph

456 Commits

Author SHA1 Message Date
Codex 58b06fcd17 fix(web): enforce React TypeScript single path 2026-06-03 17:47:27 +08:00
Lyon 0d06a4c5fe fix(web): migrate Cloud Web from vanilla DOM to React + TypeScript + Vite (#756) (#764)
- Replace monolithic app.ts / app-conversation.ts / app-device-pod.ts /
  app-skills.ts / app-helpers.ts / app-session-tabs.ts / auth.ts and the
  364-line index.html with a Vite-built React + TypeScript SPA.
- New src/ module tree: main.tsx, App.tsx, components/{layout,auth,
  conversation,command-bar,device-pod,skills,settings,help},
  hooks/, services/api, services/auth, state, types, logic/ (pure
  helpers from the old tree), styles/.
- Pure-logic modules (composer-policy, code-agent-facts, code-agent-
  status, live-status, message-markdown, app-trace, app-session-tabs,
  runtime) move to src/logic/ with their tests preserved; tests still
  auto-discover.
- Build pipeline switches from Bun.build to Vite: vite.config.ts
  inlines everything into a single app.js + app-assets/ for the dist;
  scripts/dist-contract.ts now runs vite build and asserts the dist
  against a fresh build instead of comparing dist to source.
- scripts/check.ts now verifies the React entry, the mount-only
  index.html, Vite dist, the composer / session / device pod / skills
  / settings / help contracts, the React state shape, and the new
  test file locations. It also refuses to run if any legacy app-*.ts
  or auth.ts survives at the top level.
- New scripts/frontend-guard.ts enforces the 400-line migration target,
  refuses the legacy el map and document.getElementById markers,
  refuses to keep app-*.ts / auth.ts at the top level, and verifies
  the required module directory layout.
- Update scripts/src/dev-cloud-workbench-smoke-lib.mjs to read the new
  src/services/, src/logic/ paths and refresh cloudWebModuleSourceFiles.
- index.html is now a mount shell only (no login shell, no workbench
  shell, no device pod sidebar markup). React renders the full UI from
  src/main.tsx, satisfying the issue-756 migration goal of catching
  unclosed tags at the TypeScript/JSX compile step instead of relying
  on browser DOM healing.
- web:check (now: check + frontend-guard + tsc-check + bun test) is
  green: 51 pass / 0 fail, Vite build produces dist/app.js (379 kB)
  + dist/index.html + dist/app-assets/. Vite build is reproducible;
  dist freshness is verified against a fresh Vite build.
- Grandfathered pure-logic files (> 600 lines): src/logic/app-trace.ts
  (1367), src/logic/live-status.ts (1006), src/logic/code-agent-facts.ts
  (548), src/logic/code-agent-status.ts (572). Reason: each is a tested
  pure-logic classifier with a public contract consumed by both the
  CLI renderer and the Web renderer; splitting now would fork the
  public function shape across two PRs and the migration target is the
  React entry + module split, not a pure-logic refactor.

Refs #756. Closes #756 once merged + deployed to hwlab-v02.

Co-authored-by: Codex <codex@local>
2026-06-03 16:53:25 +08:00
Codex 4221760a29 test(issue722): add CLI integration scripts for terminal vs streaming trace rows
- dev-issue-722-trace-integration.mjs: drives hwlab-cli agent trace --render web
  with a 4151-char final response and asserts the rendered terminal row body
  equals the full text without any 内容已截断 marker
- dev-issue-722-streaming-integration.mjs: drives the same path with a long
  non-terminal streaming message and asserts the CLI preview cap still fires
  at 1200 chars + the ... marker, while the terminal row in the same trace
  keeps the full text
- package.json: expose the two scripts as dev:issue-722:* for repeatable
  CLI verification on the v0.2 runtime

Refs: pikasTech/HWLAB#722
2026-06-03 13:43:21 +08:00
Codex 5b9d614336 fix: route agentrun prompt changes to cloud api 2026-06-03 07:25:35 +08:00
Codex 60a15186e5 fix: assemble unidesk ssh for web agentrun turns 2026-06-02 19:02:58 +08:00
Codex 29e9e23fb3 fix: use native codex stdio continuation 2026-06-02 16:22:27 +08:00
Codex cd58ee7989 feat: 增加 UniDesk SSH runner 工具别名 2026-06-02 16:07:54 +08:00
Codex 66282ba80f fix: unlock cloud web composer steer 2026-06-02 12:25:16 +08:00
Codex b24dc9b1db fix(cicd): allow mirror fetch by exact commit 2026-06-01 22:48:27 +08:00
Codex 0fb8004896 fix: reuse agent worker env image in v02 ci 2026-06-01 22:29:54 +08:00
Codex a12a238452 fix: pin agentrun bundle to v02 source 2026-06-01 19:14:33 +08:00
Codex 3d10fd275b feat: 接入 AgentRun v0.1 adapter 2026-06-01 17:06:11 +08:00
Codex 2787013a72 fix: scope host networking to v02 frpc 2026-06-01 01:40:47 +08:00
Codex ac909d459d fix: run v02 frpc on host network 2026-06-01 01:39:28 +08:00
Codex 64cdf37d27 fix: isolate v02 cicd source state 2026-06-01 01:02:19 +08:00
Lyon 7b64427690 Merge pull request #637 from pikasTech/fix/v02-runner-output-transport-hardening
fix: harden v0.2 code agent transport
2026-05-31 22:56:09 +08:00
Codex 9a14ed06ae fix: harden v0.2 code agent transport 2026-05-31 22:54:50 +08:00
Codex d5baeb461b fix: 防止 artifact 复用污染组件证明 2026-05-31 22:28:10 +08:00
Codex b103a880ca fix: add trace auto-follow bottom pinning 2026-05-31 21:34:14 +08:00
Codex bfcd6722f2 fix: 校验 artifact 复用组件输入 2026-05-31 21:05:44 +08:00
Codex b135388316 fix: 将 hwpod 纳入 v02 runtime component 2026-05-31 20:44:48 +08:00
Codex 153aabf534 fix: compact device pod job output for code agent 2026-05-31 20:14:01 +08:00
Codex ca714bfa27 fix: 优化 device-pod CLI 短入口 2026-05-31 19:16:17 +08:00
Codex ff5da23083 fix: checkout env reuse runtime from source refs 2026-05-31 15:50:02 +08:00
Codex ee0e5f84e6 fix: preserve proxy script crlf escapes 2026-05-31 15:14:03 +08:00
Codex 2a8b5ecbf7 fix: route v02 github ssh through g14 proxy 2026-05-31 15:05:29 +08:00
Codex 89b83465e4 fix: add cloud web env reuse runtime 2026-05-31 14:37:28 +08:00
Codex c462122ad7 fix: refine v02 workbench layout 2026-05-31 13:58:51 +08:00
Codex c64c9a0455 fix: expose v02 runtime readiness progress 2026-05-31 12:51:20 +08:00
Codex 15294ee30d fix: keep v02 config hashes label-safe 2026-05-31 12:37:46 +08:00
Codex f937da1558 fix: limit v02 runtime readiness scope 2026-05-31 12:16:08 +08:00
Lyon 53ffdf386a Merge pull request #611 from pikasTech/feat/v02-uploaded-skills
feat: add v0.2 uploaded skills management
2026-05-31 11:53:37 +08:00
Codex f037b6dcf1 fix: avoid duplicate cloud web dist gate 2026-05-31 11:46:44 +08:00
Codex 70ebd1689c feat: add uploaded skills management 2026-05-31 11:45:10 +08:00
Codex d269dd52bf fix: enforce v02 cloud web validation 2026-05-31 11:39:18 +08:00
Codex 7cafb70d9a fix: absorb v02 web trace layout updates 2026-05-31 10:58:23 +08:00
Codex 6afbbca249 fix: parallelize v02 service builds 2026-05-31 06:46:22 +08:00
Codex 6da43e5a8e fix: prevent v02 cicd full rebuild regressions 2026-05-31 05:32:05 +08:00
Codex 5bf4bf0f47 feat: sync g14 harness and device-pod cli 2026-05-31 05:07:16 +08:00
Codex 395216122a fix: make hwlab cli a short web client 2026-05-30 12:31:07 +08:00
Codex 6edce687ca fix: stabilize cloud web proxy runtime 2026-05-30 11:09:56 +08:00
Codex aee03fab68 fix: delegate cloud web auth to cloud api 2026-05-30 10:23:59 +08:00
Codex e2a29f9fd8 fix: skip v02 runtime wait on no-op promotion 2026-05-30 09:41:31 +08:00
Codex 77b4e8afa2 fix: trim v02 cicd fast path checks 2026-05-30 09:22:37 +08:00
Codex df8a3453c8 fix: skip prepare-source npm install 2026-05-30 09:08:37 +08:00
Codex 59883f4168 feat: add v02 git write mirror relay 2026-05-30 08:38:41 +08:00
Codex 5b4443c67e chore: add git mirror sync timing 2026-05-30 03:11:25 +08:00
Codex 51df6a149a fix: limit git mirror sync to release refs 2026-05-30 03:08:09 +08:00
Codex 2ce3d36f83 fix: keep git mirror staging refs incremental 2026-05-30 03:00:28 +08:00
Codex e46f2c28ea fix: make v02 git mirror sync manual and atomic 2026-05-30 02:55:53 +08:00