fix(events): event location file load on mount + launcher pruning scope fix + remove legacy launcher btn

- Location page now calls load_ae_obj_li__event_file on mount so files
  appear immediately without requiring a manual Refresh press.
- _load_event_location_sub_data (Launcher 60s sync) now uses hidden='all'
  with default limit (100) instead of hidden='not_hidden'/limit=25, which
  was pruning valid Dexie records when Pres Mgmt and Launcher were both
  open on the same location simultaneously.
- Removed the legacy launcher button (Send icon, /event/ path) from the
  Locations list; removed unused Send icon import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-05-27 21:41:32 -04:00
parent e7620a1c06
commit cfaf687717
3 changed files with 18 additions and 11 deletions

View File

@@ -357,7 +357,7 @@ async function _handle_nested_loads(
for_obj_type: 'event_location', for_obj_type: 'event_location',
for_obj_id: current_location_id, for_obj_id: current_location_id,
enabled: 'all', enabled: 'all',
limit: 25, hidden: 'all',
log_lvl log_lvl
}).then((res) => (location_obj.event_file_li = res)) }).then((res) => (location_obj.event_file_li = res))
); );

View File

@@ -29,6 +29,7 @@ import {
events_trigger, events_trigger,
events_trig_kv events_trig_kv
} from '$lib/stores/ae_events_stores'; } from '$lib/stores/ae_events_stores';
import { events_func } from '$lib/ae_events/ae_events_functions';
import Comp_event_files_upload from '../../../../ae_comp__event_files_upload.svelte'; import Comp_event_files_upload from '../../../../ae_comp__event_files_upload.svelte';
import Comp_event_session_obj_li from '../../../../ae_comp__event_session_obj_li.svelte'; import Comp_event_session_obj_li from '../../../../ae_comp__event_session_obj_li.svelte';
@@ -64,6 +65,21 @@ $effect(() => {
}); });
}); });
// WHY: Dexie starts empty on first load — liveQuery returns nothing until files are fetched.
// The upload component and refresh button are targeted, but nothing triggers the initial load.
$effect(() => {
const location_id = ae_acct?.slct?.event_location_id;
if (!location_id || !$ae_api) return;
events_func.load_ae_obj_li__event_file({
api_cfg: $ae_api,
for_obj_type: 'event_location',
for_obj_id: location_id,
enabled: 'all',
hidden: 'all',
try_cache: true
});
});
let lq__event_obj = $derived( let lq__event_obj = $derived(
liveQuery(async () => { liveQuery(async () => {
if (!ae_acct?.slct.event_id) return null; if (!ae_acct?.slct.event_id) return null;

View File

@@ -49,7 +49,6 @@ import {
MapPinned, MapPinned,
Plane, Plane,
Plus, Plus,
Send,
TriangleAlert TriangleAlert
} from '@lucide/svelte'; } from '@lucide/svelte';
// if (log_lvl) { // if (log_lvl) {
@@ -187,15 +186,7 @@ if (!pres_mgmt_loc.current.location_kv) {
<span class="hidden">View</span> <span class="hidden">View</span>
</a> </a>
<a <a
href="/event/{event_location_obj?.event_id}/launcher/{event_location_obj?.event_location_id}"
class="btn btn-sm preset-tonal-secondary hover:preset-filled-secondary-500 text-xs transition-all hover:transition-all *:hover:inline"
title="The legacy launcher that not actively being developed. Use with the native launcher for oral sessions.">
<Send size="1em" class="m-1" />
<span class="hidden">Launcher</span>
</a>
<a
href="/events/{event_location_obj?.event_id}/launcher/{event_location_obj?.event_location_id}" href="/events/{event_location_obj?.event_id}/launcher/{event_location_obj?.event_location_id}"
class="btn btn-sm preset-tonal-tertiary border-tertiary-500 hover:preset-filled-secondary-500 border text-xs transition-all hover:transition-all *:hover:inline" class="btn btn-sm preset-tonal-tertiary border-tertiary-500 hover:preset-filled-secondary-500 border text-xs transition-all hover:transition-all *:hover:inline"
title="The new launcher that is actively being developed. Do not use with the native launcher."> title="The new launcher that is actively being developed. Do not use with the native launcher.">