Enhanced Events Launcher Location loading and instructions.

Implemented explicit 'enabled' and 'hidden' parameter support in the Event data layer ('load_ae_obj_id__event').

Updated the Events Launcher layout and background sync engine to proactively fetch all enabled locations (including hidden ones), ensuring the room select list is complete and stays updated.

Refined 'launcher_file_cont.svelte' to only display native-specific file opening instructions when 'app_mode' is 'native'.

Updated AGENT_TODO.md to reflect task completion and new priorities.
This commit is contained in:
Scott Idem
2026-02-19 17:54:21 -05:00
parent 0a689be25d
commit e2e120456e
5 changed files with 37 additions and 10 deletions

View File

@@ -8,10 +8,12 @@
- [ ] **Step 3:** Implement formal error boundaries for 403/401 API responses to provide user-friendly "Session Expired" or "Access Denied" UI. - [ ] **Step 3:** Implement formal error boundaries for 403/401 API responses to provide user-friendly "Session Expired" or "Access Denied" UI.
## 🚧 Upcoming High Priority ## 🚧 Upcoming High Priority
- **Events Launcher:** Investigate why not all Event Locations are showing in the select options list. Modify event loading to include the full location list.
- **CRUD v2 Refactor:** Finalize retirement of `Element_ae_crud_v2.svelte` in favor of V3 Editor. - **CRUD v2 Refactor:** Finalize retirement of `Element_ae_crud_v2.svelte` in favor of V3 Editor.
- **Temp Cleanup:** Auto-removal of native `.tmp` files older than 24h. - **Temp Cleanup:** Auto-removal of native `.tmp` files older than 24h.
## ✅ Completed Recently ## ✅ Completed Recently
- [x] **[API]** **Event File V3 Mapping:** Implemented `inc_hosted_file` support and mapped prefixed backend fields (`hosted_file_hash_sha256`, etc.) to flat properties.
- [x] **[UI]** **Badge Rendering Fix:** Refactored `badge_template` lookup to use V3 Triple ID pattern. - [x] **[UI]** **Badge Rendering Fix:** Refactored `badge_template` lookup to use V3 Triple ID pattern.
- [x] **[API]** **event_session Search Fix:** Resolved 400 error (`Unauthorized search field 'account_id'`) via backend update. - [x] **[API]** **event_session Search Fix:** Resolved 400 error (`Unauthorized search field 'account_id'`) via backend update.
- [x] **[Security]** Purged redundant `x-aether-api-token` from frontend and notified backend. - [x] **[Security]** Purged redundant `x-aether-api-token` from frontend and notified backend.

View File

