Clarify native template bridge contract

This commit is contained in:
Scott Idem
2026-05-13 11:44:36 -04:00
parent 72d928f907
commit 7693b12aeb
4 changed files with 5 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ function registerFileHandlers() {
// 1. Copy the file to temp folder with original name
fs.copyFileSync(source, target);
// 2a. Data-driven launcher template (no rebuild needed for config changes).
// Svelte resolves launch_profiles to a single AppleScript string or "shell:<cmd>" template.
// Svelte resolves a Launch Profile to a single native_template string.
// Format: AppleScript string with {{path}} placeholder, OR "shell:<cmd> {{path}}"
if (!native_template) {
return { success: false, error: 'No native template configured for this file' };

File diff suppressed because one or more lines are too long

View File

@@ -12,8 +12,8 @@
Svelte config object keyed by extension; **Native Template** = the AppleScript or shell
string Electron actually executes after the file lands in temp.
- Update `src/main/file_handlers.ts` comments and any bridge-facing wording so they describe the
resolved template string accurately. The current IPC arg name in source is `launch_profiles`,
but it carries a single native template string. Do not reintroduce `launch_scripts` as the
resolved `native_template` string accurately. `launch_profiles` is only the Svelte-side map;
the IPC payload is the single executable string. Do not reintroduce `launch_scripts` as the
public term.
- Keep the source of truth in Svelte. Electron should remain a thin executor/copy layer.
- After source/docs updates, rebuild/regenerate `dist/main/file_handlers.js` from source; do not

View File

@@ -118,7 +118,7 @@ export function registerFileHandlers() {
fs.copyFileSync(source, target);
// 2a. Data-driven launcher template (no rebuild needed for config changes).
// Svelte resolves launch_profiles to a single AppleScript string or "shell:<cmd>" template.
// Svelte resolves a Launch Profile to a single native_template string.
// Format: AppleScript string with {{path}} placeholder, OR "shell:<cmd> {{path}}"
if (!native_template) {
return { success: false, error: 'No native template configured for this file' };