Commit Graph
12 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 65e2cab5ae ui: Give the pattern editor a pane's chrome
Drop its padding and border for a divider along the top, so it sits
flush against the sidebar as Xcode's editor does.
2026-10-01 20:49:11 +02:00
Ole André Vadla Ravnås a6f769221f ui: List pattern types in the sidebar
Show each file's declared types under it, with a browse popover when
there are many, and reveal a type's declaration when it is chosen.
2026-10-01 20:49:11 +02:00
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 3c17741504 ui: Render code editor with GitHub theme
Bridge EditorCustomTheme/EditorTokenRule/EditorBaseTheme to their
Monaco counterparts and pass the theme name through.

CodeEditorView picks .gitHubLight or .gitHubDark from the
environment colorScheme and frames the editor with 1pt hairline
borders on top, leading, and bottom in editorGroupHeader.tabsBorder.
2026-05-15 13:07:19 +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 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 74db87cf4d core: Share Monaco FS snapshot pipeline
LumaCore now owns MonacoFSSnapshot, the package alias typings
helper, and the Engine.rebuildMonacoFSSnapshotIfNeeded routine
that walks node_modules for .d.ts and package.json. The SwiftUI
host's Workspace+Packages becomes a thin pass-through, and the
LumaGtk MonacoEditor gains setFSSnapshot plus initial-bootstrap
wiring so the tracer hook editor injects both gum typings and
project package alias typings, then ships the FS snapshot once
the engine has it ready.
2026-04-07 20:44:09 +02:00
Ole André Vadla Ravnås 58b240c5f2 Move package management to Engine
Engine now has installPackage, upgradePackage,
removePackage, loadAllPackages, loadPackage —
delegating to CompilerWorkspace and propagating
to attached process nodes.

Workspace+Packages is reduced to the SwiftyMonaco
filesystem snapshot building, which stays in the
app layer.
2026-04-07 07:56:28 +02:00
Ole André Vadla Ravnås 19369c1f8a Remove SwiftData and wire Luma app to ProjectStore
Delete all 10 @Model classes (replaced by LumaCore structs).
Remove SwiftData imports from 27 files. Drop DocumentGroup,
schema versions, and migration plan from LumaApp.

ProcessNodeViewModel now persists REPL cells, ITrace
captures, and session updates through ProjectStore instead
of ModelContext. InstrumentRuntime uses the LumaCore
InstrumentInstance struct directly.

WIP: Workspace needs ProjectStore injection and views need
wiring to load data from the store. The Xcode build has
errors until the remaining view plumbing is done.
2026-04-06 20:33:20 +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 851b8e26bd Initial commit 2025-12-05 23:16:30 +01:00