Commit Graph

15 Commits

Author SHA1 Message Date
NiJingzhe 6dc9fee702 feat(viewer): re-studio React 19 + shadcn rebuild with composer fixes
- remode UI migrated to React 19 + Tailwind 4 + shadcn-style components
  (tabs/toggles/tooltips/resizable/sonner); imperative kernel (SceneView,
  TokenComposer, OpSuggest, PythonEditor, FeatureTreeView) bridged via refs
- composer: same op tip can be cited twice (dedupe guard removed; backspace
  deletes the exact chip); capsule hover bubble is content-sized with a
  560px/72vw max width
- renderer: shift+left-drag pan via TrackballControls keyState borrow
- server: submit payload never truncates user entity selections (cap
  removed, regression test added)
- shared style.css imported into a cascade layer so Tailwind utilities win
2026-09-07 02:29:20 +08:00
NiJingzhe fb29140206 merge: integrate dev (PR #36 viewer re-composer) into 2.1.0-open 2026-09-06 03:58:44 +08:00
NiJingzhe 8fa738806e feat(viewer): re-studio flat UI round — drag resizers, icons, code theme, tab fix
- workspace: column resizer between the two panes and row resizer between
  rebuilt viewport and the dock (lime highlight, same interaction as the
  scadpkg viewer); [hidden] display guard fixes tab switching (source
  panel's display:flex used to override the UA hidden rule)
- composer: single clean input ('whats your idea to rebuild ?'), round-note
  removed, ADD becomes a square + button; draft highlight #00c8ff replaces
  lemon yellow; feature rows are informational (no click-to-code)
- flat restyle on the viewer token system: square corners, #10141a/#202832
  chrome, lime accent, DM Mono micro labels, lucide SVG icons throughout
- CodeMirror: PythonEditor gains a theme option; new remode/code-theme.ts
  flat dark theme replaces the oneDark+CSS-override patchwork
- visible horizontal scrollbars for the code areas; FIT root-cause fix in
  the renderer (radius floor and minDistance clamps now derive from model
  radius; multiplier 2.3)
- RESTUDIO_UI_REDESIGN.md documents every round and acceptance result
2026-09-06 02:35:25 +08:00
NiJingzhe f8793ca7ce feat(viewer): standalone BRep renderer component with layered pipeline
- viewer/src/renderer: BRepRenderer owns scene assembly, materials, PMREM
  studio lighting, GTAO, trackball camera, seam-split edge visuals, FIT and
  snapshot; face pass renders into MSAA RT, edges/overlays composite after
  AO so wireframes keep a constant ink color, and scene.background is
  deliberately unused (a Color background force-clears every render pass)
- scene-view.ts shrinks to the selection/marks composition layer over the
  engine; public picking/marks API unchanged
- cad-three: fixed dark edge color #3a414d; faces get polygonOffset(1,1),
  lines slope-scaled polygonOffset(-2,-2) so silhouette edges stop breaking
  into dashes at glancing angles
- click-selection restores the camera up vector; README documents the
  component entry points
2026-09-06 02:35:10 +08:00
NiJingzhe cbb0e33154 showcase: prompt + BRep turntable GIF table for single-part cases
- README.md / README.zh-CN.md section 1: each case now shows the
  first-turn requirement (verbatim excerpt) next to a turntable GIF of
  the delivered model; flange row notes the 6->8-hole re-parameterization
  so the 8-hole GIF cannot read as inconsistent with the prompt
- turntables rendered by the in-repo Scene Viewer BRep renderer through
  the new viewer/src/embed-bundle.ts (reusable mountScene + camera utils)
  and viewer/gif-harness.html (deterministic azimuth stepping, 48 frames
  per turn), captured headless and assembled as looping GIFs
- img/capability: three turntable GIFs (0.7-1.6 MB each)
- vite build gains the gif-harness input
2026-09-05 21:54:12 +08:00
NiJingzhe 22d19263a7 feat(viewer): re-studio free-form composer with entity/op tags, highlighted source, feature DAG
- composer: contenteditable input where viewport picks and operation tips
  land as atomic colored chips ([face:6](face:6) / [fillet](op:fillet)),
  peers of free text; IME-safe Enter (composition never submits);
  atomic chip backspace; plain-text paste
- operation tips are markdown content, not code: viewer/server/operations/
  <op_id>.md (frontmatter label/category/api/reads/doc_refs + hint body),
  loaded by a stdlib frontmatter parser with mtime cache; broken files are
  named in payload errors, never silently skipped
- five categories per the human's classification (sketch / solid / modify /
  surface / pattern); palette rendered from GET /api/operations
- compose_submission embeds operation_context for every referenced op
- SOURCE tab: read-only CodeMirror python view (PythonEditor extracted from
  SourceDock, shared extensions) with file tabs and line-range reveal
- FEATURE TREE: viewer's DAG algorithm extracted as FeatureTreeView
  (apply_tag hidden, REF/USED/IN badges); clicking a feature switches to
  SOURCE and highlights its source span; FTC-header fallback before the
  first captured package
- tests: registry load + broken-file naming + operation context (9 pass)
2026-09-05 03:10:36 +08:00
NiJingzhe e5ed7b547e feat(viewer): reverse-engineering studio — human-annotated STEP reconstruction loop
Interactive re-mode (re.html) plus a local case server implementing the
ppt-master handshake: the human selects faces / draws regions / labels intent
on the original STEP, the browser composes a submission with server-side
entity context, and a waiting agent reconstructs per the existing
reconstruction contract and writes artifacts the UI polls back.

- viewer/server (stdlib-only): STEP -> synthesized Scene 2.0 projection
  (GLB + entity sidecars, same shape as package scenes), region resolve
  (centroid projection + front-facing filter), entity descriptors,
  atomic submissions, ndjson side recording, --daemon/--wait/--wait-only/
  --shutdown CLI with lockfile and 590s budget
- viewer/src: extract shared cad-three/entity-facts modules (main.ts now
  consumes them), new SceneView class (assembly/picking/highlight) reused
  by both studio viewports
- re-mode UI: annotation canvas (circle/lasso), intent palette, context
  preview, submit flow, rebuilt v3 package loading, comparison image,
  feature tree, evaluation tab
- governance: only the browser writes submission.json; UI never edits
  geometry — code stays the single source of truth
- tests: 6 server tests (scene contract, region math, submission context
  + named failures, wait handshake exit codes, HTTP endpoints)
2026-09-05 00:30:46 +08:00
NiJingzhe 9092a3c8eb feat(viewer): load canonical v3 product packages
Migrate the browser viewer from package schema 2.0 (objects array +
nested scene/scene.zip) to the canonical v3 layout (themed subpackages,
flat scene projection, content-addressed blob store); v2 packages are
rejected as unsupported.

- product-package.ts: v3 manifest gate plus structural validation
  mirroring ProductPackage._validate_manifest (exact manifest key set,
  path/hash-sorted unique records, root resolution, archive blob member
  declarations, projection asset source resolution), exact member-set
  closure with per-record sha256/byte_length verification, content_hash
  and scene revision recomputation, and a definitions-vs-product_assets
  identity multiset check. Scene geometry/entity/source assets are
  materialized from blobs/<sha256> members through the projection
  sources; product and feature-graph ZIP payloads are integrity-checked
  as members but never re-packed, since the viewer never consumes them.
- main.ts: thread the loaded package schema into the footer label and
  drop a dead constant; scene/entity sidecar 2.0 checks are unchanged.
- loader.test.ts: first viewer test suite (node:test via tsx, fixture
  regenerated through prepare:example) covering the happy path and the
  tamper matrix: mutated blob member, smuggled extra member, wrong
  content_hash, and v2 manifest rejection.
2026-09-04 23:44:14 +08:00
NiJingzhe 9d6703a786 feat: enforce canonical product capture workflow 2026-08-15 16:17:11 +08:00
NiJingzhe 5ae41c27a6 Fix component highlight with wide CAD edges 2026-08-03 23:45:33 +08:00
NiJingzhe ee04f5e746 Improve CAD tessellation and edge rendering 2026-08-03 22:40:38 +08:00
NiJingzhe b1ee2c2496 Add horizontal scrolling to feature DAG 2026-08-03 22:39:43 +08:00
NiJingzhe 47343ed28e Link viewport selection to features and source 2026-08-03 22:39:26 +08:00
NiJingzhe e9946c284b Improve viewer DAG and source dock 2026-08-03 02:26:18 +08:00
NiJingzhe 95c9f20513 Add browser Scene package viewer 2026-07-23 03:16:40 +08:00