Commit Graph
36 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 8d12aa4d7f core: Carry the app icon on a spawn target 2026-09-28 17:35:15 +02:00
Ole André Vadla Ravnås 4aa17098b2 core: Speed up and simplify the VM picker
templates and availability spawned `emulator -list-avds` on every
render, so opening the boot sheet -- and clicking a template, which
re-queries them all -- stuttered for seconds. Cache the listing and
warm it off the main thread when the picker or sheet appears.

Collapse the two per-architecture Android entries into one; the
chosen AVD now decides the architecture, retiring the message that
wrongly claimed Frida could only instrument the other one.
2026-09-27 17:55:08 +02:00
Ole André Vadla Ravnås 6a8052bb37 ui: Skeleton the target list while enumerating
Give the detail side the same placeholder rows as the device list:
while a device enumerates, with a status footer that keeps the
connection-stage readout; and while devices are still being
discovered, so the detail never flashes "Select a Device" first.
2026-09-27 16:29:26 +02:00
Ole André Vadla Ravnås 2282318aa7 ui: Show skeleton device rows while discovering
Render redacted placeholder rows in the same list the loaded state
uses, so the sidebar keeps its shape and the swap to real devices
is a fill-in rather than a jump from empty space.
2026-09-27 16:14:55 +02:00
Ole André Vadla Ravnås 363d1c6ca0 ui: Stop the picker clipping its mode control
The mode picker's maxWidth cap compressed and clipped its leading
segment on the first layout pass, before the detail column's width
resolved. Pin it to its natural size instead. Drop the redundant
discovery hint so the loading sidebar is just the header.
2026-09-27 16:06:02 +02:00
Ole André Vadla Ravnås 74b20474d1 ui: Keep the picker's device header while loading
The sidebar dropped its header and centred a lone spinner while
discovering, then snapped to the header and list once devices
arrived. Pin the header for every state so rows just fill in.
2026-09-27 15:55:18 +02:00
Ole André Vadla Ravnås 67b08b72ca ui: Show how connecting to a device is going
Read the shared connection activity in the target picker and put the
current stage, with a progress bar that eases toward the next stage
over its expected duration, under the spinner in place of "Querying".
Show the stage on an attaching session's row too, since a session
re-establishing connects the same way.
2026-09-16 13:00:08 +02:00
Ole André Vadla Ravnås 52fcf32ac0 Put the kernel first in the process list
It is the one process nothing else stands in for. Name it as such,
and let the device rows ellipsize rather than widen the column.
2026-09-10 16:30:19 +02:00
Ole André Vadla Ravnås 7df308f30c core: Keep QEMU off iOS
Nothing there spawns a process, and the machine UI is AppKit's.
2026-09-10 16:29:56 +02:00
Ole André Vadla Ravnås 991e261efc Select a freshly readied machine's device
Remember the device a boot asked for and select it once it appears,
rather than losing it to the reload that arrives first.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås 0e933206fb Boot virtual machines from the target picker
Add a machine abstraction to LumaCore, with QEMU as its first
backend: templates mirroring frida-core's test guests, a QMP client,
and a display that maps QEMU's surface over D-Bus rather than
copying frames.

Leave readiness to the user: drive the guest, mark it ready, and come
back to that snapshot later. Keep the machine in the project, so
booting it again resumes where it was marked. Hand the stub to
addBareboneDevice, so it joins the picker beside the other devices.

Show the display while booting, and afterwards in a Machines panel,
which the side panel now models as an enum to share its slot.
2026-08-20 14:52:52 +02:00
Ole André Vadla Ravnås 4f7f06e57d Follow frida-swift's regenerated API
Take the regenerated bindings on both frontends.
2026-08-13 12:46:09 +02:00
Ole André Vadla Ravnås 141ecbe8d6 Show process command line in target picker
Surface each process's argv as a dim subtitle next to its PID, so
same-named processes can be told apart. Match it when filtering too.

Falls back to just the PID when the backend reports no argv.
2026-06-16 02:22:28 +02:00
Ole André Vadla Ravnås 276dd885d1 ui: Tighten spawn target picker layout
Move the app filter alongside the Application/Program toggle, collapse
launch options behind a single Options disclosure, and bump min height
so the picker fits its content without the bottom form eating slack.
2026-05-24 10:15:24 +02:00
Ole André Vadla Ravnås 721ab56713 ui: Add Browse for program path on local device 2026-05-21 00:24:24 +02:00
Ole André Vadla Ravnås 45481e1d2a swiftui: Wire spawn gating UI
Target picker grows a Wait for Launch mode with a popover-anchored
suggestions list. Sidebar context menu adds Arm/Disarm with a regex
prompt; armed sessions get a scope badge.

