fix: repair file_handlers.ts backtick escaping; update README

file_handlers.ts had AI-generated escaped backticks (\`) and template
literal dollar signs (\${) throughout, causing TypeScript compile errors
("Invalid character", "Unterminated template literal"). Fixed all 15
affected lines.

README updated: corrected seed config path from resources/seed_config.json
to ~/seed.json (external to app bundle by design), added explanation of
why it's kept external (no re-signing needed per device), and documented
the 2-char hash prefix cache layout with consistency warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-11 11:50:06 -04:00
parent 7c0bb6719d
commit 2ad6bce8db
4 changed files with 87 additions and 27 deletions

View File

@@ -12,10 +12,16 @@ This application serves as the "Native Mode" runtime for Aether podiums and devi
## ⚙️ Configuration
The application requires a `seed_config.json` file to identify the device and connect to the Aether API.
The application requires a `seed.json` file to identify the device and connect to the Aether API.
### 1. Seed Configuration
Create/edit `resources/seed_config.json`:
**Location: `~/seed.json`** (user's home directory — external to the app bundle by design)
This file is intentionally kept outside the application bundle so it can be edited per-device
without re-signing or repackaging the app. On macOS this is `/Users/<username>/seed.json`.
Create/edit `~/seed.json`:
```json
{
"event_device_id": "YOUR_DEVICE_ID",
@@ -25,13 +31,30 @@ Create/edit `resources/seed_config.json`:
}
```
### 2. Environment Setup
> **Note:** The `event_device_id` and `aether_api_key` values come from the Aether admin panel
> (Events → Devices). Each physical device gets its own record and key.
### 2. Development Setup
```bash
npm install
npm run build
npm start
npm start # Compiles TypeScript (tsc) then launches Electron
```
### 3. File Cache Layout
Presentation files are cached locally under `hash_prefix_length`-char subdirectories (default: 2):
```text
[local_file_cache_path]/
4a/
4a228ef8ac1a...sha256hash...file
1d/
1d720916a831...sha256hash...file
```
**Important:** `hash_prefix_length` must be consistent. If it changes, files in old directories
become orphaned and will be re-downloaded. The default is `2` and should not be changed unless
explicitly coordinated across all devices.
## 🌉 The Native Bridge (`aetherNative`)
The bridge is exposed to the renderer via `contextBridge`. It can be accessed in the web UI via `window.aetherNative`.