-
Notifications
You must be signed in to change notification settings - Fork 0
Schema refresh should include a preview phase before applying changes #421
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestuser experienceConcerning new interfaces or experiences for JIM usersConcerning new interfaces or experiences for JIM users
Milestone
Description
Problem
When clicking Refresh Schema on a connected system, JIM immediately retrieves the new schema from the connected system, diffs it against the existing schema, persists all changes to the database, and cascades deletions — all in a single click with no opportunity to preview.
This means if object types or attributes have been removed at the connected system (or the connector identity lacks permissions to see them), JIM will immediately:
- Remove those object types and attributes from its schema
- Cascade-delete sync rules, attribute flow mappings, attribute values, and potentially entire objects
The current warning message is accurate but jarring — it frontloads a worst-case data-loss scenario on a page that is also used for the benign first-time schema retrieval.
Current Behaviour
- User clicks Refresh Schema
- JIM connects to the external system and retrieves the schema
- JIM merges the new schema with the existing one (in
ConnectedSystemServer.ImportConnectedSystemSchemaAsync) - Changes are immediately persisted via
PersistConnectedSystemUpdateAsync - A summary of what changed is shown after the fact
Proposed Behaviour
Introduce a preview phase between retrieval and persistence:
- User clicks Refresh Schema
- JIM retrieves the new schema from the connected system
- JIM computes the diff (added/removed/updated object types and attributes) without persisting
- A preview panel is displayed showing:
- New object types and attributes that will be added
- Object types and attributes that will be removed (highlighted as destructive)
- Consequences of removals clearly explained (e.g. "3 sync rules reference these attributes and will lose their mappings", "12 connected system objects of this type will be deleted")
- Unchanged items (collapsed/summary)
- The user can make an informed decision and clicks Apply Changes to commit the new schema, or Cancel to discard
- Only on confirmation are changes saved to the database
Additional Improvements
- First-time retrieval (no existing schema): Could skip the preview phase or show a simpler confirmation, since there's nothing to lose
- Soften the warning tone: The current alert makes the page feel dangerous even for routine operations. Move the data-loss warning to the preview/confirmation step where it's contextually relevant
- The schema refresh result summary (
SchemaRefreshResult) already tracks adds/removes/updates — this data just needs to be shown before persisting rather than after
References
ConnectedSystemServer.ImportConnectedSystemSchemaAsyncin ConnectedSystemServer.csConnectedSystemSchemaTab.razorin ConnectedSystemSchemaTab.razorSchemaRefreshResultDTO already contains the diff data needed for the preview UI
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestuser experienceConcerning new interfaces or experiences for JIM usersConcerning new interfaces or experiences for JIM users