fix(server): extract IfcRelAssignsToGroup(ByFactor)/Nests/ConnectsPathElements
Summary
apps/server/src/services/data_model/relationships.rs's extract_relationships only extracted 9 IfcRel* types; the TS/WASM path (packages/parser/src/columnar-parser-indexes.ts) resolves ~19. This adds the 4 of the 10 missing types with confirmed live consumer chains:
IFCRELASSIGNSTOGROUP/IFCRELASSIGNSTOGROUPBYFACTOR: viewer Groups panel, "By Zone" lens, IDSpartOf.IFCRELNESTS:packages/ids/src/bridge/data-accessor.tsmaps it onto the same edge bucket asIfcRelAggregatesfor IDSpartOf.IFCRELCONNECTSPATHELEMENTS: Properties panel's "connected walls" (extractRelationshipsOnDemand).
Left out (no consumer found beyond generic cache/export/query/DuckDB plumbing and parser-level tests): IFCRELASSIGNSTOPRODUCT, IFCRELCONNECTSELEMENTS, IFCRELCONNECTSPORTTOELEMENT, IFCRELCONNECTSPORTS, IFCRELSPACEBOUNDARY, IFCRELREFERENCEDINSPATIALSTRUCTURE.
Edge orientation was verified per added type against the TS extractRelFast byte-level scanner, not assumed — AssignsToGroup(ByFactor) reads RelatingGroup at attr 6, ConnectsPathElements reads both ends as single refs at attrs 5/6, Nests shares the existing default (4,5) arm used for Aggregates.
Closes #3964
Test plan
- RED: new tests failed (
[]) before the fix - GREEN:
cargo test -p ifc-lite-server— 274 passed, 0 failed - Mutation: removing
IFCRELNESTSfrom the type list failsextracts_nests_relationship_orientation - Mutation: flipping
ConnectsPathElementsorientation failsextracts_connects_path_elements_relationship_orientation - Control: all 9 pre-existing relationship types unaffected (same ids/orientation)
- Control: a fixture with none of the new types produces the same output as before
-
cargo clippy -p ifc-lite-server -- -D warningsclean -
node scripts/check-test-wiring.mjs/check-source-text-assertions.mjsclean -
node scripts/check-module-size.mjs— only the pre-existingCommandPalette.tsxoffender (fixed in #3958), no new offender - Browser/WASM path untouched (no
packages/*changes, no changeset needed)
https://claude.ai/code/session_01QPHChk3Ve9N519A4kY7436
Summary by CodeRabbit
-
New Features
- Improved relationship data extraction for additional grouping, nesting, and connected path elements.
- Relationship links now preserve the correct relating and related element orientation.
-
Bug Fixes
- Previously unrecognized relationship types are now included in extracted model data.
- Added validation to ensure models without these relationships continue to produce no incorrect results.