-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Issue identified by @ZhangHanDong:
This issue was likely introduced when merging the main branch, which included a makepad version update.
Root cause: persisted open_rooms/dock_items store a LiveId generated by an “old build” (older makepad commit or toolchain). In the new version, LiveId::from_str(room_id) computes a different value, so contains/select fails and the room is treated as “not open,” creating it again. Likely due to cross‑version hash drift.
The 64‑bit value of LiveId::from_str depends on makepad’s implementation (and possibly compiler/stdlib hash seeds). After upgrading makepad or the toolchain, the hash algorithm/seed changed. Persisted data contains “old hash values,” while the new runtime recomputes with the “new hash,” lookup fails, and duplicate tabs are created.
I’ve added find_open_room_live_id to reverse‑lookup the real LiveId from room_id, preventing duplicate creation at runtime.
A more thorough fix: use room_id as the persistence key and derive LiveId at runtime, eliminating cross‑version hash drift.