Skip to content

Launchpad: consoles and logs in a Ghostty terminal - #499

Merged
Lakr233 merged 2 commits into
mainfrom
launchpad-ghostty-console
Sep 25, 2026
Merged

Lakr233 merged 2 commits into
mainfrom
launchpad-ghostty-console

Conversation

@Lakr233

@Lakr233 Lakr233 commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

The machine inspector drew the guest console as one SwiftUI Text per line and updated it on the main actor for every line of serial output. A chatty guest made Launchpad unresponsive.

  • Console: the inspector's Console section is now an Open Console button (arrow.up.right). It opens a sheet where a Ghostty terminal fills the sheet, with a Close button. The actions menu has Open Console too.
  • Creation log: the log in the creation sheet uses the same terminal. It reads a new ~/Library/Logs/vphone-launchpad/<name>-create.log, written on a serial queue by VPhoneLaunchpadLogWriter.
  • Off the main thread: both terminals replay the file's last 4 MiB, then follow it from a @concurrent task. Ghostty parses on its own queue. Command output callbacks run on the reader thread, and the main actor only hears about panic lines. No log text goes through the app model any more.
  • Theme: the terminal uses the project's light palette (block cursor, blink, font size 10, thicken, window-padding-color = extend) and a dark counterpart with the same ANSI colours. The system appearance picks which one.
  • SMJobBless: it is now looked up at run time in one documented place, so the build no longer shows a deprecation warning. The helper design stays on SMJobBless, since its install, update and client checks depend on it.
  • Adds Lakr233/libghostty-spm 1.6.20260922 (GhosttyTerminal) to the Launchpad project, with Package.resolved pinned for the project and the workspace. The new strings are translated in Localizable.xcstrings.

Testing

  • VPhoneLaunchpad Debug build: succeeds, and none of the warnings come from our sources.
  • The snapshot mode (VPHONE_LAUNCHPAD_SNAPSHOT_DIR) captures the console sheet and the creation log in light and dark.
  • SMJobBless resolves through dlopen and dlsym on this host.
  • Not tested: a real guest's console output, and a helper install. Both need a signed build and a running VM.

🤖 Generated with Claude Code

Lakr233 and others added 2 commits September 25, 2026 14:53
The machine inspector drew the guest console as one SwiftUI Text per
line and updated it on the main actor for every line of serial output,
which made Launchpad unresponsive while a guest printed.

Consoles and the creation log now render in GhosttyTerminal
(Lakr233/libghostty-spm) and are read from their log files:

- The inspector's Console section is an Open Console button. It opens a
  sheet with the terminal filling it and a Close button.
- The creation sheet's log is the same terminal over a new
  <name>-create.log, written on a serial queue by
  VPhoneLaunchpadLogWriter.
- The view replays the file's last 4 MiB and follows it from a
  @Concurrent task. Ghostty parses on its own queue.
- Command output callbacks run on the reader thread. The main actor
  hears only panic lines.
- The terminal uses the project's light palette and a dark counterpart,
  chosen by the system appearance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS 13 deprecated SMJobBless in favour of SMAppService, but it still
works. The helper's install, update and client checks rely on it
(SMPrivilegedExecutables and SMAuthorizedClients), so the helper keeps
using it. The function is now looked up in ServiceManagement with
dlopen and dlsym, in one documented place, instead of leaving a
permanent warning in the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lakr233
Lakr233 merged commit f7f3d3b into main Sep 25, 2026
1 check passed
@Lakr233
Lakr233 deleted the launchpad-ghostty-console branch September 25, 2026 08:12
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