Skip to content

MID-11082 Avoid retaining LensContext in preview page#660

Open
kay1313 wants to merge 1 commit into
masterfrom
fix/MID-11082
Open

MID-11082 Avoid retaining LensContext in preview page#660
kay1313 wants to merge 1 commit into
masterfrom
fix/MID-11082

Conversation

@kay1313
Copy link
Copy Markdown
Contributor

@kay1313 kay1313 commented May 21, 2026

Summary

Fixes MID-11082 by avoiding retention of live ModelContext / LensContext instances in the focus preview changes page.

PageFocusPreviewChanges previously passed live model contexts into PreviewChangesTabPanel. In some policy-rule preview flows, these contexts contain evaluated assignment state with assignment path variables, including MagicAssignment / Holder objects that are not suitable for Wicket serialization.

The preview page now extracts the data needed by the UI into serializable preview DTOs before rendering, and the tab panels keep only this preview data.

Changes

  • Convert preview ModelContext data to serializable PreviewData.
  • Stop passing Model.of(modelContext) into PreviewChangesTabPanel.
  • Make PreviewChangesTabPanel use DTO/list state instead of live model context.
  • Use precomputed preview data for policy violations, approvals, visualizations, and production-mode checks.
  • Add a regression test for the MID-11082 serialization scenario.

Preview changes kept live ModelContext instances in Wicket page state.
In some flows, these contexts include policy rule evaluation state with
MagicAssignment/Holder objects that Wicket cannot serialize.

Extract preview UI data before rendering and keep only serializable DTO
state in the page and tab panels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant