Skip to content

feat(studio): diagnostics polish#91

Merged
pbertsch merged 1 commit intomainfrom
feat/studio-diagnostics
May 3, 2026
Merged

feat(studio): diagnostics polish#91
pbertsch merged 1 commit intomainfrom
feat/studio-diagnostics

Conversation

@pbertsch
Copy link
Copy Markdown
Contributor

@pbertsch pbertsch commented May 3, 2026

Summary

Three small frontend improvements that make Studio less mysterious when things go wrong. v0.7.1 PR 3 of 3.

Changes

1. `enrichError(msg)` — actionable hints in error toasts

Connection error messages today are honest but bare ("iproxy not found"). The new helper appends a one-line fix:

Pattern matched Hint appended
`iproxy` `Fix: brew install libimobiledevice`
`idevicesyslog` `Fix: brew install libimobiledevice (idevicesyslog ships with it)`
`adb` + `not found` `Fix: install Android SDK platform-tools and ensure adb is on your PATH`
`token` + `(not found|timeout)` `Fix: confirm your Flutter app is running with --dart-define=PROBE_AGENT=true`
`PROBE_AGENT` `Fix: rebuild your Flutter app with --dart-define=PROBE_AGENT=true`
`refused|reset by peer|EOF` `Fix: the agent process likely isn't running. Start your Flutter app and try again.`

Wired into both `Connect` and `ConnectWiFi` error paths.

2. Status indicator tooltip

The dot + status text now carry a `title` showing device id, transport (USB / WiFi), and last error. Hover to see the full picture without consuming toolbar real estate.

3. Inspector search box

Text input in the inspector pane title scrolls the `

` to the first line containing the query. `MutationObserver` re-anchors the scroll on each live device-stream frame, so the matched line doesn't jump back to the top when the tree refreshes.

Test plan

  • `tsc --noEmit` clean
  • `go build ./...` + `go vet` clean (no Go changes — purely frontend)
  • Manual: enrichError — disconnect a USB cable mid-connect, verify the toast includes a fix hint
  • Manual: tooltip — hover the status dot after connecting, verify it shows device id + transport
  • Manual: inspector search — connect, type "Scaffold" in the search box, verify the `
    ` scrolls to the first occurrence and stays anchored across live updates

Three small improvements that make Studio less mysterious when things
go wrong.

1. enrichError(msg) — when a connection fails, the toast/status now
   includes a one-line actionable hint. Today's errors are honest
   ("iproxy not found") but leave the user to look up the fix; the
   enriched output ("Fix: brew install libimobiledevice") closes that
   gap. Patterns covered: iproxy/idevicesyslog missing, adb missing,
   token timeout/not found, missing PROBE_AGENT define, connection
   refused/reset.

2. Status indicator tooltip — the dot + status text now have a title
   attribute showing device id, transport (USB / WiFi), and last
   error. Hover over the indicator to see what Studio is actually
   connected to without taking up toolbar space.

3. Inspector search box — text input in the inspector pane title
   scrolls the <pre> to the first line containing the query.
   MutationObserver re-anchors the scroll on each live frame from the
   device stream, so the matched line doesn't jump back to the top
   when the tree refreshes.

Pure frontend change.
@pbertsch pbertsch requested a review from a team as a code owner May 3, 2026 00:11
@pbertsch pbertsch merged commit 5479a15 into main May 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant