Problem
In desktop/ggcode-desktop-wails/notifications.go, the Notify() method (lines 94-99) contains dead code that was intended to emit a frontend event for the in-app notification center, but the actual runtime.EventsEmit call is missing.
// Also emit to frontend for in-app notification center
if ctx != nil {
if c, ok := ctx.(interface{}); ok { // Always succeeds — everything implements interface{}
_ = c // ctx is used by runtime.EventsEmit below ← NO EventsEmit CALL EXISTS!
}
}
The type assertion ctx.(interface{}) is a no-op (any value satisfies the empty interface), _ = c discards the result, and the comment references a runtime.EventsEmit call that was never written.
File and Lines
desktop/ggcode-desktop-wails/notifications.go lines 94-99
Trigger Scenario
- User switches to another application (window not focused)
- Agent completes a long-running task
app.go calls nm.Notify("GGCode", "Task completed")
- OS-level notification appears correctly ✓
- Dock badge updates correctly ✓
- Frontend notification center never receives the event ✗
Expected vs Actual Behavior
Expected: The frontend should receive a "notification" event so any in-app notification UI (notification center, toast, history) can display it.
Actual: No frontend event is emitted. The dead code block does nothing. Any in-app notification center UI is non-functional.
Evidence
notifications.go has zero EventsEmit calls
app.go (line 191) shows the correct pattern: runtime.EventsEmit(a.ctx, ev.name, ev.payload)
nm.ctx is stored as interface{} (typed as runtime.Context) specifically to enable EventsEmit, but the call was never implemented
Severity
Medium — OS-level notifications still work, so users aren't completely missing notifications. However, the in-app notification center feature is silently broken.
Fix Suggestion
Replace the dead code with an actual event emission:
// Also emit to frontend for in-app notification center
if ctx != nil {
runtime.EventsEmit(ctx, "notification", map[string]string{
"title": title,
"body": body,
})
}
Note: nm.ctx is already stored as interface{} to avoid import cycles, and runtime.EventsEmit accepts interface{} as its first argument.
Problem
In
desktop/ggcode-desktop-wails/notifications.go, theNotify()method (lines 94-99) contains dead code that was intended to emit a frontend event for the in-app notification center, but the actualruntime.EventsEmitcall is missing.The type assertion
ctx.(interface{})is a no-op (any value satisfies the empty interface),_ = cdiscards the result, and the comment references aruntime.EventsEmitcall that was never written.File and Lines
desktop/ggcode-desktop-wails/notifications.golines 94-99Trigger Scenario
app.gocallsnm.Notify("GGCode", "Task completed")Expected vs Actual Behavior
Expected: The frontend should receive a
"notification"event so any in-app notification UI (notification center, toast, history) can display it.Actual: No frontend event is emitted. The dead code block does nothing. Any in-app notification center UI is non-functional.
Evidence
notifications.gohas zeroEventsEmitcallsapp.go(line 191) shows the correct pattern:runtime.EventsEmit(a.ctx, ev.name, ev.payload)nm.ctxis stored asinterface{}(typed asruntime.Context) specifically to enableEventsEmit, but the call was never implementedSeverity
Medium — OS-level notifications still work, so users aren't completely missing notifications. However, the in-app notification center feature is silently broken.
Fix Suggestion
Replace the dead code with an actual event emission:
Note:
nm.ctxis already stored asinterface{}to avoid import cycles, andruntime.EventsEmitacceptsinterface{}as its first argument.