feat(driver): add FocusedWindowChecker capability

This commit is contained in:
pj committed 2026-05-31 14:30:36 +05:30
1 parent 2fe01ea254
commit 3fe92537be
2 files changed
+22

No files matched your search

+12
View File
@@ -47,6 +47,18 @@ type ForegroundChecker interface {
ForegroundApp(ctx context.Context) (string, error)
}
// FocusedWindowChecker is the optional capability for reporting which app owns
// the focused (on-screen) window. The startup gate prefers it over
// ForegroundChecker: the resumed-activity signal flips to a freshly launched
// app before its first frame draws, so observing on it alone can capture the
// previous app's screen. The focused window only names the app once its window
// is actually up.
type FocusedWindowChecker interface {
// FocusedWindowApp returns the package owning the focused window, or ""
// when no window is focused yet (e.g. mid-launch transition).
FocusedWindowApp(ctx context.Context) (string, error)
}
type LogEntry struct {
UnixMillis int64
Level string