I am in the process of upgrading my application to A12 2025.06 ext2. During the upgrade, I discovered an incorrect calculating behavior of sidebar related to the Application Frame View. Below are the steps to reproduce and an explanation:
- Start the app (initial route loads Dashboard which uses MasterDetailLayout).
- Navigate to the Candidate screen (this uses SidebarLayout).
- Click a candidate row to open the details — a MasterDetailLayout opens to show the form
- Observe the layout: in the previous version the left sidebar shrinks to ~30% of the viewport (the table scrolls horizontally) and the right side reserved for the form.
- In the current version the sidebar keeps the full SidebarLayout width (the overview table width), breaking the form UI
Observed behavior
- Sidebar retains its full SidebarLayout width when navigating from Dashboard → Candidate → Candidate details. The form area does not get the expected remaining space and is visually broken.
Expected behavior
- When a details MasterDetailLayout opens, the sidebar should be reduced (previously ~30% of the viewport) and the remaining width used by the form (table should overflow-scroll).
Investigation / root cause hypothesis
- The layout calculation lives in
@com.mgmtp.a12.widgets/widgets-core/src/layout/application-frame/main/application-frame.view.tsand usesuseSideBarExpandedWidth.
-
I found a
useEffectthat depends onsidebarRef(a ref object). Because refs are mutable (ref.current changes do not trigger effect re-runs), React does not reliably re-run that effect when the DOM element is later assigned tosidebarRef.current. -
When the app first loads on Dashboard,
sidebarRefis null so the effect runs once withexpandedMinimizedWidth = "" (empty). Later, when navigating to Candidate, therefis populated but the effect does not run again, sogetSidebarWidth()uses the wrongexpandedMinimizedWidthand returns an incorrect calculation. -
If I reload the page while on Candidate,
ref.currentis populated on first render and the calculation is correct — which explains the inconsistent behavior.Please verify whether you consider this a bug







