Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d4b066c
fix: add json output instruction to generation prompt for response_fo…
Chenggou1 Apr 7, 2026
faa933b
fix: replace inline json rule with dedicated Output Format section in…
Chenggou1 Apr 7, 2026
d5b0aa3
Merge branch 'OpenLegged:main' into fix/generation-prompt-missing-jso…
Chenggou1 Apr 7, 2026
8bffc04
feat: add isolated live snapshot preview
kleinlau17 Apr 13, 2026
5170506
fix: raise default snapshot dialog height
kleinlau17 Apr 13, 2026
b1554df
fix: stabilize snapshot preview capture flow
kleinlau17 Apr 13, 2026
75b10ce
feat(ai-assistant): add dual-mode inspection setup
kleinlau17 Apr 13, 2026
7eb93a5
fix: keep snapshot dialog open after export
kleinlau17 Apr 13, 2026
6b71e28
fix: capture live orbit target for snapshot preview
kleinlau17 Apr 13, 2026
32b30ea
feat(ai-assistant): refine inspection setup mode ui
kleinlau17 Apr 13, 2026
2d1eb3d
fix: auto-fit snapshot dialog height
kleinlau17 Apr 13, 2026
2edf0c2
fix: widen snapshot dialog and show grid by default
kleinlau17 Apr 13, 2026
12719d8
fix: left-align snapshot grid toggle
kleinlau17 Apr 13, 2026
89eb541
feat(ai-assistant): refine inspection run pointer guidance
kleinlau17 Apr 13, 2026
715185b
feat(ai-assistant): polish normal inspection item states
kleinlau17 Apr 13, 2026
d6e35fa
feat: sync ai inspection dual mode into dev
kleinlau17 Apr 13, 2026
9fd5c00
docs: add ai inspection badge toggle design spec
kleinlau17 Apr 14, 2026
7d335ff
feat(ai-assistant): refine inspection setup interactions
kleinlau17 Apr 14, 2026
44605a1
Merge branch 'OpenLegged:dev' into dev
kleinlau17 Apr 14, 2026
3defdc4
fix: refactor Dialog component structure and improve readability
carlvon17 Apr 15, 2026
858e365
feat: add support for sdf file format in workspace source sync and pr…
carlvon17 Apr 16, 2026
5e2fcc5
Merge pull request #61 from Chenggou1/fix/generation-prompt-missing-j…
wyfhbb Apr 17, 2026
28653b9
Merge branch 'dev' into dev
wyfhbb Apr 17, 2026
7b9a5f9
Merge pull request #68 from kleinlau17/dev
wyfhbb Apr 17, 2026
2c0f4db
fix: update test commands and documentation for clarity
wyfhbb Apr 17, 2026
d393129
feat: enhance texture search paths and add ZincYellow color to Gazebo…
carlvon17 Apr 17, 2026
f6767a7
feat: add support for SDF heightmaps in geometry parsing and rendering
carlvon17 Apr 17, 2026
8ae3c18
feat: sanitize Collada XML for Three.js to prevent crashes due to mis…
carlvon17 Apr 17, 2026
93f6719
feat: add support for polyline geometry in SDF and URDF parsing and r…
carlvon17 Apr 17, 2026
3c3f3e8
feat: fix degenerate opacity handling in ColladaLoader for transparen…
carlvon17 Apr 17, 2026
357d479
feat: add texture rotation support for Gazebo materials in SDF parsing
carlvon17 Apr 17, 2026
798ccd3
feat: add elevation-based heightmap blending and URDF submesh support
carlvon17 Apr 18, 2026
ad52711
feat: add support for detecting non-identity local scales in descenda…
carlvon17 Apr 18, 2026
8ee7c38
feat: add alphaTest support to material definitions and overrides
carlvon17 Apr 18, 2026
58fb7e1
feat: implement multi-pass texture handling for Gazebo materials and …
carlvon17 Apr 18, 2026
77e039a
Merge branch 'dev' of https://github.com/OpenLegged/URDF-Studio into dev
carlvon17 Apr 18, 2026
73f6616
feat: keep import and USD workflows consistent across workspaces
Apr 18, 2026
ca18fb5
fix: preserve WorkspaceCanvas prop compatibility after rebase
Apr 18, 2026
41e8458
fix: stabilize B2 USD roundtrips and viewer startup handoff
Apr 20, 2026
1321a86
fix: improve rotation input layout and keep quick-step buttons on sin…
Apr 21, 2026
b66fed7
feat: improve import workflow, geometry editor, and selection interac…
Apr 22, 2026
ae8604f
chore: sync current URDF Studio workspace changes to dev
Apr 24, 2026
65ba2cd
fix: keep workspace viewer state coherent across import/export edges
Apr 25, 2026
2b3caaa
feat: refine AI inspection setup UI
kleinlau17 Apr 26, 2026
1888528
feat: keep workspace editing coherent across responsive panel flows
Apr 27, 2026
fac81a9
fix: 让左侧结构树折叠时不再下坠和抖动
cmjang Apr 27, 2026
1f55cbb
Merge pull request #72 from kleinlau17/ai-inspection-setup-ui
kleinlau17 Apr 27, 2026
7dce9e0
fix: 稳定拖拽视角后的选中悬停并收紧紧凑面板
cmjang Apr 27, 2026
a05b2d4
chore: sync dev with origin/main for mergeable PR baseline
cmjang Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ scripts/*
scripts/regression/*
!scripts/regression/validate_sdf_cli_truth.ts
!scripts/regression/run_shadow_hand_hover_regression.mjs
!scripts/regression/run_default_link_click_hover_regression.mjs
!scripts/regression/validate_unitree_ros_usd_export_benchmark.mjs
!scripts/regression/benchmark_import_pre_resolve.ts
!scripts/mujoco/
scripts/mujoco/*
!scripts/mujoco/mjcf_compare.ts
Expand Down Expand Up @@ -59,4 +61,8 @@ __pycache__/
!scripts/regression/validate_unitree_ros_usda_browser_smoke.mjs
!scripts/regression/validate_unitree_selected_browser.mjs
!scripts/regression/validate_unitree_ros_usda_selected_browser.mjs
!scripts/regression/validate_source_editor_mjcf_browser.mjs
!scripts/regression/validate_source_editor_unitree_browser.mjs
snapshot-default-page.png

.omx/
838 changes: 13 additions & 825 deletions CLAUDE.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,16 @@ Git hooks are wired through Husky + lint-staged + Commitlint:
- `pre-commit`: formats staged files and runs ESLint / Stylelint on the staged diff
- `commit-msg`: validates Conventional Commit messages

The repository still does **not** force a single root `npm test` command because verification remains module- and fixture-driven.
`npm test` stays limited to repo-contained tests that do not require the external fixture corpora under `test/`.

Validation is typically done through:

- targeted `node --test` / `npx tsx --test` runs next to the changed module
- focused regression scripts under `scripts/regression/`
- `npm test` for the fast repo-contained lane used by `npm run verify:fast`
- `npm run build`
- package workspace builds when touching `src/lib` or `packages/react-robot-canvas`
- fixture-driven checks against large corpora under `test/`, especially `test/unitree_model`, `test/gazebo_models`, `test/awesome_robot_descriptions_repos`, and `test/usd-viewer`
- fixture-driven checks under `test/` via `npm run test:fixtures:*` / `npm run verify:full`, especially `test/unitree_model`, `test/gazebo_models`, `test/awesome_robot_descriptions_repos`, and `test/usd-viewer`

## Documentation

Expand Down
5 changes: 3 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,16 @@ Git hooks 通过 Husky + lint-staged + Commitlint 接入:
- `pre-commit`:对 staged 文件执行格式化,并在 staged diff 上运行 ESLint / Stylelint
- `commit-msg`:校验 Conventional Commit 提交信息

目前仓库仍然**没有**强行统一成单一的根级 `npm test`,因为测试验证依旧以模块定向和 fixture 回归为主
`npm test` 当前只覆盖仓库内可自给的测试,不包含依赖 `test/` 外部大型语料的 fixture 回归

通常通过以下方式完成验证:

- 在改动模块旁边运行定向 `node --test` / `npx tsx --test`
- 运行 `scripts/regression/` 下的定向回归脚本
- 使用 `npm test` 跑 `npm run verify:fast` 采用的仓库内快速测试
- 执行 `npm run build`
- 如果改动了 `src/lib` 或 `packages/react-robot-canvas`,补跑包构建
- 针对 `test/` 下的大型 fixture 语料做回归检查,尤其是 `test/unitree_model`、`test/gazebo_models`、`test/awesome_robot_descriptions_repos`、`test/usd-viewer`
- 通过 `npm run test:fixtures:*` / `npm run verify:full` 针对 `test/` 下的大型 fixture 语料做回归检查,尤其是 `test/unitree_model`、`test/gazebo_models`、`test/awesome_robot_descriptions_repos`、`test/usd-viewer`

## 文档入口

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# AI Inspection Professional Badge Toggle Design

**Date:** 2026-04-14

**Goal**

Enable the status badge in AI inspection professional mode to toggle the corresponding inspection item selection. Clicking `已纳入` or `未纳入` should behave the same as toggling that item from the left inspection sidebar.

**Scope**

- Only change the professional-mode setup view in the AI inspection modal.
- Only make the per-item status badge clickable.
- Keep the rest of the card read-only.
- Preserve existing behavior in normal mode, running state, and report state.

**Current Behavior**

- In professional mode, the right-side detail panel shows each inspection item as a card.
- The badge text reflects selection state with `已纳入` or `未纳入`.
- The badge is display-only and cannot change selection.
- Selection changes are currently driven from the left sidebar and the normal-mode setup view.

**Desired Behavior**

- In professional mode setup, clicking the status badge toggles the item selection.
- When the item is selected, clicking `已纳入` removes it from the run.
- When the item is not selected, clicking `未纳入` includes it in the run.
- The right card state, left sidebar state, and summary metrics stay synchronized because they continue to share the same `selectedItems` state.

**Design**

## UI structure

- Replace the badge-only `span` in `InspectionSetupView.tsx` with a semantic `button`.
- Keep the visual style close to the existing badge so the change is behavioral, not visual redesign.
- Add a small hover/focus treatment consistent with current token usage.

## Data flow

- `AIInspectionModal.tsx` remains the owner of `selectedItems`.
- Pass a new `onToggleItem(categoryId, itemId)` callback into `InspectionSetupView`.
- The callback updates `selectedItems` with the same add/remove semantics already used by the sidebar item toggle.

## Interaction rules

- The badge is clickable only in setup view professional mode.
- No change to whole-card click behavior.
- No extra confirmation dialog.
- No i18n changes are required because the existing labels already match the desired states.

## Accessibility

- Use a real `button` so keyboard users can trigger the change.
- Keep the visible label as the current included/skipped text.
- Add an `aria-pressed` state tied to item selection.

## Testing

- Add a test in `AIInspectionModal.test.tsx` that enters professional mode, clicks the right-side status badge, and verifies:
- the right-side item state toggles from included to skipped or the reverse
- the selection summary updates
- the left sidebar selection count remains synchronized

**Files**

- Modify `src/features/ai-assistant/components/AIInspectionModal.tsx`
- Modify `src/features/ai-assistant/components/InspectionSetupView.tsx`
- Modify `src/features/ai-assistant/components/AIInspectionModal.test.tsx`

**Out of Scope**

- Making the entire inspection item card clickable
- Changing normal-mode selection behavior
- Refactoring shared selection helpers between the sidebar and setup view
- Any report-view interaction changes
6 changes: 5 additions & 1 deletion docs/update-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
npm run dev
npm run lint
npm run typecheck
npm run test
npm run test # 仓库内快速测试;不依赖 test/ 大型 fixture 语料
npm run build
npm run verify:fast
npm run verify:full
Expand Down Expand Up @@ -81,6 +81,10 @@ npm run test:fixtures:unitree-ros-usda
npm run build:package:react-robot-canvas
```

说明:
`npm run verify:fast` 只跑仓库内可自给的检查。
依赖 `test/` 目录大型语料的回归,统一走 `npm run test:fixtures:*` 或 `npm run verify:full`。

## 5. 测试样本索引

### USD / worker / roundtrip 主样本(`test/unitree_model/`)
Expand Down
41 changes: 23 additions & 18 deletions docs/viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

URDF Studio 只有 `Editor` 一个编辑模式,统一承载三个子域:

| 子域 | 典型任务 |
|------|---------|
| 拓扑 | Link / Joint 增删、拓扑编辑、关节参数 |
| 子域 | 典型任务 |
| ------------------ | ---------------------------------------------- |
| 拓扑 | Link / Joint 增删、拓扑编辑、关节参数 |
| 几何 / 碰撞 / 测量 | Visual / Collision、mesh、材质、纹理、碰撞变换 |
| 硬件配置 | 电机型号、传动比、阻尼、摩擦 |
| 硬件配置 | 电机型号、传动比、阻尼、摩擦 |

新增功能前,先判断属于哪类子能力,避免跨子系统逻辑缠绕。

快速映射:

- 统一公开入口:`features/editor/index.ts`
- 具体实现:`features/urdf-viewer/`(包含拓扑/硬件与几何/碰撞/测量)
- 跨子域共享交互:`app/` 编排层 或 `shared/components/3d/`
Expand Down Expand Up @@ -79,12 +80,15 @@ features/urdf-viewer/
适用范围:`runtime/hydra/render-delegate/*`、`workers/*`、`utils/usd*`、`app/hooks/useFile*.ts` 中消费 worker 结果的 USD 工作流

必须遵循:

- USD stage preparation、runtime metadata、robot hydration、prepared export cache、roundtrip archive 的修复,默认优先放在 worker/runtime 链路完成,不要搬到主线程 adapter 或 debug bridge
- `runtime/hydra/render-delegate/*` 产出的 metadata snapshot 是该链路的 source of truth;缺字段应修 worker/runtime 生成逻辑
- 禁止新增"worker 结果缺失 -> 主线程重建 metadata -> 静默继续"的 fallback
- 对 folded fixed link、collision-only semantic child link 的推断只能基于 stage/truth 中的明确证据,不做纯命名猜测
- `visual_*` / `collision_*` / `group_*` / `xform_*` / `scene` / `root` 这类 roundtrip 容器 prim 不是 link identity;runtime metadata 不得把它们提升为 synthetic link 或 fixed joint

验证要求:

- 改动上述链路时,必须跑 `test/unitree_model` 整套 USD 浏览器验证
- 至少覆盖 `Go2 + B2 + H1-2`
- 浏览器验证产物写入 `tmp/regression/`
Expand All @@ -94,6 +98,7 @@ features/urdf-viewer/
适用范围:`UsdOffscreenStage.tsx`、`usdOffscreenViewer.worker.ts`、`runtime/hydra/render-delegate/*`、`shared/utils/three/dispose.ts`

必须遵循:

- 主线程宿主只负责 handoff、尺寸同步与错误透传;不要重建 runtime truth
- teardown 必须完整释放 observer、DOM/worker 事件监听、RAF/timer、OffscreenCanvas 关联 runtime、scene graph 与 driver 引用
- runtime 全局 handler/registry/active owner 必须提供对称的 unregister/reset
Expand All @@ -102,17 +107,17 @@ features/urdf-viewer/

## 8. 关键 utils 职责速查

| 文件 | 职责 |
|------|------|
| `viewerRobotData.ts` | 统一 viewer 层消费的数据形态 |
| `viewerResourceScope.ts` | source file / assets / robot links 资源域 |
| `usdExportBundle.ts` | USD 场景快照与导出缓存协调 |
| `usdRuntimeRobotHydration.ts` | runtime -> RobotData hydration |
| `usdSceneRobotResolution.ts` | 场景级 robot resolution |
| `usdViewerRobotAdapter.ts` | viewer runtime / snapshot 到应用数据适配 |
| `usdOffscreenViewerWorkerClient.ts` | 主线程对 offscreen worker 请求封装 |
| `usdStageOpenPreparationWorkerBridge.ts` | prepared-open 链路 worker bridge |
| `usdPreparedExportCacheWorkerBridge.ts` | prepared-export 链路 worker bridge |
| `runtimeSceneMetadata.ts` | runtime scene metadata 标准化读模型 |
| `visualizationFactories.ts` | 辅助可视化对象创建 |
| `dispose.ts` | THREE 资源清理 |
| 文件 | 职责 |
| ---------------------------------------- | ----------------------------------------- |
| `viewerRobotData.ts` | 统一 viewer 层消费的数据形态 |
| `viewerResourceScope.ts` | source file / assets / robot links 资源域 |
| `usdExportBundle.ts` | USD 场景快照与导出缓存协调 |
| `usdRuntimeRobotHydration.ts` | runtime -> RobotData hydration |
| `usdSceneRobotResolution.ts` | 场景级 robot resolution |
| `usdViewerRobotAdapter.ts` | viewer runtime / snapshot 到应用数据适配 |
| `usdOffscreenViewerWorkerClient.ts` | 主线程对 offscreen worker 请求封装 |
| `usdStageOpenPreparationWorkerBridge.ts` | prepared-open 链路 worker bridge |
| `usdPreparedExportCacheWorkerBridge.ts` | prepared-export 链路 worker bridge |
| `runtimeSceneMetadata.ts` | runtime scene metadata 标准化读模型 |
| `visualizationFactories.ts` | 辅助可视化对象创建 |
| `dispose.ts` | THREE 资源清理 |
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@
"generate": "npm run ai-prompts:generate",
"generate:check": "node scripts/generate_ai_prompt_templates.mjs --check && node scripts/generate_inspection_criteria.mjs --check",
"build:with-generate": "npm run generate && npm run build",
"test": "npm run test:unit:app-hooks && npm run test:fixtures:imports",
"test": "node --import tsx --test vite.config.test.ts && npm run test:unit:app-hooks",
"test:fixtures:imports": "esbuild scripts/regression/validate_import_fixture_matrix.ts --bundle --platform=node --format=cjs --alias:@=./src --external:jsdom --outfile=tmp/regression/fixture-import-matrix.cjs && node tmp/regression/fixture-import-matrix.cjs",
"test:fixtures:myosuite-imports": "esbuild scripts/regression/validate_myosuite_imports.ts --bundle --platform=node --format=cjs --alias:@=./src --external:jsdom --outfile=tmp/regression/myosuite-import-matrix.cjs && node tmp/regression/myosuite-import-matrix.cjs",
"test:fixtures:unitree-ros-usd-export-benchmark": "node scripts/regression/validate_unitree_ros_usd_export_benchmark.mjs",
"test:fixtures:unitree-ros-usd-export-e2e-benchmark": "node scripts/regression/validate_unitree_ros_usd_export_e2e_benchmark.mjs",
"test:fixtures:unitree-ros-isaacsim-truth": "npx tsx scripts/regression/validate_unitree_ros_usd_against_isaacsim.ts",
"test:fixtures:unitree-ros-urdfs": "npx tsx scripts/regression/validate_unitree_ros_urdfs.ts",
"test:fixtures:unitree-usd": "node scripts/regression/validate_unitree_selected_browser.mjs",
"verify:fast": "npm run format:check && npm run lint && npm run typecheck:quality && npm run test && npm run build",
Expand All @@ -70,7 +72,7 @@
"test:fixtures:unitree-ros-usda": "node scripts/regression/validate_unitree_ros_usda_selected_browser.mjs",
"test:fixtures": "npm run test:fixtures:imports && npm run test:fixtures:unitree-ros-urdfs && npm run test:fixtures:unitree-usd && npm run test:fixtures:unitree-ros-usda && npm run test:fixtures:unitree-ros-usd-export-benchmark",
"dev:with-generate": "node scripts/start_dev_server.mjs --generate",
"test:unit:app-hooks": "node --test src/app/hooks/useEditableSourcePatches.test.ts src/app/hooks/workspaceGeneratedSourceState.test.ts src/app/utils/assemblyRootComponentSelection.test.ts src/app/utils/importPreparation.workerSafe.test.ts src/app/components/UnifiedViewer.typecheck.test.ts src/app/handoff/bootstrap.test.ts src/app/utils/popupHandoffImport.test.ts"
"test:unit:app-hooks": "node --import tsx --test src/app/hooks/useEditableSourcePatches.test.ts src/app/hooks/workspaceGeneratedSourceState.test.ts src/app/utils/assemblyRootComponentSelection.test.ts src/app/utils/importPreparation.workerSafe.test.ts src/app/components/UnifiedViewer.typecheck.test.ts src/app/handoff/bootstrap.test.ts src/app/utils/popupHandoffImport.test.ts"
},
"license": "Apache-2.0",
"dependencies": {
Expand Down
Loading