Commit Graph
8 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås b88a9be290 Replace SwiftyMonaco with native editors
Drop the Monaco webview. Edit in a GtkSourceView on GTK and in a
native text view on Apple, both speaking to Frida.Compiler's
in-process language server for completions, signature help,
hovers and diagnostics.

Color, complete and indent code natively, matching the GitHub
theme in light and dark.
2026-09-08 19:52:31 +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 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 8fe79d24eb core: Move editor profile model into LumaCore
Both frontends were configuring Monaco editors with parallel,
incompatible types: a hand-rolled MonacoEditorProfile in LumaGtk,
SwiftyMonaco's MonacoEditorProfile in the SwiftUI host. Each had
its own MonacoExtraLib, TypeScriptCompilerOptions, frida compiler
options constant, and tracer-handler ambient declarations. The
LumaCore.MonacoFSSnapshot type also collided with SwiftyMonaco's
same-named type, forcing a typealias workaround in the host.

LumaCore now owns the canonical editor model:

* EditorProfile, EditorCompilerOptions, EditorExtraLib, plus
  EditorScriptTarget / EditorModuleKind / EditorModuleResolutionKind
  enums whose raw values match Monaco's TypeScript enums.
* EditorProfile.fridaCompilerOptions and .fridaGumLib for the
  Frida-recommended TS config and the bundled gum typings.
* EditorProfile.fridaTracerHook(packages:) and .fridaCodeShare()
  factory methods that build the right profile in one call.
* TracerTypings.handlerLib for the defineHandler ambient
  declarations (previously duplicated verbatim in both frontends).

MonacoFSSnapshot is renamed to EditorFSSnapshot, eliminating the
name collision with SwiftyMonaco entirely.

LumaGtk's MonacoEditor.swift drops its duplicate types and uses
LumaCore.EditorProfile directly. The JS literal generation moves
to fileprivate extensions on the canonical types.

The SwiftUI host gains one new file — Editor/SwiftyMonacoBridge.swift
— containing init(from:) extensions on SwiftyMonaco's MonacoExtraLib,
TypeScriptCompilerOptions, MonacoFSSnapshot, and MonacoEditorProfile.
This is the only place that knows about both type families. All
the per-frontend editor-profile files (TracerEditorProfile,
CodeShareEditorProfile, TypeScriptEnvironment), Workspace+Packages,
and the MonacoFSSnapshotAlias hack are deleted.
2026-04-11 09:23:16 +02:00
Ole André Vadla Ravnås 3010f789db Extract TracerConfig, CodeShareConfig, services
Split UI-coupled types into portable data (LumaCore) and
platform-specific editor profiles (Luma):

- TracerConfig: data struct + template stubs to LumaCore,
  TracerEditorProfile stays with SwiftyMonaco in Luma
- CodeShareConfig + CodeShareProjectRef to LumaCore,
  CodeShareEditorProfile stays in Luma
- CodeShareService: drop ObservableObject, move as
  stateless enum with async methods to LumaCore
- HookPack: data struct to LumaCore, discovery stays

Add swift-crypto dependency for cross-platform SHA256.
Add FoundationNetworking import for Linux URLSession.
2026-04-06 19:26:53 +02:00
Ole André Vadla Ravnås 77160e5612 Improve TypeScript support in the editor
- Provide a trimmed node_modules filesystem snapshot to Monaco
- Inject global alias typings for installed packages
- Run tracer scripts through Frida.Compiler
2025-12-30 12:36:19 +01:00
Ole André Vadla Ravnås da73ccfede Restore iOS compatibility by isolating AppKit
Fix regressions that caused the universal app to become
macOS-only by moving AppKit usage behind platform abstractions.
2025-12-23 02:18:14 +01:00
Ole André Vadla Ravnås 851b8e26bd Initial commit 2025-12-05 23:16:30 +01:00