Install Agent Stage Stuck
Nucleic-Session: CC59896F-5A33-43D8-93E0-AD8C2B16E60E Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -209,6 +209,28 @@ final class MacVMComputerSurface: MacVMSurfaceHost {
|
|||||||
view.scrollWheel(with: e)
|
view.scrollWheel(with: e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Append the keyboard-injection preconditions for the base-build VM to a host-readable log, so a
|
||||||
|
/// stuck provisioning run can be diagnosed without eyes on the guest: is the VM window key, is the
|
||||||
|
/// VZ view first responder, is the app active? Provisioning-only (keyed off the base surface name)
|
||||||
|
/// and best-effort — never throws into the input path.
|
||||||
|
private func logHID(_ name: String, _ e: Entry, _ detail: String) {
|
||||||
|
guard name == MacVMEngine.baseProvisionSurfaceName else { return }
|
||||||
|
let keyWin = e.window.isKeyWindow
|
||||||
|
let vzFirstResponder = (e.window.firstResponder === e.view)
|
||||||
|
let line = "\(Date()) \(detail) | keyWindow=\(keyWin) vzFirstResponder=\(vzFirstResponder) "
|
||||||
|
+ "appActive=\(NSApp.isActive) onScreen=\(e.window.isOnActiveSpace && e.window.isVisible)\n"
|
||||||
|
let url = URL(fileURLWithPath: NSTemporaryDirectory())
|
||||||
|
.appendingPathComponent("nucleic-hid-diag.log")
|
||||||
|
guard let data = line.data(using: .utf8) else { return }
|
||||||
|
if let fh = try? FileHandle(forWritingTo: url) {
|
||||||
|
defer { try? fh.close() }
|
||||||
|
fh.seekToEndOfFile()
|
||||||
|
fh.write(data)
|
||||||
|
} else {
|
||||||
|
try? data.write(to: url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func postStroke(_ s: MacVMKeyStroke) {
|
private func postStroke(_ s: MacVMKeyStroke) {
|
||||||
// Two things are load-bearing here:
|
// Two things are load-bearing here:
|
||||||
// • CGEvent backing — `VZVirtualMachineView` derives the guest HID scancode from the event's
|
// • CGEvent backing — `VZVirtualMachineView` derives the guest HID scancode from the event's
|
||||||
|
|||||||
Reference in New Issue
Block a user