{"record":{"id":"73e32a9f7d92e703","repo":"fyne-io/fyne","slug":"implement-me","errorCode":null,"errorMessage":"implement me","messagePattern":"implement me","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/driver/embedded/window.go","lineNumber":35,"sourceCode":"\nfunc (w *noosWindow) SetTitle(s string) {\n\tw.title = s\n}\n\nfunc (*noosWindow) FullScreen() bool {\n\treturn true\n}\n\nfunc (*noosWindow) SetFullScreen(_ bool) {\n}\n\nfunc (w *noosWindow) Resize(s fyne.Size) {\n\tw.c.Resize(s)\n}\n\nfunc (*noosWindow) RequestFocus() {\n\t// TODO implement me\n\tpanic(\"implement me\")\n}\n\nfunc (*noosWindow) FixedSize() bool {\n\treturn true\n}\n\nfunc (*noosWindow) SetFixedSize(bool) {}\n\nfunc (*noosWindow) CenterOnScreen() {}\n\nfunc (w *noosWindow) Padded() bool {\n\treturn w.c.Padded()\n}\n\nfunc (w *noosWindow) SetPadded(pad bool) {\n\tw.c.SetPadded(pad)\n}\n","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/fyne-io/fyne/blob/8860ee95c356385effa5a7be51adb11c6be9d2b6/internal/driver/embedded/window.go#L17-L53","documentation":"noosWindow is the fake window behind fyne's embedded (offscreen) driver, which powers the public test package (test.NewWindow / test.NewDriver). Most of its methods are silent no-op stubs, but RequestFocus is one of the few that still panics 'implement me' - focusing a window has no meaning without an OS window manager, so it was never implemented.","triggerScenarios":"Calling w.RequestFocus() (directly or through a focus-management helper) on a window created by test.NewWindow or any other embedded-driver window - typical in unit tests that exercise focus behavior.","commonSituations":"Widget/app tests that call production code which itself calls RequestFocus; shared helpers used by both the real app and the test suite; CI suites that only fail on headless test runs.","solutions":["Guard the focus call when running under the test/embedded driver (skip it or wrap with recover in test helpers)","Move focus-dependent assertions to integration tests executed against the real desktop driver","Contribute a no-op RequestFocus for the embedded driver upstream so test windows stop crashing"],"exampleFix":"// before (inside a unit test using fyne.io/fyne/v2/test)\nw := test.NewWindow(entry)\nw.RequestFocus() // embedded driver: panic \"implement me\"\n\n// after\nw := test.NewWindow(entry)\nfunc() {\n    defer func() { _ = recover() }() // RequestFocus unimplemented offscreen\n    w.RequestFocus()\n}()","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Wrap focus calls that may run against the embedded/test driver.\nfunc focusIfSupported(w fyne.Window) {\n    defer func() {\n        if r := recover(); r != nil {\n            // embedded driver has no RequestFocus; safe to ignore in tests\n            _ = r\n        }\n    }()\n    w.RequestFocus()\n}","preventionTips":["Keep RequestFocus out of code paths shared by unit tests, or wrap it once in a guard helper","Assert focus behavior in desktop-driver integration tests, not headless unit tests","When adding new noosWindow methods to test flows, check the embedded driver for stubs first"],"tags":["gui","testing","headless","not-implemented","embedded","go"],"backgroundTag":null,"analyzedSha":"8860ee95c356385effa5a7be51adb11c6be9d2b6","analyzedAt":"2026-08-15T22:01:51.624Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}