Detail banner picks among armed, idle, and detached states. The
armed banner offers Resume when gating is paused or failed and
Disarm otherwise.

EventStreamView renders spawn-gating events; raw payloads unwrap to
the inner message string instead of String(describing:) on the case
wrapper. REPL inactive message reflects armed/paused/detached.
2026-05-08 16:15:25 +02:00
Ole André Vadla Ravnås 51c693a665 swiftui: Add accessibility identifiers for UI tests 2026-05-03 22:29:31 +02:00
Ole André Vadla Ravnås 8c4372794e target-picker: Rework Add Remote for iOS
The previous sheet rolled everything — title, fields, advanced
options, action buttons — into one ScrollView. On compact iPhone
with `.medium` / `.large` detents, that left big empty space
below the buttons in the collapsed form, and once the user opened
Advanced Options the content pushed Cancel/Add below the detent
line so they were only reachable by dragging the sheet all the
way open.

Split the sheet by platform: iOS now uses NavigationStack + Form
with Cancel/Add pinned in the toolbar, so they stay visible
regardless of how much the form scrolls. Add is disabled until
the address field has content. macOS keeps its existing layout
since it never had the detent problem.
2026-04-22 20:14:21 +02:00
Ole André Vadla Ravnås a74e0fc179 target-picker: Pull hint up to the title
The large-title area already provides generous bottom padding on
iPhone, so the extra 12pt above the "Pick a device…" hint pushed
it too far from "New Session". Drop the top padding to 0 on
compact; wide layouts keep the original 12pt since they don't have
a large title above the header.
2026-04-22 19:15:15 +02:00
Ole André Vadla Ravnås 99c8f60d6c target-picker: Float list onto grouped page
On iPhone the list card sat flush against the subtitle at the top
because its insetGrouped backdrop only covers the scroll content,
not the parent. Paint the systemGroupedBackground on the whole
device pane and hide the list's own scroll backdrop so the card
floats on one continuous grey page — horizontal gutters and the
new top gap now match.
2026-04-22 19:13:59 +02:00
Ole André Vadla Ravnås b242bab96d target-picker: Clean up compact device header
On iPhone the uppercase DEVICES label was redundant with the
navigation bar title ("New Session") and the "Pick a device…"
subtitle. Drop the section heading in compact mode — the subtitle
becomes the only leading label, right-aligned + button stays. Bump
the bottom padding to 16 so the list card doesn't butt right up
against the subtitle. Wide layouts keep the DEVICES heading since
there's no navigation-bar fallback context there.
2026-04-22 19:03:02 +02:00
Ole André Vadla Ravnås 0cc9d583f9 target-picker: Scope device hint to compact
When the detail pane is visible alongside the device list, the
mode selector at the top of the detail pane already spells out
what the picker does ("Spawn a new app…" / "Attach to an
already-running process…"). Repeating the same guidance under
"Devices" is noise. Show the subtitle only on compact widths
where the detail pane isn't visible yet.
2026-04-22 18:59:08 +02:00
Ole André Vadla Ravnås a4abd75d0a placeholder: Generalize and use in target picker
The monogram placeholder wasn't really session-specific — the same
hue-from-seed + initials logic fits every target that has an
optional bundle icon. Rename `SessionPlaceholder` → `IconPlaceholder`
(data in LumaCore) and the two view wrappers to `IconPlaceholderView`
so the scope reads correctly, then wire the target picker's app and
process rows to fall back on it when no Frida-provided icon is
available. Seeds are app.identifier for applications and proc.name
for processes so repeat targets keep consistent colours.
2026-04-22 18:39:05 +02:00
Ole André Vadla Ravnås 93cd17d5ec target-picker: Anchor Add Remote sheet to the top
On iPhone the sheet centred its content, leaving big empty strips
at top and bottom. Wrap the form in a scroll view anchored at the
top-leading corner and opt into medium + large detents (iOS only)
so the sheet behaves like a native form. macOS keeps its
fit-to-content behaviour.
2026-04-22 18:15:30 +02:00
Ole André Vadla Ravnås d6cb02518a target-picker: Refine device list header
The Devices header sat directly on top of the list with a vague
green status dot. Rework into a titled section with an explanatory
subtitle, drop the dot (the ProgressView already covers the only
transient state), and align the + button with a platform-aware
horizontal inset so it lines up with the list's trailing edge.
2026-04-22 18:15:23 +02:00
Ole André Vadla Ravnås 3e773eac5e ios: Compact-width adaptations for shared views
Gate min-width frames behind isCompactWidth so the event stream,
target picker, codeshare browser, and collaboration panel collapse
cleanly on iPhone instead of forcing a scroll at their regular
widths. Give the event stream a dedicated compact header that
promotes the source / process filters to icon menus and keeps the
search, pause, and clear controls inline.

Drop the auto-select-first behavior in the target picker and
codeshare browser on compact, so tapping a sidebar row navigates
to the detail pane on NavigationSplitView's built-in stack instead
of stranding the user looking at a preselected item.

Push the instrument event-row monospaced font up into each
InstrumentUI factory and out of JSInspectValueView, so tracer,
hook-pack, and codeshare rows match without recomputing it for
every sub-value. Migrate the JS inspector disclosure label to
AttributedString to kill the deprecated Text + Text concatenation
warning. Tighten REPL result formatting and relabel the detach
banner hint.
2026-04-21 18:53:41 +02:00
Ole André Vadla Ravnås 769642d098 luma: Hide Mode picker label in target picker
The "Mode" label next to the Spawn|Attach segmented picker was
redundant — the caption text beside the picker already tells the
user what each mode does. Hiding the label also lets the picker
sit flush-left, matching the luma-gtk layout.
2026-04-15 13:24:44 +02:00
Ole André Vadla Ravnås b7ba78b1eb target-picker: Collapse rare spawn fields
Six small refinements to the spawn UI, applied to both frontends
where relevant:

- Right-align the Application|Program picker so the spawn header
  reads lighter when no device is picked yet.

- Rename the Pipe stdio option to "Pipe to Luma" and make it the
  default — most users want Luma to capture stdout/stderr, and
  the old name wasn't specific enough about where the pipe goes.

- Move the "When turned off…" caption off the Execution section
  footer and directly under the auto-resume toggle, so it
  doesn't read like it applies to the stdio picker above.

- Collapse Launch Arguments, Environment, Working Directory and
  Execution by default when spawning an Application (rare to
  need any of them) — GtkExpander in luma-gtk, Section with an
  isExpanded binding in SwiftUI. Program mode keeps them
  expanded.

- luma-gtk only: indent the Program section's card the same as
  the other sections, and fix a small left-padding asymmetry.
2026-04-15 11:45:37 +02:00
Ole André Vadla Ravnås 9b9537825d target-picker: Unify Environment hint copy
The app-mode hint said "Environment variables will be added…"
while the program-mode hint said "…are added…" — no meaningful
difference, just accidental drift between two copies of the same
sentence. Use the tighter present-tense version in both
frontends.
2026-04-15 11:29:58 +02:00
Ole André Vadla Ravnås 6ee2ae9c23 target-picker: Drop superfluous spawn header prose
The "Spawn on <name>" title + device id subtitle + "Luma will
spawn the target and attach a new session automatically." blurb
did not pull their weight — the device selection is already
visible on the left, and the mode is obvious from the picker.
Keep the Application|Program picker, drop the rest, in both
frontends.
2026-04-15 11:16:21 +02:00
Ole André Vadla Ravnås 0d400d4150 Restore documents via SQLite-backed projects
Each .luma document is a package (directory bundle)
containing project.sqlite. LumaProject implements
ReferenceFileDocument to integrate with SwiftUI's
DocumentGroup:

- New documents create a fresh SQLite database
- Existing documents read the database from the package
- Snapshots serialize the database for save operations

Workspace takes a ProjectStore from the document rather
than creating its own. Each document window gets an
independent store/workspace pair.
2026-04-06 21:49:41 +02:00
Ole André Vadla Ravnås bddb2830fe Wire views and Workspace exts to ProjectStore
Update every view and Workspace extension to use LumaCore
types and ProjectStore instead of SwiftData:

- SidebarView: fetch instruments/insights/captures from store
- DetailView: resolve sessions via store
- REPLView: load cells from store by sessionID
- NotebookView: use LumaCore.NotebookEntry value types
- Workspace+Packages: delegate to CompilerWorkspace, use
  ESMBundleParser.parse(), persist via store
- Workspace+Collaboration: fetch/save collaboration state
  and notebook entries through store
- All remaining views qualified with LumaCore types

The Luma app should now compile without SwiftData.
2026-04-06 21:03:17 +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 54868d8b9d Extract portable model types into LumaCore
Move pure data types out of Luma/ into Sources/LumaCore/
so they can be shared with the GTK frontend:

- AddressAnchor, CFGGraph, ITraceDecoder (+ all related
  types: TraceEntry, ITraceMetadata, RegisterState, etc.)
- JSInspectValue, SpawnConfig, ProcessModule
- HookPackConfig, HookPackManifest, InstrumentConfigCodec
- InstrumentIcon, InstrumentKind, ConsoleLevel

CFGGraph uses its own Point2D instead of CoreGraphics
types, keeping the core free of Apple frameworks.

Remove premature stubs (Engine, ProcessNode,
InstrumentRuntime, EventStream) that will be properly
built in a later phase once the real implementations
are ready to move.
2026-04-06 19:19:20 +02: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