Repository navigation
viewer: demo gallery + M11-02 MVP workflow e2e shell - #115
Conversation
Load redistributable demos from docs/viewer-demos.json into the viewer dropzone (license/provenance + expected quality), stage them at build time, and strengthen Playwright coverage for open → status → inspect → export/diagnostics. Keep /demos/ on the same-origin privacy allowlist. Co-authored-by: DrunkOnJava <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
Bugbot Autofix prepared fixes for all 3 issues found in the latest run.
- ✅ Fixed: Staging fails without gen-fixture
- findGenFixture now resolves Windows .exe artifacts and uses where/which cross-platform, and missing synthetic-mvp is a warning instead of exit(1) so dev/build no longer abort without gen-fixture.
- ✅ Fixed: Dropzone CSS overrides gallery cards
- Scoped file-picker styles from #dropzone button to #pick-file so demo-card gallery buttons no longer inherit Choose-file button layout.
- ✅ Fixed: Catalog changes skip viewer deploy
- Added docs/viewer-demos.json to deploy-viewer.yml path filters so catalog-only changes trigger rebuild and redeploy.
Or push these changes by commenting:
@cursor push b7acfc43b9
Preview (b7acfc43b9)
diff --git a/.github/workflows/deploy-viewer.yml b/.github/workflows/deploy-viewer.yml
--- a/.github/workflows/deploy-viewer.yml
+++ b/.github/workflows/deploy-viewer.yml
@@ -11,6 +11,7 @@
paths:
- 'src/**'
- 'viewer/**'
+ - 'docs/viewer-demos.json'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/deploy-viewer.yml'
@@ -19,6 +20,7 @@
paths:
- 'src/**'
- 'viewer/**'
+ - 'docs/viewer-demos.json'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/deploy-viewer.yml'
diff --git a/viewer/index.html b/viewer/index.html
--- a/viewer/index.html
+++ b/viewer/index.html
@@ -149,7 +149,7 @@
text-align: center;
line-height: 1.5;
}
- #dropzone button {
+ #pick-file {
margin-top: 20px;
padding: 8px 18px;
background: #1a3a5f;
@@ -159,7 +159,7 @@
font-size: 13px;
cursor: pointer;
}
- #dropzone button:hover {
+ #pick-file:hover {
background: #264f7a;
}
#dropzone.hidden {
diff --git a/viewer/scripts/stage-demos.mjs b/viewer/scripts/stage-demos.mjs
--- a/viewer/scripts/stage-demos.mjs
+++ b/viewer/scripts/stage-demos.mjs
@@ -37,19 +37,23 @@
}
function findGenFixture() {
+ const binName = process.platform === 'win32' ? 'gen-fixture.exe' : 'gen-fixture';
const candidates = [
- path.join(repoRoot, 'target', 'release', 'gen-fixture'),
- path.join(repoRoot, 'target', 'debug', 'gen-fixture'),
- 'gen-fixture',
+ path.join(repoRoot, 'target', 'release', binName),
+ path.join(repoRoot, 'target', 'debug', binName),
];
for (const candidate of candidates) {
- if (candidate === 'gen-fixture') {
- const which = spawnSync('which', ['gen-fixture'], { encoding: 'utf8' });
- if (which.status === 0) return which.stdout.trim();
- continue;
- }
if (fs.existsSync(candidate)) return candidate;
}
+ const pathCmd = process.platform === 'win32' ? 'where' : 'which';
+ const onPath = spawnSync(pathCmd, ['gen-fixture'], {
+ encoding: 'utf8',
+ shell: process.platform === 'win32',
+ });
+ if (onPath.status === 0) {
+ const first = onPath.stdout.trim().split(/\r?\n/)[0];
+ if (first) return first;
+ }
return null;
}
@@ -220,10 +224,10 @@
console.warn(` warning: ${warning}`);
}
- // Synthetic MVP is required for local Playwright MVP workflow coverage.
if (!staged.find((d) => d.id === 'synthetic-mvp')?.available) {
- console.error('synthetic-mvp demo is required but was not staged');
- process.exit(1);
+ console.warn(
+ 'warning: synthetic-mvp demo was not staged (build gen-fixture for Playwright MVP coverage)',
+ );
}
}You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7d13f63. Configure here.
| // Synthetic MVP is required for local Playwright MVP workflow coverage. | ||
| if (!staged.find((d) => d.id === 'synthetic-mvp')?.available) { | ||
| console.error('synthetic-mvp demo is required but was not staged'); | ||
| process.exit(1); |
There was a problem hiding this comment.
Staging fails without gen-fixture
Medium Severity
predev and prebuild always run stage:demos, which exits if synthetic-mvp is missing. findGenFixture only looks for an extensionless gen-fixture binary, so a clean viewer build following the documented wasm-pack + npm path fails, and Windows hosts miss gen-fixture.exe even after a successful cargo build.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 7d13f63. Configure here.
| .demo-card:disabled { | ||
| opacity: 0.55; | ||
| cursor: not-allowed; | ||
| } |
There was a problem hiding this comment.
Dropzone CSS overrides gallery cards
Medium Severity
Loadable gallery entries are <button class="demo-card"> inside #dropzone, so the older #dropzone button rule wins over .demo-card. Those cards pick up the Choose-file padding, solid background, hover, pointer cursor, and 20px top margin, while IFC download cards (<a>) keep the intended layout.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7d13f63. Configure here.
| run: | | ||
| # gen-fixture is built with the WASM crate above via cargo; ensure release bin exists | ||
| cargo build --release --bin gen-fixture | ||
| npm run stage:demos |
There was a problem hiding this comment.
Catalog changes skip viewer deploy
Low Severity
The new staging step reads docs/viewer-demos.json as the gallery source of truth, but the workflow paths filters still omit that file. A catalog-only change on main does not rebuild or redeploy the viewer, so license, provenance, and demo entries can stay stale in production.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7d13f63. Configure here.
Scaffold exports may expose a scene-graph index without entities[] rows. Fall back to tree node fields so the MVP inspect path stays honest, and assert Scaffold quality in the demo-gallery Playwright flow. Co-authored-by: DrunkOnJava <[email protected]>
Bump lockfile resolutions (vite 8.2.2, nanoid 3.3.18, postcss 8.5.26) so the viewer dependency audit is clean. No package.json range change required; cargo/pyo3 advisories remain with the shared deps PR. Co-authored-by: DrunkOnJava <[email protected]>
Bump anyhow (≥1.0.103), crossbeam-epoch (≥0.9.20), quick-xml 0.41, and pyo3 0.29 to clear RUSTSEC advisories that were failing cargo audit/deny across finish-line PRs. Adapt PartAtom parsing for quick-xml 0.38+ GeneralRef entity streaming. Run npm audit fix in viewer/ (nanoid, postcss, vite 8.x patch) so high-severity npm audit passes without a Vite major bump. Co-authored-by: DrunkOnJava <[email protected]>
Bring shared Rust cargo audit/deny fixes and aligned viewer npm lockfile bumps onto the M11 workflow branch so PR #115 clears advisory CI. Co-authored-by: DrunkOnJava <[email protected]>
## Summary Clears the shared cargo-audit / cargo-deny / viewer npm-audit failures that have been failing unrelated finish-line PRs (#114–#117) on the same advisories. **After this merges, #115 / #116 / #117 (and related finish-line branches) should rebase onto `main`** so they pick up the lockfile fixes without each re-fighting the same CI jobs. ### Rust (`Cargo.lock` / `Cargo.toml` / `rvt-py`) | Crate | From → To | Advisory | |---|---|---| | `anyhow` | 1.0.102 → 1.0.104 | RUSTSEC-2026-0190 | | `crossbeam-epoch` | 0.9.18 → 0.9.20 | RUSTSEC-2026-0204 | | `quick-xml` | 0.36.2 → 0.41.0 | RUSTSEC-2026-0194 / 0195 | | `pyo3` | 0.24.2 → 0.29.2 | RUSTSEC-2026-0176 / 0177 | `PartAtom` parsing adapted for quick-xml ≥0.38 (`Event::GeneralRef` entity streaming; no ignore/pin). ### Viewer npm `npm audit fix` in `viewer/` (stayed on Vite 8.x): - `vite` 8.0.9 → 8.2.2 - `postcss` → 8.5.26 - `nanoid` → 3.3.18 ## Test plan - [x] `cargo check --workspace` - [x] `cargo audit` clean - [x] `cargo deny check advisories` ok - [x] `cargo test --lib part_atom` (8 passed) - [x] `cd viewer && npm audit --audit-level=high` → 0 vulnerabilities - [ ] CI green on this PR No product / ArcWall / viewer feature work included. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > PartAtom parsing behavior changed to match a new XML event model; incorrect entity/whitespace handling could misread family metadata, while pyo3 upgrades affect the Python wheel ABI surface. > > **Overview** > Bumps Rust and viewer dependencies to clear **cargo-audit**, **cargo-deny**, and **npm audit** failures that were blocking unrelated PRs, with a targeted parser fix for the **quick-xml** major-line upgrade. > > **Rust:** `quick-xml` **0.36 → 0.41**, `pyo3` **0.24 → 0.29** (`rvt-py`), plus transitive fixes (`anyhow`, `crossbeam-epoch`). **`PartAtom::from_bytes`** in `part_atom.rs` is updated for quick-xml ≥0.38: entities stream as **`Event::GeneralRef`** instead of inline expansion, text is accumulated in **`pending`** and flushed on end tags (replacing **`trim_text`** + **`BytesText::unescape`**), and category **`scheme`** attributes use **`normalized_value`**. > > **Viewer:** `viewer/package-lock.json` from **`npm audit fix`** (e.g. **vite** 8.0.9 → 8.2.2, **rolldown** 1.2.6, **postcss** / **nanoid** bumps)—dev tooling only, no app feature changes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e312d79. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary Bundle 1 from the safety/merge audit: 1. **Restore the three #115 Bugbot fixes** from `b7acfc4` that never landed on `main` (Windows `gen-fixture.exe` / soft-fail staging, `#pick-file` CSS scoping, deploy path filter for `docs/viewer-demos.json`). 2. **Discussion #112 checksum pages:** add `strip_revit_page_checksums` + probes + report. **Do not** enable strip on the default inflate path — naive 0-aligned strip *regresses* `Formats/Latest` `class_names` on redistributable corpus files. 3. **Merge governance ADR-005** + proposed ruleset JSON (require PR + conversation resolution, **0** required approvals, admin bypass). Automation token got HTTP 403 updating the live ruleset / posting the discussion reply — drafts are in-repo for apply/paste. ## Test plan - [x] `cargo test --lib compression::` - [x] Corpus probe: Einhoven / 2024 Core Interior `Formats/Latest` raw vs stripped inflate + schema metrics - [ ] CI green on this PR - [ ] Maintainer: paste `reports/security/DISC-112-maintainer-reply.md` into Discussion #112 - [ ] Maintainer: `gh api --method PUT repos/DrunkOnJava/rvt-rs/rulesets/15270879 --input .github/rulesets/main-protection.proposed.json` Refs Discussion #112. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-a70d16be-daba-4407-abe4-8873e44d44c9?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-a70d16be-daba-4407-abe4-8873e44d44c9&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
## Summary Clears the shared cargo-audit / cargo-deny / viewer npm-audit failures that have been failing unrelated finish-line PRs (#114–#117) on the same advisories. **After this merges, #115 / #116 / #117 (and related finish-line branches) should rebase onto `main`** so they pick up the lockfile fixes without each re-fighting the same CI jobs. ### Rust (`Cargo.lock` / `Cargo.toml` / `rvt-py`) | Crate | From → To | Advisory | |---|---|---| | `anyhow` | 1.0.102 → 1.0.104 | RUSTSEC-2026-0190 | | `crossbeam-epoch` | 0.9.18 → 0.9.20 | RUSTSEC-2026-0204 | | `quick-xml` | 0.36.2 → 0.41.0 | RUSTSEC-2026-0194 / 0195 | | `pyo3` | 0.24.2 → 0.29.2 | RUSTSEC-2026-0176 / 0177 | `PartAtom` parsing adapted for quick-xml ≥0.38 (`Event::GeneralRef` entity streaming; no ignore/pin). ### Viewer npm `npm audit fix` in `viewer/` (stayed on Vite 8.x): - `vite` 8.0.9 → 8.2.2 - `postcss` → 8.5.26 - `nanoid` → 3.3.18 ## Test plan - [x] `cargo check --workspace` - [x] `cargo audit` clean - [x] `cargo deny check advisories` ok - [x] `cargo test --lib part_atom` (8 passed) - [x] `cd viewer && npm audit --audit-level=high` → 0 vulnerabilities - [ ] CI green on this PR No product / ArcWall / viewer feature work included. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > PartAtom parsing behavior changed to match a new XML event model; incorrect entity/whitespace handling could misread family metadata, while pyo3 upgrades affect the Python wheel ABI surface. > > **Overview** > Bumps Rust and viewer dependencies to clear **cargo-audit**, **cargo-deny**, and **npm audit** failures that were blocking unrelated PRs, with a targeted parser fix for the **quick-xml** major-line upgrade. > > **Rust:** `quick-xml` **0.36 → 0.41**, `pyo3` **0.24 → 0.29** (`rvt-py`), plus transitive fixes (`anyhow`, `crossbeam-epoch`). **`PartAtom::from_bytes`** in `part_atom.rs` is updated for quick-xml ≥0.38: entities stream as **`Event::GeneralRef`** instead of inline expansion, text is accumulated in **`pending`** and flushed on end tags (replacing **`trim_text`** + **`BytesText::unescape`**), and category **`scheme`** attributes use **`normalized_value`**. > > **Viewer:** `viewer/package-lock.json` from **`npm audit fix`** (e.g. **vite** 8.0.9 → 8.2.2, **rolldown** 1.2.6, **postcss** / **nanoid** bumps)—dev tooling only, no app feature changes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d4e146a035a291fb82a75f45f5e4e01b788008d2. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary Bundle 1 from the safety/merge audit: 1. **Restore the three #115 Bugbot fixes** from `b7acfc4` that never landed on `main` (Windows `gen-fixture.exe` / soft-fail staging, `#pick-file` CSS scoping, deploy path filter for `docs/viewer-demos.json`). 2. **Discussion #112 checksum pages:** add `strip_revit_page_checksums` + probes + report. **Do not** enable strip on the default inflate path — naive 0-aligned strip *regresses* `Formats/Latest` `class_names` on redistributable corpus files. 3. **Merge governance ADR-005** + proposed ruleset JSON (require PR + conversation resolution, **0** required approvals, admin bypass). Automation token got HTTP 403 updating the live ruleset / posting the discussion reply — drafts are in-repo for apply/paste. ## Test plan - [x] `cargo test --lib compression::` - [x] Corpus probe: Einhoven / 2024 Core Interior `Formats/Latest` raw vs stripped inflate + schema metrics - [ ] CI green on this PR - [ ] Maintainer: paste `reports/security/DISC-112-maintainer-reply.md` into Discussion #112 - [ ] Maintainer: `gh api --method PUT repos/DrunkOnJava/rvt-rs/rulesets/15270879 --input .github/rulesets/main-protection.proposed.json` Refs Discussion #112. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-a70d16be-daba-4407-abe4-8873e44d44c9?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-a70d16be-daba-4407-abe4-8873e44d44c9&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: DrunkOnJava <[email protected]>



Summary
Advances #66 (M11-02) and remaining viewer-beta gaps that are clearly unfinished on the viewer side, without touching the Rust decoder/IFC core.
docs/viewer-demos.jsoninto the viewer dropzone (license/provenance + expected quality labels).viewer/scripts/stage-demos.mjs), including a license-freegen-fixturesynthetic MVP.rvtso Playwright can exercise the workflow without LFS./demos/catalog + optional demo fetch only).docs/status.md/docs/supported-profile.md.cursor/deps-advisory-bump-44c9) socargo deny/cargo auditclear on this PR as well.Motivation
Refs #66.
docs/viewer-demos.jsonexisted but was not referenced fromviewer/src/. M11-02 still needs a documented MVP workflow shell and fixture-backed Playwright coverage while real typed levels/doors/windows remain decoder-blocked.Changes
viewer/src/main.ts+viewer/index.html— demo gallery UI, MVP workflow copy, partial-decode messaging, scaffold inspect fallbackviewer/scripts/stage-demos.mjs— build-time staging fromdocs/viewer-demos.jsondocs/viewer-demos.json— loadable/expected_quality/license/provenance fields + synthetic MVP entryviewer/tests/viewer-regression.spec.ts— gallery + MVP workflow via synthetic demoviewer/tests/no-network.spec.ts— allow same-origin/demos/static assets; fall back to staged synthetic sample.github/workflows/deploy-viewer.yml— stage demos (incl.gen-fixture) before Playwrightviewer/package-lock.json— advisory bump vianpm audit fixCargo.lock/Cargo.toml/rvt-py/Cargo.toml/src/part_atom.rsadvisory fixesStill depends on decoder work
.rvtprojectsTesting
npm run typecheckinviewer/npm run buildinviewer/(includesstage:demos)npm run test:browser— gallery + MVP workflow + no-network (project sample when corpus present)npm auditinviewer/— 0 vulnerabilitiescargo deny check— advisories/bans/licenses/sources ok (after merge with fix(deps): clear shared CI advisories blocking finish-line PRs #118)cargo audit— clean (after merge with fix(deps): clear shared CI advisories blocking finish-line PRs #118)cargo test --all— not re-run for this merge; deps PR owns Rust advisory surfaceCI note
Merged
origin/cursor/deps-advisory-bump-44c9(#118) into this branch via merge commit94965ec(no force-push). Viewer M11 feature work retained; shared Cargo advisory bumps now included so cargo deny/audit should go green with the viewer npm audit already fixed.Audit-honesty checklist
Breaking changes
None.
Related issues
Refs #66 (M11-02). Also covers M6-03 gallery wiring / M6-04 demo-path Playwright items from
TODO.md. Depends on / includes #118 advisory bumps.