fix(launcher): resolve hydration errors and missing file counts
- Initialized event_session_id to null in store template to prevent Svelte 5 binding errors.\n- Fixed invalid bind expressions in Launcher layout.\n- Corrected view: alt propagation in session list background refresh to ensure file counts are retrieved.\n- Hardened duplicate launch protection with verify_hash enabled by default.\n- Updated SVELTE_DEXIE_GUIDE.md with binding pitfall documentation.
This commit is contained in:
@@ -196,7 +196,12 @@ export async function load_ae_obj_li__event_session({
|
||||
if (log_lvl) console.log(`✅ [Trace] load_ae_obj_li: CACHE HIT at ${elapsed}ms (${cached_li.length} items).`);
|
||||
|
||||
// Background refresh (non-blocking)
|
||||
_refresh_session_li_background({ api_cfg, for_obj_type, for_obj_id, inc_file_li, inc_all_file_li, inc_presentation_li, inc_presenter_li, enabled, hidden, limit, offset, order_by_li, try_cache, log_lvl: log_lvl > 1 ? log_lvl : 0 });
|
||||
_refresh_session_li_background({
|
||||
api_cfg, for_obj_type, for_obj_id, view,
|
||||
inc_file_li, inc_all_file_li, inc_presentation_li, inc_presenter_li,
|
||||
enabled, hidden, limit, offset, order_by_li, try_cache,
|
||||
log_lvl: log_lvl > 1 ? log_lvl : 0
|
||||
});
|
||||
|
||||
return cached_li;
|
||||
} else if (log_lvl) {
|
||||
@@ -207,15 +212,15 @@ export async function load_ae_obj_li__event_session({
|
||||
}
|
||||
}
|
||||
|
||||
return await _refresh_session_li_background({ api_cfg, for_obj_type, for_obj_id, inc_file_li, inc_all_file_li, inc_presentation_li, inc_presenter_li, enabled, hidden, limit, offset, order_by_li, try_cache, log_lvl });
|
||||
return await _refresh_session_li_background({ api_cfg, for_obj_type, for_obj_id, view, inc_file_li, inc_all_file_li, inc_presentation_li, inc_presenter_li, enabled, hidden, limit, offset, order_by_li, try_cache, log_lvl });
|
||||
}
|
||||
|
||||
async function _refresh_session_li_background({ api_cfg, for_obj_type, for_obj_id, inc_file_li, inc_all_file_li, inc_presentation_li, inc_presenter_li, enabled, hidden, limit, offset, order_by_li, try_cache, log_lvl }: any) {
|
||||
async function _refresh_session_li_background({ api_cfg, for_obj_type, for_obj_id, view, inc_file_li, inc_all_file_li, inc_presentation_li, inc_presenter_li, enabled, hidden, limit, offset, order_by_li, try_cache, log_lvl }: any) {
|
||||
const start_time = performance.now();
|
||||
if (typeof navigator !== 'undefined' && !navigator.onLine) return [];
|
||||
try {
|
||||
if (log_lvl) console.log(`📡 [Trace] _refresh_session_li: API Fetching for=${for_obj_type}:${for_obj_id}`);
|
||||
const result_li = await api.get_ae_obj_li_v3({ api_cfg, obj_type: 'event_session', for_obj_type, for_obj_id, enabled, hidden, limit, offset, order_by_li, log_lvl });
|
||||
if (log_lvl) console.log(`📡 [Trace] _refresh_session_li: API Fetching for=${for_obj_type}:${for_obj_id} (view=${view})`);
|
||||
const result_li = await api.get_ae_obj_li_v3({ api_cfg, obj_type: 'event_session', for_obj_type, for_obj_id, view, enabled, hidden, limit, offset, order_by_li, log_lvl });
|
||||
|
||||
if (result_li) {
|
||||
const processed = await process_ae_obj__event_session_props({ obj_li: result_li, log_lvl });
|
||||
|
||||
@@ -667,6 +667,7 @@ const events_slct_obj_template: key_val = {
|
||||
event_presenter_obj: {},
|
||||
|
||||
session_id: null,
|
||||
event_session_id: null,
|
||||
session_obj: {},
|
||||
session_obj_li: [],
|
||||
event_session_obj: {},
|
||||
|
||||
Reference in New Issue
Block a user