@@ -24,6 +24,8 @@ export async function load_ae_obj_id__event({
inc_location_li = false, inc_location_li = false,
inc_session_li = false, inc_session_li = false,
inc_template_li = false, inc_template_li = false,
enabled = 'enabled',
hidden = 'not_hidden',
try_cache = true, try_cache = true,
log_lvl = 0 log_lvl = 0
}: { }: {
@@ -35,6 +37,8 @@ export async function load_ae_obj_id__event({
inc_location_li?: boolean; inc_location_li?: boolean;
inc_session_li?: boolean; inc_session_li?: boolean;
inc_template_li?: boolean; inc_template_li?: boolean;
enabled?: 'enabled' | 'all' | 'not_enabled';
hidden?: 'hidden' | 'all' | 'not_hidden';
try_cache?: boolean; try_cache?: boolean;
log_lvl?: number; log_lvl?: number;
}): Promise<ae_Event | null> { }): Promise<ae_Event | null> {
@@ -53,12 +57,14 @@ export async function load_ae_obj_id__event({
_refresh_event_v3_background({ _refresh_event_v3_background({
api_cfg, event_id, view, try_cache, api_cfg, event_id, view, try_cache,
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
enabled, hidden,
log_lvl: 0 log_lvl: 0
}); });
// Still handle nested loads for the cached version to ensure UI richness // Still handle nested loads for the cached version to ensure UI richness
return await _handle_nested_loads(cached_event, { return await _handle_nested_loads(cached_event, {
api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
enabled, hidden, log_lvl
}); });
} }
} catch (e) { } catch (e) {
@@ -70,6 +76,7 @@ export async function load_ae_obj_id__event({
return await _refresh_event_v3_background({ return await _refresh_event_v3_background({
api_cfg, event_id, view, try_cache, api_cfg, event_id, view, try_cache,
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
enabled, hidden,
log_lvl log_lvl
}); });
} }
@@ -80,6 +87,7 @@ export async function load_ae_obj_id__event({
async function _refresh_event_v3_background({ async function _refresh_event_v3_background({
api_cfg, event_id, view, try_cache, api_cfg, event_id, view, try_cache,
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
enabled, hidden,
log_lvl log_lvl
}: any) { }: any) {
// Check if offline // Check if offline
@@ -115,7 +123,8 @@ async function _refresh_event_v3_background({
} }
return await _handle_nested_loads(processed_obj, { return await _handle_nested_loads(processed_obj, {
api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li,
enabled, hidden, log_lvl
}); });
} }
} catch (error: any) { } catch (error: any) {
@@ -127,7 +136,7 @@ async function _refresh_event_v3_background({
/** /**
* Shared logic for loading nested child collections * Shared logic for loading nested child collections
*/ */
async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl }: any) { async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, enabled, hidden, log_lvl }: any) {
if (log_lvl) console.log(`Loading nested collections for event: ${event_obj.event_id} (Devices: ${inc_device_li}, Files: ${inc_file_li}, Locations: ${inc_location_li}, Sessions: ${inc_session_li}, Templates: ${inc_template_li})`); if (log_lvl) console.log(`Loading nested collections for event: ${event_obj.event_id} (Devices: ${inc_device_li}, Files: ${inc_file_li}, Locations: ${inc_location_li}, Sessions: ${inc_session_li}, Templates: ${inc_template_li})`);
// String-Only ID Vision: the '_id' field IS the string ID // String-Only ID Vision: the '_id' field IS the string ID
const current_event_id = event_obj.id || event_obj.event_id; const current_event_id = event_obj.id || event_obj.event_id;
@@ -158,6 +167,8 @@ async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, in
api_cfg, api_cfg,
for_obj_type: 'event', for_obj_type: 'event',
for_obj_id: current_event_id, for_obj_id: current_event_id,
enabled,
hidden,
log_lvl log_lvl
}).then(res => event_obj.event_location_obj_li = res)); }).then(res => event_obj.event_location_obj_li = res));
} }

View File

@@ -1,11 +1,11 @@
/** @type {import('./$types').LayoutLoad} */ /** @type {import('./$types').LayoutLoad} */
console.log(`Events - [event_id] launcher +layout.ts start`); console.log(`Events - [event_id] launcher +layout.ts start`);
import { error } from '@sveltejs/kit'; // import { error } from '@sveltejs/kit';
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import { events_func } from '$lib/ae_events_functions'; import { events_func } from '$lib/ae_events_functions';
export async function load({ params, parent, url }) { export async function load({ params, parent }) {
// route // route
const log_lvl: number = 0; const log_lvl: number = 0;
@@ -53,6 +53,15 @@ export async function load({ params, parent, url }) {
for_obj_id: event_id, for_obj_id: event_id,
log_lvl: 0 log_lvl: 0
}); });
events_func.load_ae_obj_li__event_location({
api_cfg: ae_acct.api,
for_obj_type: 'event',
for_obj_id: event_id,
enabled: 'enabled',
hidden: 'all',
log_lvl: 0
});
} }
return data; return data;

View File

@@ -121,6 +121,9 @@
await events_func.load_ae_obj_id__event({ await events_func.load_ae_obj_id__event({
api_cfg: $ae_api, api_cfg: $ae_api,
event_id: $events_slct.event_id, event_id: $events_slct.event_id,
inc_location_li: true,
enabled: 'enabled',
hidden: 'all',
try_cache: true, try_cache: true,
log_lvl: 0 log_lvl: 0
}); });

View File

@@ -244,11 +244,13 @@
'Please wait while this file downloads...'} ***</strong 'Please wait while this file downloads...'} ***</strong
> >
</div> </div>
<p>Most files will automatically be opened full screen.</p> {#if $ae_loc.is_native && $events_loc.launcher.app_mode === 'native'}
<p> <p>Most files will automatically be opened full screen.</p>
PowerPoint or KeyNote will attempt to display in presenter view. <p>
</p> PowerPoint or KeyNote will attempt to display in presenter view.
<p>Please close the file when finished.</p> </p>
<p>Please close the file when finished.</p>
{/if}
</div> </div>
{/if} {/if}