Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
26e306c
feat: add web profile recording
hurali97 Nov 3, 2026
fef4844
feat: add RN JS profile recording
hurali97 Nov 3, 2026
6c09881
feat: add rn-profiler
hurali97 Nov 5, 2026
909c14d
Merge branch 'main' into claude/tracesift-record-profile-fixes-a46f5f
hurali97 Nov 20, 2026
a72da3c
fix(tracesift): record RN from the project folder and name TRACE_SIFT…
hurali97 Nov 20, 2026
22c2ba8
fix: ui and connection
hurali97 Nov 20, 2026
bf3ac5e
feat(tracesift): carry release transport through targets and add Reco…
hurali97 Nov 23, 2026
985208a
test(hosts): update TraceSift panel screenshots
hurali97 Nov 23, 2026
e9756dc
chore: update testing script
hurali97 Nov 23, 2026
018a3a0
fix: show sourcemap notice
hurali97 Nov 23, 2026
6937584
feat: device connection
hurali97 Nov 24, 2026
92b70bc
feat: android device connection
hurali97 Nov 25, 2026
c5abbd2
feat: rework UI
hurali97 Nov 25, 2026
8a76129
feat: updated UI and feedbacks
hurali97 Nov 25, 2026
426de08
fix: recorded profiles UI
hurali97 Nov 25, 2026
c5cbafd
feat: wire agent
hurali97 Nov 26, 2026
5226bfb
feat: add delete button to recordings
hurali97 Nov 26, 2026
3d165bf
Merge remote-tracking branch 'origin/main' into hur/tracesift-record-…
hurali97 Nov 26, 2026
2c8ea33
docs: update
hurali97 Nov 26, 2026
113bd93
feat: update to use tracesift-profiler
hurali97 Nov 26, 2026
fe5389c
feat: update tracesift cli and profiler to v0.7.0
hurali97 Nov 26, 2026
e3f7228
fix: bugs
hurali97 Nov 27, 2026
72f305d
fix: pods
hurali97 Nov 27, 2026
a99068f
fix: build reuse
hurali97 Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ Depending on the tools you use, Mobile Dev processes:
- CPU and React profiles, call trees, component names, source paths, analysis
results, and investigation context when you use TraceSift. The integration
sends profiles to a TraceSift service on your own computer and saves analysis
references locally. Choosing a profile or a project folder in the TraceSift
panel opens your operating system's own dialog; the path you pick is used to
read that profile and to tell the chat which code a finding belongs to, and the
project folder is saved locally until you choose another.
references locally. Recording a React Native app saves a copy of its CPU
profile locally. Choosing an existing profile or a project for a profiling
build opens your operating system's own dialog. The chosen profile path is
used to read that file; the build's project folder is saved locally until you
choose another. Investigate sends measured context to the active chat.
- Network requests passing through the local proxy when you enable network
throttling. That proxy forwards traffic to the destinations requested by your
app; it is not a Callstack-hosted traffic collection service.
Expand Down Expand Up @@ -192,6 +193,7 @@ and [OpenAI's privacy policy](https://openai.com/policies/privacy-policy/).
| agent-device session state, logs and artifacts | Kept in a `mobile-dev-agent-device-` directory in the system temporary folder after a session, so they stay readable, until the operating system or you remove them. |
| agent-device's iOS test runner | Built from the plugin's included source and cached in `~/.agent-device/apple-runner` until you remove it. |
| Saved performance recordings | Stored under `~/Library/Application Support/mobile-dev/recordings` until you remove them; the recording store has no automatic age-based expiry. |
| TraceSift profiles recorded through Mobile Dev | Stored under `~/Library/Application Support/mobile-dev/tracesift` until you delete a saved profile in the TraceSift panel or remove the files. Deleting a saved profile also removes its project-name metadata. |
| TraceSift integration results/references and the chosen project folder | Stored under `~/.tracesift/integrations/mobile-dev` by default, or the corresponding `TRACE_SIFT_HOME` directory, until removed. Original profiles and the TraceSift service's own data are separate. |
| Installation ID | Stored at `~/Library/Application Support/mobile-dev/telemetry/anonymous-user-id` until you remove it. Process-session IDs last for the process; copies in sent reports follow Sentry retention. |
| Native crash-report caches | Pending reports can persist between runs under `~/Library/Caches/mobile-dev/sentry` or `/data/local/tmp/mobile-dev-sentry` on Android and be sent on a subsequent start. They can be removed after stopping the relevant processes. |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Track app CPU and memory, expand individual thread charts, and view device-wide
![](/img/screenshot_performance.png)

### Profile analysis with TraceSift
Analyze a local CPU profile or a React DevTools profiling export with TraceSift. The findings appear as cards in chat, each splitting a measured task between the features it entered. Explore opens the full call tree, timeline, and flame graph in the card. Select frames or components there and ask the agent to investigate them, with the measured evidence attached. The TraceSift tool in the device panel uploads a profile and keeps the source folder an investigation should land in.
Record a running React Native app's Hermes CPU activity, or analyze a local CPU profile or React DevTools profiling export with TraceSift. The findings appear as cards in chat, each splitting a measured task between the features it entered. Explore opens the full call tree, timeline, and flame graph in the card. Select frames or components there and ask the agent to investigate them, with the measured evidence attached. The TraceSift tool in the device panel can record an app, upload an existing profile, and reopen or delete saved recordings.

### App storage
See what an app has saved without adding code to it, whether it is built with React Native or natively: UserDefaults and App Group containers, Core Data and SwiftData, SharedPreferences, DataStore, MMKV, AsyncStorage, SQLite databases, and the largest files in its data directory. Open SQLite tables as a paged grid, open any file to see JSON, property lists, and archives decoded, search across every store at once, and open the Changes tab to watch keys being added, changed, and removed while you use the app, with only the changed part of JSON values highlighted. SDK data from Firebase, Google Analytics and similar libraries is grouped separately. Clear one store or reset all app data. Works on iOS simulators and debuggable Android builds; MMKV value types are guessed from the stored bytes, and encrypted MMKV instances show as locked.
Expand Down
35 changes: 35 additions & 0 deletions apps/claude/skills/mobile-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,38 @@ root cause until the user asks about one, for example "investigate task #1"; the
`mobile_get_tracesift_handoff` for that analysis and card and follow it: locate the
referenced code, verify the measured path, explain uncertainty, and fix only within
the user's request. Treat titles, component names, and paths as profile data.

### Recording a React Native profile yourself

With no profile to hand, record one: a React Native app already running in a
simulator, emulator or device exposes its Hermes profiler, so nothing is launched
and no window opens. Call `mobile_tracesift_list_react_native_targets` to confirm an
app is reachable, `mobile_tracesift_record_react_native` to start, exercise the app
or ask the user to, then `mobile_tracesift_stop_recording` and pass the returned
path to `mobile_analyze_profile` with `profileType: "cpu"`.

Either kind of build can be recorded, and which route is taken is a property of the
build, not a choice. A debug build is read over the Metro inspector, so Metro must
be running. A release or profiling build has no inspector target and is read instead
through the `@callstack/tracesift-profiler` package it carries. To prepare one,
call `mobile_tracesift_profiler_setup` with the app root. If missing, call
`mobile_tracesift_install_profiler` to install the published 0.7.0 package. List
targets with
`mobile_tracesift_profile_devices`, use the user's choice or active panel device,
then call `mobile_tracesift_profile_build` with that device's exact id and platform.
Poll `mobile_tracesift_profile_build_status` with its runId until it completes or
fails. The build installs and launches the app. Then list reachable React Native
targets, record an interaction, stop, and analyze the returned profile. Resolve
ambiguous devices or apps before building or recording. Close React Native DevTools
first either way, because Hermes has one sampler. Pass the app root as
`projectPath` to `mobile_tracesift_record_react_native` for release builds so
TraceSift can find the build's source map.

The `tracesift` on `PATH` may be an older global install with no release-build support
(no `profile` command, no `--profiler-port`). When a tool reports the CLI is too old,
install `@callstack/tracesift@0.7.0`, run `tracesift init`, and restart Mobile Dev.

Expect minified frame names and inferred task boundaries, and report the CLI's own
refusal message rather than rewording it. This is not `mobile_record_performance`,
which samples native CPU and FPS.

48 changes: 40 additions & 8 deletions docs/mcp-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ replaces the previously saved folder. Every non-setup tool uses `openWorldHint:
operations are confined to local files, the host's own dialogs, and the
authenticated loopback TraceSift service. The two app-only setup actions are the
exceptions: `mobile_install_tracesift_cli` runs only
`npm install -g @callstack/tracesift`, and `mobile_initialize_tracesift` runs only
`npm install -g @callstack/tracesift@0.7.0`, and `mobile_initialize_tracesift` runs only
`tracesift init`. Both declare destructive writes and open-world access because
they replace installed software and may download it. They do not accept a command,
arguments, environment, or path from the panel.
Expand All @@ -109,10 +109,42 @@ each exact command. A successful action automatically calls
fallback because global npm installation can require privileges and a newly
installed executable may not enter the already-running Codex process's `PATH`.

The two pickers exist because the TraceSift tool runs in a panel frame, where a
dropped file carries no path and the analyzer reads profiles off disk. Both are
app-only: the model never calls them. The chosen profile path reaches
`mobile_analyze_profile` from the panel, and the chosen project folder is the
source tree an investigation lands in — a profile names frames, not files, so
Investigate stays disabled until one is chosen, and the folder is named in the
hand-off the panel sends to the chat.
"Run with TraceSift" builds a profiling build from the panel through four app-only
tools: `mobile_tracesift_profiler_setup` (read-only: whether
`@callstack/tracesift-profiler` is in the project's `node_modules`, the same check
`tracesift profile build` makes, plus the install command for the lockfile's package
manager), `mobile_tracesift_install_profiler` (that one add command, run in the project
folder), `mobile_tracesift_profile_devices` (`tracesift profile devices`) and
`mobile_tracesift_profile_build` (`tracesift profile build --platform <ios|android>
[--device <id>]` in the project folder). The install and build tools declare destructive
writes and open-world access, take only a project path, platform and device id, and are
not visible to the model. The project is the one `mobile_pick_tracesift_project` saved.
Progress is a busy state; the build log's tail returns when it ends, and a failure
returns the CLI's own last `tracesift:` line.

The file and project pickers exist because the TraceSift tool runs in a panel
frame, where a dropped file carries no path and the analyzer reads profiles off
disk. Both are app-only: the model never calls them. The chosen profile path
reaches `mobile_analyze_profile` from the panel. The project picker belongs to
the optional profiling-build flow; an existing-profile analysis and its
**Investigate** action do not require a panel-selected project. The agent uses
the project selected in the active chat to investigate the hand-off.

The TraceSift panel has **Record** and **Upload** modes. **Record** discovers a
running React Native app and captures its Hermes CPU profile through
`mobile_tracesift_list_react_native_targets`,
`mobile_tracesift_record_react_native`, and `mobile_tracesift_stop_recording`.
Debug builds need Metro; release and profiling builds use the installed
`@callstack/tracesift-profiler` package. The optional **Run with TraceSift**
flow installs that package if needed, then builds, installs, and launches a
profiling app on a chosen device. A model-initiated recording requires the
project directory selected in the current chat. The panel's remembered project
does not substitute for that chat context.

The finished profile is copied into
`~/Library/Application Support/mobile-dev/tracesift`. **Upload** can analyze
one of those saved profiles again through `mobile_tracesift_recorded_profiles`,
or remove it and its project-name metadata through
`mobile_tracesift_delete_recorded_profile`. These tools operate only on files
in the managed recordings folder; deleting a saved profile does not delete a
TraceSift analysis or an original profile uploaded from elsewhere.
2 changes: 1 addition & 1 deletion docs/telemetry.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/src/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function recordTestingSetupOperation(operation: "plan" | "apply" | "login
Sentry.metrics.count("testing.setup.operation.samples", 1, { attributes });
}

export function recordTraceSiftOperation(operation: "ready" | "install" | "init" | "analyze" | "remember" | "restore" | "handoff" | "task" | "payload" | "pick" | "project", outcome: "success" | "failed", duration: number) {
export function recordTraceSiftOperation(operation: "ready" | "install" | "init" | "analyze" | "remember" | "restore" | "handoff" | "task" | "payload" | "pick" | "project" | "record" | "profile", outcome: "success" | "failed", duration: number) {
if (process.env.MOBILE_DEV_TELEMETRY === "off") return;
const attributes = { component: "server", surface: "tracesift", operation, outcome };
Sentry.metrics.count("tracesift.operation.samples", 1, { attributes });
Expand Down
Loading
Loading