Commit Graph

7 Commits

Author SHA1 Message Date
fd37b92fd9 teaching: run lessons in-app through an iframe-driven console
The teaching console now lives inside Web FreeCAD: web/teaching-console.html
hosts the workbench in a same-origin iframe and drives its DOM directly, with
no Node server and no spawned Chrome. The driver modules run in the framed
page's own realm (bridge.ts publishes window.__teaching), so the proven
driver/assembly code is reused unchanged and the CSP without 'unsafe-eval' is
never crossed.

- steps.ts globs both courses' ui-steps records (skipping their index.json
  manifests) so each lesson downloads only its own chunk
- runner.ts checks prerequisites in dependency order, then runs part or
  assembly lessons; a pass stores the FCStd in OPFS freecad-documents under
  the course document name, which is what assembly lessons consume
- assembly lessons insert, joint, solve and save through lib/assembly.mjs;
  insertLink falls back to UI-suffixed object names (Body1 for Body)
- check-inapp-console.mjs (npm run check:console-inapp) is green: preflight,
  P01 volume within 6e-13, OPFS evidence, both viewports
- run-inapp-lessons.mjs runs a whole course in one browser; reducer 23 parts
  + assembly and carrier 20 parts + assembly all pass in-browser

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 09:18:26 +08:00
3a3077c089 teaching: run carrier builds from the toolkit page
Extract the console runner into web/teaching/console-runner.js (classic
script, file:// safe) and mount it on carrier-toolkit.html: per-part 运行本件,
per-group 运行本组, 运行全部 and 运行装配, all fed by lessons.mjs ids at build
time. Fix runButton() emitting a duplicate class attribute that dropped
run-group/run-assembly. Server banner now prints the carrier page URL; new
check:carrier-live gate drives the dry lesson end-to-end.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 21:45:08 +08:00
87b2a6cb8a feat(carrier): 航空母舰 PartDesign 有头创建工具包与初学者教学
- 新数据链 web/teaching/cases/carrier-partdesign:20 件零件(spec.json 唯一来源)、
  内核建造器 parts/*.mjs、traces/FCStd/replay 全量产物;装配 20 插入 + 19 关节。
- 工具包 tools/carrier:catalog / preflight / create-part / create-assembly /
  create-all / list / self-test / README,按零件与装配拆分为独立工具。
- 共享驱动扩展 web/tools/cad-ui-rebuild:Loft/Pipe/Hole/Fillet/Chamfer/Mirrored/
  LinearPattern 交互,Reversed 复选框补齐;装配 saveAssemblyBundle 先 Accept 再保存。
- 教学:lessons.mjs 新增 carrier 组(环境课 + 20 件 + 装配),suite-runner 增加
  carrier-part/carrier-assembly,生成 carrier-toolkit.html 并接入 index 与控制台证据。

验证:20 件 210 步全部有头通过(P05 修复后 39640 m³;P06 回归 8/8);
装配 20/20 插入、19/19 关节、20 组件 0 畸形、0 mismatch;check:carrier、
check:reducer、check-console --live 全绿。

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 18:46:27 +08:00
b876ad5742 feat(reducer): 二级减速器有头创建工具包与初学者教学
- tools/reducer:目录/前置/单件/批量/装配/自测,复用 cad-ui-rebuild 引擎
- 教学控制台新增「二级减速器」分组:23 件逐件课 + 装配课 + 环境课(job kind reducer-part / reducer-assembly)
- web/teaching/reducer-toolkit.html 初学者配套页(生成物)+ Playwright 双视口门禁
- 首页补工具入口;工具手册随 npm 脚本变更重生成

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 07:31:24 +08:00
dd8ba17591 feat(teaching): browser console that runs the functional suite by workbench
A lesson-oriented page plus a loopback job service: click a lesson and the
page really runs tools/web-freecad-functional-suite.mjs, tools/layout-probe.mjs
or tools/static-host.mjs, streaming logs and rendering verdicts from the
suite's own manifest/checkpoint/results files.

- web/tools/teaching-console: catalog derived from scenarios + registry,
  73 workbench lessons, template, builder (--check), Playwright gate,
  no-browser self-test for every spawn validation path
- web/teaching/suite-runner.mjs: argv whitelist, env whitelist, single
  concurrent job, process-group cancel, ring-buffered logs, preflight
- web/teaching/server.mjs: /api/console/* routes with startup token,
  Origin check, SSE events, artifact serving; existing routes untouched
- preflight blocks runs (E_PREFLIGHT) instead of starting without dist,
  Chrome, DISPLAY, kernel or Playwright
- gates: self-test OK, build --check idempotent, offline + live Playwright
  (MOD-Part-01 pass, cancel path) OK

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 04:12:31 +08:00
5b61c77c2c docs(tools): generate full tool usage manual (HTML)
Static scan of tools/ and web/tools/ (1691 files, no tool execution):
purpose/usage/env extraction with provenance badges, family folding
(67 families covering 953 files), 16 directory records, 42 hand-written
chapters plus 4 environment contracts, and a 1996-entry search index.

- tools/tools-manual/{config,scan,extract,chapters,render,verify}.mjs
- tools/build-tools-manual.mjs (--check/--verify/--stats)
- tools/check-tools-manual.mjs (Playwright, desktop + mobile)
- docs/current/tools-manual/index.html (1.08 MB, self-contained)
- web/package.json: manual:tools, check:tools-manual

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-25 03:22:36 +08:00
bc40c77153 Add Web FreeCAD manual matrix, capture harness and chapter 1 pilot
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-13 11:13:29 +08:00