docs(launcher): align launch profile terminology

This commit is contained in:
Scott Idem
2026-05-13 11:50:13 -04:00
parent 49c6a2351e
commit c79ae92be0
3 changed files with 52 additions and 27 deletions

View File

@@ -6,23 +6,27 @@
## 🔴 CMSC Charlotte — May 27 (Presentation Management)
**Drive down:** May 25 | **Setup:** May 26 morning | **Show:** May 27+
**[Electron/Launcher] Clean up presentation file launch scripts** — BGH show revealed issues
with the scripts used to open/launch presentation files. Architecture decision: move launch
**[Electron/Launcher] Clean up presentation file launch profiles** — BGH show revealed issues
with the profiles used to open/launch presentation files. Architecture decision: move launch
logic to the Svelte side so it can be changed without an Electron rebuild. Electron becomes a
thin OS primitive layer; all business logic lives in Svelte and device config.
Why this matters: the profile map is policy, while the native template is the exact runtime
command. Keeping those separate avoids a second hidden source of truth and keeps Electron from
guessing defaults.
**Electron groundwork (2026-05-11) — DONE:**
- [x] `run_osascript` hardened — temp `.scpt` file approach; handles multi-line + special chars
- [x] `native:copy-from-cache-to-temp` primitive added — copy to tmp, caller decides launch
- [x] `native:launch-from-cache` accepts optional `script_template` — AppleScript or `shell:` prefix; falls back to hardcoded defaults when null
- [x] `get_launch_script_template()` in `launcher_file_cont.svelte` reads from device config then event config; passes result to `launch_from_cache`
- [x] `native:launch-from-cache` executes a provided `native_template` string — AppleScript or `shell:` prefix; no Electron-side fallback
- [x] `get_launch_profile()` in `launcher_file_cont.svelte` reads from device config then event config; resolves to a `native_template` string and passes it to `launch_from_cache`
**Svelte-side migration — remaining before May 26:**
- [ ] **[Launcher] Built-in Svelte default templates** — move the "known good" pptx/key/pdf
AppleScript strings out of Electron hardcode and into a Svelte constants file (e.g.
`ae_launcher__default_launch_profiles.ts`). Priority: `get_launch_profile()` already
checks device config and event config; add a 3rd fallback to these Svelte defaults before
returning `null`. This means Electron's hardcoded defaults become the last-resort only.
- [ ] **[Launcher] Built-in Svelte default profiles** — move the "known good" pptx/key/pdf
policy objects into a Svelte constants file (e.g. `ae_launcher__default_launch_profiles.ts`).
Priority: `get_launch_profile()` already checks device config and event config; add a 3rd
fallback to these Svelte defaults before returning `null`. Keep the fallback in Svelte, not
in Electron.
- [ ] **[Launcher] Composable open flow** — refactor `handle_open_file()` to use
`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