- Ya
- 4 Agosti 2026, 14:15 UTC
- Mwandishi
- kamo
- Ahadi ya
- 761581d
Tool windows lived only in a module-level in-memory store, so any full document load destroyed every open window and everything typed into it. Several internal routes were still reached with window.location.href or a raw <a href="/...">, which is why the loss depended on which page the member moved to. Eliminate the hard navigations, and stop depending on that being true: - /leads passed an onViewLead that hard-navigated, overriding LeadManager's own router.push and making every lead click destructive on the most-used route. - Calendar ReminderPopup (mounted app-wide), the CRM markets dialog, the anchor inside the softphone tool window itself, the pipeline empty-state MUI Button, the AG-Grid order link (stopPropagation without preventDefault), and three raw "Complete DNS setup" anchors now route client-side. - ChatWebSocketProvider swapped element type on the loading→authenticated transition, remounting everything below it — including the dock. The auth gate moves into useChatWebSocket(enabled) so the element type stays stable. Harden so a hard load can no longer be fatal: - toolWindowSnapshot.ts mirrors the window list into per-tab sessionStorage and replays it via the store's public API. Non-serializable props (React element icons, File attachments) are stripped rather than round-tripped into garbage. Restore is member-scoped and refuses a snapshot written by another member. - MessageTool mirrors its draft into window props, so a restored compose window comes back with the text, and names any attachment it could not carry. - Arming the writer is deferred until the restore lands, so the empty startup dock can never overwrite the snapshot it is about to read. Keep it from decaying again — the previous fix was a manual sweep with nothing holding it in place: - **************** fails the Docker build on any new hard navigation to an internal route, with an allowlist for the genuine cross-origin/session-boundary jumps (logout, /validate, OAuth). - eslint no-restricted-syntax flags raw internal anchors in-editor. - 24 tests cover the snapshot round trip, the cross-member refusal, staleness, and restore ordering.