docs: update TODO — mark error handling, PWA SW, launch_profiles editor as done; annotate slide control + kill_processes status

- Error handling + fallback: confirmed done (launcher_file_cont.svelte)
- PWA service worker chrome-extension guard: confirmed done (service-worker.js)
- Launcher config UI / launch_profiles editor: confirmed done (launcher_cfg_launch_timing.svelte)
- Slide control scripts: annotated partial state — Svelte buttons wired, Electron scripts still hardcoded, deferred post June 10
- kill_processes: documented as not started on Svelte side; noted Device tab length concern

Also bundle two prior-session Launcher fixes:
- VLC post_delay_ms: 2000 → 1500ms
- launcher_cfg_launch_timing: add min-w-22 to built-in/current delay display
This commit is contained in:
Scott Idem
2026-05-14 12:24:36 -04:00
parent 054775b0f8
commit b3ce65f7f6
3 changed files with 34 additions and 28 deletions

View File

@@ -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 149159). 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

View File

@@ -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

View File

@@ -317,7 +317,7 @@ async function reset_profile_delay(profile_name: string) {
</p>
</div>
<div class="text-right text-[9px] leading-tight opacity-65">
<div class="text-right text-[9px] min-w-22 leading-tight opacity-65">
<div>
Built-in:
{row.profile.post_delay_ms ?? 'n/a'} ms