Skip to content

Harden generation pipeline, fix family placement, add CI and tests - #1

Merged
QROST merged 1 commit into
mainfrom
claude/funny-galileo-ctyxy9
Jun 22, 2026
Merged

Harden generation pipeline, fix family placement, add CI and tests#1
QROST merged 1 commit into
mainfrom
claude/funny-galileo-ctyxy9

Conversation

@QROST

@QROST QROST commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

A "perfection" pass over the Meshy Revit plugin: fixes real correctness bugs, hardens the API/generation pipeline, closes a UX gap, and adds the project infrastructure (CI + tests) that was missing. No local .NET toolchain is available in this environment, so the new CI workflow doubles as build validation for these changes.

Bug fixes

  • Family (.rfa) placement: call doc.Regenerate() after FamilySymbol.Activate() — a well-known requirement before NewFamilyInstance, and a common cause of placement failures. Also guard against a missing/unresolvable symbol and always clean up the temp .rfa (even when placement throws).

Robustness

  • MeshyApiService: null-safe response parsing with clearer error messages, DRY GET/POST helpers, a 5-minute download timeout, a minimum poll interval, and an API-key argument check.
  • Cancellation now flows through task creation and model download, not just polling.
  • Empty texture_prompt is omitted from refine requests.

UX

  • Added a working Cancel button. The cancellation plumbing (CancellationTokenSource) already existed but was unreachable from the UI. Generate handlers are also guarded against re-entrancy (wiring up the previously-dead _isGenerating field).

Project quality

  • CI workflow (.github/workflows/ci.yml): builds all three Revit configurations (Release-R2024/2025/2026) on Windows and runs unit tests on every push/PR.
  • Unit tests for the OBJ parser (tests/MeshyRevit.Tests). The parser and mesh model types have no Revit/WPF dependency, so the test project links those sources directly and targets plain net8.0 — it runs cross-platform on CI.
  • .editorconfig, ignore CI packaging/test artifacts.
  • README: fixed the incorrect clone URL, documented cancellation, added a security note for the plaintext API key, a known-limitations section, and a testing section.

Notes / honest limitations documented

  • Only the OBJ mesh is imported; generated textures/PBR maps are not applied as Revit materials (geometry only). This is now stated in the README rather than implied as supported.

Testing

  • ⚠️ No .NET SDK is available in this environment, so changes were verified by careful review. The new CI workflow will build all Revit configs and run the unit tests on this PR.

🤖 Generated with Claude Code


Generated by Claude Code

Bug fixes
- Family placement: regenerate the document after activating the family
  symbol (a common cause of Family (.rfa) placement failures), guard
  against a missing/unresolvable symbol, and always clean up the temp
  .rfa file even when placement throws.

Robustness
- MeshyApiService: null-safe response parsing with clearer errors, DRY
  GET/POST helpers, a 5-minute download timeout, a minimum poll interval,
  and an API-key argument check.
- Thread the cancellation token through task creation and model download
  so cancellation works across the whole pipeline, not just polling.
- Omit empty texture_prompt from refine requests.

UX
- Add a working Cancel button (the cancellation plumbing existed but was
  unreachable from the UI) and guard the generate handlers against
  re-entrancy, wiring up the previously unused _isGenerating field.

Project quality
- Add a CI workflow that builds all three Revit configurations on Windows
  and runs unit tests on every push and pull request.
- Add xUnit tests for the (Revit-free) OBJ parser; the test project links
  the parser sources so it stays cross-platform.
- Add .editorconfig, ignore CI packaging/test artifacts.
- README: fix the clone URL, document cancellation, add a security note
  for the plaintext API key, known limitations, and a testing section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EidhhLZEGQ2JxyGTAkNGvo
@QROST
QROST marked this pull request as ready for review June 22, 2026 05:32
@QROST
QROST merged commit d246f30 into main Jun 22, 2026
8 checks passed
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.

2 participants