Skip to content

1719: Fix imported field-name collisions across views - #1805

Open
glstott wants to merge 2 commits into
CDCgov:devfrom
glstott:1719-field_collisions
Open

glstott wants to merge 2 commits into
CDCgov:devfrom
glstott:1719-field_collisions

Conversation

@glstott

@glstott glstott commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prevent imported metadata from overwriting MicrobeTrace’s internal node/link properties. This addresses missing or altered values in Map and Table when uploaded columns use names such as _jlat, id, seq, or size.

Fixes #1719

Changes

  • Centralize case-insensitive reserved-field handling for CSV, Excel, and tabular JSON node/link imports.
  • Preserve conflicting metadata under reusable (Imported) aliases, adding numeric suffixes only when necessary.
  • Apply canonical structural values after metadata and avoid duplicating selected ID, sequence, endpoint, and distance columns.
  • Protect coordinates, layout, provenance, styling, sequence metrics, and collapsed-node state.
  • Display exact, HTML-safe field names across Files mapping controls, global settings, view selectors, tables, and tooltips.
  • Distinguish real fields named None from internal “no field” options and other synthetic choices.
  • Safely preserve prototype-sensitive keys, header whitespace, and duplicate CSV headers.
  • Add regression fixtures and coverage, update exact-label expectations, and stabilize shared Cypress dropdown helpers.

Compatibility

Existing sessions remain loadable without migration. New collision aliases persist in saved sessions. Reserved-header remapping applies to tabular node/link imports; network-document importers retain their format-specific handling.

- Protect internal node/link properties during CSV, Excel and JSON imports.
- Preserve conflicting metadata under reusable "(Imported)" aliases while keeping canonical structural values authoritative.
- Display exact field keys throughout selectors, tables, tooltips and views.
- Separate internal options from real fields named None or other sentinel values.
- Safely handle prototype-sensitive keys, header whitespace and duplicate CSV headers.
- Add collision fixtures and unit/end-to-end coverage; update Cypress expectations and stabilize shared dropdown helpers.

Validation:
- 82 focused unit tests and development build passed.
- Cypress: 622 passed, 6 preexisting failures, 5 pending, 14 skipped across 173 specs.
- All six remaining failures reproduced on the baseline revision.

Fixes CDCgov#1719
Preserve collision-safe field selection alongside the Sigma renderer migration, layout changes, and updated link defaults.

Decode composition fields without trimming exact keys or confusing real None metadata with internal options. Resolve the Cytoscape collection type mismatch and adapt collision checks for either renderer.

Validation: 146 focused Angular unit tests passed; development build passed with size-budget warnings. Cypress was not run.

This branch has not been deployed

No deployments
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.

Collision with internal variable names leads to unusual behavior

1 participant