Commit Graph
16 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås f9cfbb5538 ui: Stabilize module symbol table selection
Symbols share name+address (aliases, mapping symbols, empty names),
so the models' data-derived ids collide and SwiftUI's Table resolved
a click to the first row with that id, snapping to the previous
selection. Identify rows by position instead. Also guard the async
query against writing results from a superseded request.
2026-07-10 18:40:22 +02:00
Ole André Vadla Ravnås 035160a1e8 Paginate module symbols and focus filter with Cmd+F
Serve symbol pages by offset and step through them with prev/next
controls showing the current range. Reset to the first page when
the filter or category changes. Clamp the page index at the
mutation site and floor the offset in the agent so hammering
prev/next can't run past the ends into a negative range.

Bind Cmd+F (Ctrl+F on GTK) to focus the filter input.
2026-07-10 18:40:22 +02:00
Ole André Vadla Ravnås 4ffcbc31f3 Page module symbols to keep the UI responsive
Modules like YouTube Kids export 100k+ symbols. Enumerating and
marshalling the whole set per open stalled the UI, and both
frontends re-filtered the full arrays on the main thread on every
keystroke.

Build a cached, pre-sorted, pre-lowercased index in the agent and
serve filtered, capped pages. Add queryModuleSymbols returning a
window plus match and category counts. Wire both frontends to it
with a debounced filter; drop the client-side filtering.
2026-07-10 17:01:44 +02:00
Jeroen Beckers 2492db1e91 ui: Add filtering to the module symbol lists 2026-07-09 18:10:22 +02:00
Ole André Vadla Ravnås c93b93a067 ui: Fix module symbol table selection
A per-cell context menu intercepts the primary click in a macOS
Table, so rows rarely got selected. Make the cells passive and
move the address menu to a table-level contextMenu(forSelectionType:),
reusing a shared AddressMenuItems.
2026-06-27 23:55:55 +02:00
Ole André Vadla Ravnås 40191dd156 ui: Open module symbols on double-click
Double-click an export, import, or symbol to open its disassembly
or memory view, by type.
2026-06-27 19:00:36 +02:00
Ole André Vadla Ravnås 5ed87e6018 Make sidebar hooks collapsible like module groups
Give instruments that have hooks a disclosure chevron and persist
the per-instrument collapsed state in the session UI state. Toggle
the module and thread groups on a full header-row click. Pad the
module view so its tabs clear the top-left edge.
2026-06-27 15:30:30 +02:00
Ole André Vadla Ravnås 82471eebbe ui: Right-click anywhere on a symbol row
The export/import/symbol tables attached the context menu to the
cell text, so a one-character symbol left almost nothing to hit.
Fill each cell and make it hit-testable.
2026-06-27 04:14:50 +02:00
Ole André Vadla Ravnås 25986e3f1c Give module symbol rows a full-row address menu
Right-clicking anywhere on an export/import/symbol row now opens
the address menu, and its copy item reads "Copy Address". On
macOS each cell carries the menu and hover-warms facts; GTK
already attached the menu to the row, so it just labels the copy
item.
2026-06-25 01:44:57 +02:00
Ole André Vadla Ravnås 9ebb075e39 Show a gated action menu on pointer values
One shared component per frontend renders the value with a
context menu gated by the resolved address facts: Copy, Open
Disassembly when executable, Open Memory when mapped, then the
hook actions. Replace the per-site menus.
2026-06-24 13:23:19 +02:00
Ole André Vadla Ravnås 3d3c10146a Fill module pane when symbols unavailable
Center the detached/error message on both axes instead of
collapsing the pane to its intrinsic height. Let the GTK pane
expand vertically too.
2026-06-22 22:38:32 +02:00
Ole André Vadla Ravnås c6d07ca32a Derive hook and insight names from symbol
Modules-view actions built names via anchor.displayString,
yielding module!symbol for hooks and module+offset for
disassembly/memory insights. Route both through the symbol the
tracer search already uses.

Add AddressAnchor.symbolName; default tracer hook names to it.
Thread the context anchor hint into getOrCreateInsight so
insights opened on exports and imports inherit the symbol name.
Drop the unused title parameter from ModuleDetailView.
2026-06-22 22:26:27 +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 f2f0e0586e swiftui: Hint anchors and smooth module switch
The export, import, and symbol contexts now carry an anchorHint:
exports use moduleExport(name, export); imports do the same when
the import's source module is known; symbols stay anchorless.
"Add Function Hook" therefore lands on the actual symbol name.

Drop the leading top padding and render the picker plus an
empty Table while the symbol bundle loads, so switching between
modules updates row counts in place instead of flashing through
a centered ProgressView.
2026-05-07 19:34:41 +02:00
Ole André Vadla Ravnås 0b68e2c491 swiftui: Refine module symbol detail view
Drop the redundant header that repeated the master row's name
and base address along with the runtime-pointless reload
button. Cache symbol bundles by module ID and stop forcing a
view recreation on each module switch, so re-visiting a module
is instant and switching no longer flickers through a progress
spinner.

Make the per-tab Tables selectable and expose row actions via
contextMenu(forSelectionType:) and primaryAction. The address
menu now offers Open Disassembly + Open Memory in a stable
order without the duplicated entries the previous "default
above the divider, both below" layout produced.
2026-05-07 19:13:15 +02:00
Ole André Vadla Ravnås 128b5980ff swiftui: Wire session detail and .luma directory
Sessions now have a top-level detail pane (Summary / Modules /
Threads) with master-detail panes for module symbols and thread
register snapshots. Sidebar gains a session row, and the ITrace
sidebar entries adopt the unified naming.

ITrace detail decodes the streaming trace data with first-paint
prefix, onProgress, and a Stop control restricted to thread
origins; the timeline paginates past 200 instructions.

The document is now a .luma directory wrapper containing
db.sqlite alongside a traces/ folder. Workspace owns the
ProjectUIState (selection, event-stream layout, collaboration
visibility) and a per-session SessionUIState (detail section,
last selected module/thread). MainWindowView reads/writes these
through Bindings instead of local @State.
2026-05-07 16:46:42 +02:00