Skip to content

feat: Phases 3-5 — Polish, advanced features, web UI, deployment#1

Open
swimbo wants to merge 7 commits into
mainfrom
feat/phase-4-future
Open

feat: Phases 3-5 — Polish, advanced features, web UI, deployment#1
swimbo wants to merge 7 commits into
mainfrom
feat/phase-4-future

Conversation

@swimbo
Copy link
Copy Markdown

@swimbo swimbo commented Feb 15, 2026

Summary

Full implementation of Phases 3 through 5 of the Onshape natural language CAD interface:

Phase 3: Polish & Advanced Features

  • Assembly operations (create, insert part, mate)
  • STL/STEP export with terminal image preview (sixel)
  • Undo/rollback support
  • RAG context for better LLM responses
  • Multi-turn conversation state tracking
  • Error recovery with helpful messages

Phase 4: Nice-to-Have Features (4a-4f)

  • 4a — FastAPI web backend with REST + WebSocket endpoints
  • 4b — Voice input via Whisper with CAD vocabulary corrections
  • 4c — Vision interpreter for image-to-CAD with build executor
  • 4d — Parametric templates (gears, fasteners, structural — 7 templates)
  • 4e — FeatureScript generation with RAG and validation
  • 4f — Design optimization analyzer with auto-fix suggestions

Phase 5: Production Readiness

  • 5a — React + Vite + TypeScript + Tailwind frontend (chat panel, state sidebar, WebSocket streaming)
  • 5b — Integration test harness (31 tests, skip without API keys)
  • 5c — Multi-stage Dockerfile, docker-compose, health endpoint, build script
  • 5d — 8 additional parametric templates (enclosures, bearings, springs, pipe fittings — 15 total)

Bug Fixes

  • Fixed Onshape HMAC authentication (newline separators, lowercase, correct header format, 25-char nonce)
  • Bumped minimum openai to >=1.50 (httpx compatibility)
  • Fixed circular imports in ui/ and tools/ packages

Testing

  • 348 unit tests passing
  • 31 integration tests (skipped without API keys, covers documents/sketches/features/assemblies/export/e2e)
  • Lint clean (ruff)

How to Run

pip install -e ".[web,dev]"
cd frontend && npm install && npm run build && cd ..
onshape-chat web 9090
# Open http://localhost:9090

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Claude Code and others added 7 commits February 14, 2026 16:14
Break the monolithic Phase 4 plan into 6 focused implementation plans:
- 4a: Web UI (React + FastAPI)
- 4b: Voice Input (Whisper)
- 4c: Image Import & Interpretation
- 4d: Parametric Templates
- 4e: FeatureScript Generation
- 4f: Design Suggestions & Optimization

Each plan includes architecture diagrams, implementation code,
file structures, dependencies, risks, and checklists.

Co-Authored-By: Claude <noreply@anthropic.com>
- Assembly operations: create, insert parts, mate with 9 mate types
- Export: STL, STEP, PARASOLID with binary download and file save
- Terminal display: Kitty graphics, Sixel, system viewer fallback
- Error hierarchy: OnshapeError with typed subclasses and ErrorHandler
- Undo/rollback: delete features, rollback bar, feature history
- RAG context: workflow and best-practices reference docs
- Multi-turn context: ContextManager with history compression
- 13 LLM tool definitions across 6 categories
- GLM config updated to Z.ai Coding API (glm-4.7)
- 216 tests passing, lint clean

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- 4a: FastAPI web backend with REST + WebSocket endpoints
- 4b: Voice input via Whisper with CAD vocabulary corrections
- 4c: Vision interpreter for image-to-CAD with build executor
- 4d: Parametric templates (gears, fasteners, structural)
- 4e: FeatureScript generation with RAG and validation
- 4f: Design optimization analyzer with auto-fix suggestions

All 315 tests passing, lint clean.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
…nt, templates

5a: React + Vite + TypeScript + Tailwind frontend with chat panel,
    state sidebar, WebSocket streaming, and API client. FastAPI serves
    built frontend as static files.

5b: Integration test harness (31 tests) with skip-if-no-keys fixtures
    for testing against real Onshape API. Covers documents, sketches,
    features, assemblies, export, and end-to-end pipeline.

5c: Multi-stage Dockerfile (Node build + Python runtime),
    docker-compose.yml, .dockerignore, health check endpoint,
    and build script.

5d: 8 new parametric templates — enclosures (box, electronics case),
    bearings (ball bearing, housing), springs (compression, torsion),
    pipe fittings (flange, elbow). Total: 15 templates.

348 tests passing, 31 integration tests (skipped without API keys).

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Use newline separators between signature fields (was concatenation)
- Lowercase the entire signature string per Onshape spec
- Fix Authorization header format: On <key>:HmacSHA256:<sig>
- Generate 25-char alphanumeric nonce (was short timestamp)
- Pass only path to sign_request, not path+query

Also fix test_config to use _env_file=None so it doesn't read
real .env file during test.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Old openai 1.6.1 was incompatible with newer httpx (removed proxies
kwarg). Require >=1.50 to avoid the TypeError.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Add multi-angle verification system capturing 14 views (6 orthographic +
  8 isometric corners) for comprehensive CAD model inspection
- Fix critical bug where sketch tools in GEOMETRY_TOOLS caused verification
  to undo valid sketches (sketches are 2D and produce no visible 3D change)
- Add coffee mug example and hollow object rules to planning prompt so the
  LLM generates complete plans with subtract/add extrude operations
- Add chat_with_images() to GLM client for multi-image vision requests
- Update get_shaded_view to accept named strings and 3x4 view matrices
- Add planning, orchestration, and verification modules with full test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant