From 51d4ba7ba9c979f3ee3297e46d4f22be0abfa511 Mon Sep 17 00:00:00 2001 From: Patrick Bertsch Date: Sat, 2 May 2026 18:07:00 -0600 Subject: [PATCH] feat(studio): workspace settings overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a ⚙ toolbar button that opens a form for the four probe.yaml fields users actually touch: agent.port, defaults.timeout, device.ios_device_id, device.android_device_id. Backend (studio/workspace_settings.go): LoadWorkspaceSettings reads probe.yaml via internal/config and surfaces the four managed fields. SaveWorkspaceSettings rereads the file as a raw map[string]any, mutates only the keys we manage, and writes back — so a power user with complex probe.yaml (cloud config, plugins, recipes_folder, etc.) doesn't lose anything by using the UI. Empty/zero fields are dropped from the YAML so we don't litter probe.yaml with `agent: {}` after the user clears a field. Validation: agent.port range-checked, defaults.timeout parsed as a Go duration before any disk write — invalid input fails fast with a clear error. Frontend: settings overlay matches the help/wifi modal shape; Escape closes all three. Deliberately scoped tight — extending the field set is cheap once the plumbing exists, but landing a small form first beats arguing about which 20 fields to expose. --- CHANGELOG.md | 1 + studio/frontend/index.html | 38 ++++++ studio/frontend/src/main.ts | 65 +++++++++++ studio/frontend/src/style.css | 15 +++ studio/frontend/wailsjs/go/main/App.d.ts | 4 + studio/frontend/wailsjs/go/main/App.js | 8 ++ studio/frontend/wailsjs/go/models.ts | 18 +++ studio/workspace_settings.go | 141 +++++++++++++++++++++++ 8 files changed, 290 insertions(+) create mode 100644 studio/workspace_settings.go diff --git a/CHANGELOG.md b/CHANGELOG.md index ad686dc..b82da52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **Studio: WiFi token memory** — Studio now remembers the agent token per discovered device (keyed by Bonjour instance name) in localStorage. After a successful WiFi connect, subsequent mDNS-discovered sessions for that device prefill the token automatically and show a "🔑 saved" tag. Each remembered device gets a small "✕" button to forget the token. +- **Studio: workspace settings overlay** — new ⚙ button in the toolbar opens a small form for `agent.port`, `defaults.timeout`, `device.ios_device_id`, and `device.android_device_id`. Save writes back to `probe.yaml` in the active workspace. Other keys you've set in `probe.yaml` are preserved on save (loaded as a raw map; only the four managed keys are mutated). ## [0.7.0] - 2026-05-02 diff --git a/studio/frontend/index.html b/studio/frontend/index.html index 15d7315..16c1ff0 100644 --- a/studio/frontend/index.html +++ b/studio/frontend/index.html @@ -25,6 +25,8 @@ + +
@@ -86,6 +88,42 @@
+ +