Commit Graph
13 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås bf06ef8b8e Make HookPack/custom-instrument panes scrollable
Wrap the config view in ScrollView (SwiftUI) and the detail
UI's outer Box in a ScrolledWindow (GTK) so widgets past the
visible area can be reached.
2026-05-20 21:31:56 +02:00
Ole André Vadla Ravnås 5504bb4698 ui: Render console JS values via inspector 2026-05-17 00:55:15 +02:00
Ole André Vadla Ravnås b0c868ab56 ios: Move custom instrument actions to editor 2026-05-16 22:48:55 +02:00
Ole André Vadla Ravnås 4be3be73fc ui: Add custom instrument metadata menu 2026-05-16 22:26:52 +02:00
Ole André Vadla Ravnås d3f87b1f3a ui: Hide custom instrument Edit Source in add dialog 2026-05-15 13:16:16 +02:00
Ole André Vadla Ravnås d38d428b9c ui: Push detail padding into config views
InstrumentDetailView no longer wraps with .padding(8). Each config
view declares its own padding. Form views pad all four sides;
editor views (Tracer hook editor, Custom Instrument source) leave
the trailing edge flush so the scrollbar reaches the window edge.
2026-05-15 13:07:30 +02:00
Ole André Vadla Ravnås d1606523b5 Support multi-file custom instruments
- Store source files as named CustomInstrumentFile rows per def
- Render sidebar with disclosure groups
- Drive editor via Monaco project models with activePath
- Validate Add/Rename/Delete dialogs and submit on Enter
- Fork installed hook packs into editable custom instruments
- Reload instances on def change; clear stale compat reasons live
- Focus editor on selection (native + Monaco)
2026-05-13 08:54:48 +02:00
Ole André Vadla Ravnås c5d2ff7050 core: Replace Workspace with per-document Engine
EngineRegistry caches one Engine per working-project URL.
MainWindowView.init does a pure lookup, so SwiftUI's
view-tree re-evaluations cannot open extra ProjectStores
that race the live one's BEGIN IMMEDIATE and crash via
try!.

UI-state persistence (collapse flag, sidebar selection,
session detail section, etc.) lives on Engine for GTK to
adopt. SQLite has a 5s busy timeout. Engine open failures
surface as an error view.

TargetPicker is host @State injected via environment.
Global instrument-UI defaults register at app startup;
per-engine instrument and local-notifier hookups live in
Engine extensions.
2026-05-11 21:15:47 +02:00
Ole André Vadla Ravnås 26d687cecd Wire widgets through agent, UI, and collab
Engine owns the widget state cache, applies inbound updates from
the agent, persists session-scoped widgets, and broadcasts to
collaborating peers (action invocations route to the host).
Renderers in both UIs read the cache and the unified update
stream, with a Clear button that propagates to peers.

Agent SDK adds ctx.widget(id) with push/upsertItem/removeItem/
clear, plus a typed onAction handler. create() now takes a
restored snapshot seeded from persisted state and the join
snapshot.

Per-def .d.ts narrows the widget map, restored shape, and action
union to the exact ids declared in the editor.
2026-05-10 21:02:42 +02:00
Ole André Vadla Ravnås 029a403c71 Round-trip custom instruments as hookpacks
Hookpack manifest mirrors CustomInstrumentDef: rich features,
TypeScript entry, optional file-based icon. Folder name is the
pack id.

HookPackConfig holds FeatureState per feature, producing the
same agent-JSON shape as custom instruments. Hookpack sources
compile through the shared TypeScript pipeline.

Import sits next to "New Custom Instrument..."; Export on the
custom-instrument context menu. Both UIs.
2026-05-10 16:15:56 +02:00
Ole André Vadla Ravnås 2d3c362dd2 swiftui: Refine instance config layout
Render top-level boolean features as inline checkbox-style
toggles. Object fields use a SwiftUI Grid with a shared
right-aligned label column. Editors cap at sensible widths
(320 for string/regex, 200 for combo, 140 for numbers) and
push the rest of the row to a trailing spacer.
2026-05-06 18:37:05 +02:00
Ole André Vadla Ravnås 8c82612579 Switch instrument icon to rich model 2026-05-06 00:05:01 +02:00
Ole André Vadla Ravnås 6ab2e3d3b2 macos: Add custom instrument UI 2026-05-05 19:15:56 +02:00