Commit Graph
9 Commits
Author SHA1 Message Date
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 5e81f32cba ui: Fold code and preview colours in the editor
Draw line numbers and the current line's band in a gutter, with fold
chevrons that fade in while the pointer is over it, and a guide down
each open scope. Collapse a folded range behind a placeholder, and put
a swatch before each colour the server reports.
2026-10-01 20:49:11 +02:00
Ole André Vadla Ravnås b83995dcce ui: Add a patterns section with an editor
List the library's files in the sidebar with new, import, rename and
delete, and edit each in the code editor, which now colours by syntax.
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 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 16d30332ec core: Move frida-gum.d.ts into LumaCore resources
LumaCore now ships frida-gum.d.ts as a processed resource and
exposes it via TypeScriptTypings.fridaGum so both the SwiftUI
host and LumaGtk read from one source of truth. The host's
TypeScriptEnvironment reuses the new accessor; LumaGtk's
MonacoTypings does the same.
2026-04-07 20:30:23 +02:00
Ole André Vadla Ravnås 0e669be3dc Move the rest of business logic into LumaCore
Workspace is now a thin host adapter. Engine owns sessions and
notebook entries (via store observation), GitHub auth + OAuth
device flow, hook-pack discovery, address annotations and address
actions, the disassembler cache, and all instrument lifecycle.
EventLog is @Observable so SwiftUI tracks it directly; the host
no longer mirrors event arrays or version counters.

R2 (live disassembly + trace inspection) lives entirely in
LumaCore as concrete Disassembler / TraceDisassembler classes
returning portable StyledText spans. ProcessNodeViewModel and
InstrumentRuntime are gone; views read engine.processNodes /
node.instruments / engine.descriptor(for:) directly.

Reorganize Luma/Models/ — instrument UI dispatch lives under
Luma/Instruments/, Monaco editor glue under Luma/Editor/, and the
remaining UI types sit at the top of Luma/.
2026-04-07 10:11:31 +02:00