diff --git a/documentation/TODO__Agents.md b/documentation/TODO__Agents.md index ee85d7f6..55cf3ef2 100644 --- a/documentation/TODO__Agents.md +++ b/documentation/TODO__Agents.md @@ -30,20 +30,36 @@ guessing defaults. `copy_from_cache_to_temp` + `run_osascript` / `run_cmd` directly instead of the all-in-one `launch_from_cache`. Finer error handling at each step (verify copy succeeded before attempting script; surface failure clearly in UI). -- [ ] **[Launcher] Error handling + fallback** — when the launch script fails, offer fallback - to `open_local_file_v2` (OS default handler) rather than silently failing. Show error detail - in the launcher file row so staff can diagnose onsite. +- [x] **[Launcher] Error handling + fallback (2026-05-14)** — post-script failure is non-fatal: surfaces `'fallback'` status with error detail (file already open). If `open_cmd` itself fails, falls back to `open_local_file_v2` (OS default); surfaces combined error detail if that also fails. UI renders `'open'` / `'fallback'` / `'error'` states distinctly. - [ ] **[Launcher] Slide control scripts in Svelte config** — `control_presentation` AppleScript - one-liners are hardcoded in Electron. Move to device config (`data_json.control_scripts`) or - Svelte constants so slide nav behavior (e.g. keystroke vs. AppleScript command) can be adjusted - without a rebuild. Wire through `run_osascript` directly. -- [ ] **[Launcher] `kill_processes` target list in config** — process names to kill on cleanup - are currently caller-hardcoded. Allow device config to specify the process name list per - file type / app, so adding a new presentation app doesn't require a Svelte code change. -- [ ] **[Launcher] Launcher config UI — launch_profiles editor** — add a Technical Mode panel - in the Launcher config (tabbed settings) to view and edit `launch_profiles` entries on the - active device record. PATCH via `event_device` V3 CRUD. Lets OSIT staff tune launch behavior onsite - without needing phpMyAdmin or a code deploy. + one-liners are hardcoded in Electron (`shell_handlers.ts` lines 149–159). The Svelte side + (`launcher_cfg_native_os.svelte`) already calls `native.control_presentation({ app, action })` + with next/prev/start/stop buttons wired and working. The Electron IPC call is stable enough + for current shows. + + **Remaining (post June 10):** Move scripts to device config (`data_json.control_scripts`) or + Svelte constants so behavior can be changed without an Electron rebuild. Replace + `native.control_presentation()` call with `native.run_osascript(script)` using the + config-resolved script string. The `run_osascript` primitive is already in place; this is + purely a wiring/config task. Low priority — hardcoded scripts work fine for PowerPoint and + Keynote for now. +- [ ] **[Launcher] `kill_processes` target list in config** — The `kill_processes` IPC primitive + exists in Electron and is exposed via `electron_relay.ts`, but **is never called from anywhere + in Svelte** — no routes, no config components, no file launch flow. No UI exists for it yet. + + **What needs doing (post June 10):** + - Decide where the "kill on cleanup" action lives: end of `handle_open_file()` (auto), or a + manual "Kill Apps" button in Native OS config, or both. + - Process names should come from device config (`data_json.kill_process_li`) with a built-in + fallback list (e.g. `['Microsoft PowerPoint', 'Keynote', 'LibreOffice Impress']`). + - The Native OS config section (`launcher_cfg_native_os.svelte`) is the natural home for a + manual kill button; auto-cleanup on file open would go in `launcher_file_cont.svelte`. + + **Device tab length note:** The Device tab now has 6 collapsible sections (Sync Timers, Health, + Native OS, Wallpaper, Launch Timing, Updates). Consider moving Launch Timing + a future Kill + Apps control into a dedicated **"Presentation"** section or a fourth tab to keep Device focused + on machine/OS concerns rather than per-app launch behavior. +- [x] **[Launcher] Launcher config UI — launch_profiles editor (2026-05-14)** — Launch Timing section in `launcher_cfg_launch_timing.svelte` exposes per-profile `post_delay_ms` overrides with Save/Reset per row. PATCHes `event_device.other_json.launcher.launch_profiles` via V3 CRUD. Wired into `launcher_cfg.svelte`. Shown under Technical Mode (`$ae_loc.edit_mode`). - [ ] **[Launcher] End-to-end test on macOS** — test pptx and key opens on a real podium Mac before May 26 setup day. Verify: file copies to tmp correctly, script fires, app opens in slideshow mode, error fallback works. @@ -209,19 +225,9 @@ suddenly jumps to 0 errors, verify it's not because a bad `.d.ts` replaced a pac - [x] **Finish Jitsi Reports filters** — added Novi UUID exclusion plus meeting-name whitelist filtering, with room-level unique counts based on Novi UUID when present. (2026-05-06) -### [PWA] Service worker ignoring `chrome-extension://` requests -Browser console shows repeated errors: -```text -TypeError: Failed to execute 'put' on 'Cache': Request scheme 'chrome-extension' is unsupported -``` -The service worker's fetch/install handler is trying to cache requests with `chrome-extension://` -URLs (injected by browser extensions), which the Cache API rejects. Fix: filter out non-`http`/`https` -requests before attempting to cache. In the service worker fetch handler, add a guard: -```js -if (!event.request.url.startsWith('http')) return; // skip chrome-extension:// etc. -``` -Locate in `static/service-worker.js` or the Vite PWA plugin config. Low severity — doesn't break -functionality, but pollutes the console and may cause unhandled promise rejections. +### ~~[PWA] Service worker ignoring `chrome-extension://` requests~~ ✅ Fixed (2026-05-14) +Guard added to `src/service-worker.js` fetch handler: `if (!event.request.url.startsWith('http')) return;` +Also skips cross-origin requests entirely (origin check). No console errors from extension URLs. ### [CSS] Global placeholder text color — too dark in light mode Placeholder text inherits full input text color in light mode (Tailwind CSS default), making diff --git a/src/lib/ae_events/ae_launcher__default_launch_profiles.ts b/src/lib/ae_events/ae_launcher__default_launch_profiles.ts index 9125fb39..90b5f0eb 100644 --- a/src/lib/ae_events/ae_launcher__default_launch_profiles.ts +++ b/src/lib/ae_events/ae_launcher__default_launch_profiles.ts @@ -57,7 +57,7 @@ function make_vlc_mirror_profile(): LaunchProfile { app: 'VLC', display_mode: 'mirror', open_cmd: 'open -a "VLC" "{{path}}"', - post_delay_ms: 2000, + post_delay_ms: 1500, post_script: `tell application "VLC" activate end tell diff --git a/src/routes/events/[event_id]/(launcher)/cfg_components/launcher_cfg_launch_timing.svelte b/src/routes/events/[event_id]/(launcher)/cfg_components/launcher_cfg_launch_timing.svelte index 905ac70c..0b7d6f2d 100644 --- a/src/routes/events/[event_id]/(launcher)/cfg_components/launcher_cfg_launch_timing.svelte +++ b/src/routes/events/[event_id]/(launcher)/cfg_components/launcher_cfg_launch_timing.svelte @@ -317,7 +317,7 @@ async function reset_profile_delay(profile_name: string) {

-
+
Built-in: {row.profile.post_delay_ms ?? 'n/a'} ms