refactor(launcher): prefer launch_profiles naming\n\nRename the public launcher override concept to launch_profiles across the task list\nand docs, while keeping launch_scripts as a compatibility alias for older device

records. Update the Svelte resolver to read both keys so per-device tweaks remain
backward compatible during the transition.
This commit is contained in:
Scott Idem
2026-05-13 10:26:01 -04:00
parent 8dd22912c3
commit b697126495
5 changed files with 29 additions and 17 deletions

View File

@@ -312,11 +312,12 @@ The Electron app zero-configs itself:
4. OS opens the file (Keynote, PowerPoint, Preview, etc.)
**Configurable launch behavior:** The open/launch command in step 4 can be overridden
per file extension via `event_device.data_json.launch_scripts` (device-level config) or
`event.launcher.launch_scripts` (event-level fallback). Templates use `{{path}}` as the
per file extension via `event_device.data_json.launch_profiles` (device-level config) or
`event.launcher.launch_profiles` (event-level fallback). Templates use `{{path}}` as the
file path placeholder; AppleScript or `shell:` prefixed commands are both supported. No
Electron rebuild required to change how files open — edit config in Aether and it applies
immediately. See `PROJECT__AE_Events_Launcher_Native_integration.md` Section 8.
immediately. Legacy `launch_scripts` keys are still accepted by the resolver for older data.
See `PROJECT__AE_Events_Launcher_Native_integration.md` Section 8.
Versioning is handled automatically: when a presenter uploads an updated file, the new
hash is cached separately and the old one remains intact.

View File

@@ -199,15 +199,17 @@ temp directory (after the atomic copy from cache).
### Where to Configure
Templates are resolved in priority order by `get_launch_script_template()` in
Launch profiles are resolved in priority order by `get_launch_profile()` in
`launcher_file_cont.svelte`:
1. **`event_device.data_json.launch_scripts`** — API-driven, per-device. Highest priority.
1. **`event_device.data_json.launch_profiles`** — API-driven, per-device. Highest priority.
Set via the `event_device` record (Pres Mgmt → Device Management or direct DB edit).
2. **`$events_loc.launcher.launch_scripts`** — Local persistent config. Editable via the
2. **`$events_loc.launcher.launch_profiles`** — Local persistent config. Editable via the
Launcher config UI (planned) or direct `localStorage` manipulation.
If neither is set, `script_template` is `null` and Electron uses its built-in hardcoded defaults.
Legacy `launch_scripts` keys remain accepted as compatibility aliases in the resolver so older
device records continue to work while the preferred schema is `launch_profiles`.
### Key Format

View File

@@ -20,7 +20,7 @@ thin OS primitive layer; all business logic lives in Svelte and device config.
**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_scripts.ts`). Priority: `get_launch_script_template()` already
`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] Composable open flow** — refactor `handle_open_file()` to use
@@ -37,9 +37,9 @@ thin OS primitive layer; all business logic lives in Svelte and device config.
- [ ] **[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_scripts editor** — add a Technical Mode panel
in the Launcher config (tabbed settings) to view and edit `launch_scripts` entries on the
active device record. PATCH via `event_device` V3 CRUD. Lets OSIT staff tune scripts onsite
- [ ] **[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.
- [ ] **[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