Skip to content

[Feature]: In-app error alert system to notify users of runtime errors #33

Description

@MRAKS05

Problem

Currently when errors occur in the app runtime, there is no visible feedback to the user. Errors may be silently handled (e.g., Gemini API failures fall back to local detection without notifying the user), or raw error strings are dumped directly in the UI (e.g., "ERROR: HTTP 404 Not Found - invalid endpoint" is shown as-is in Toasts and logs).

Specific pain points from the codebase

  • GeminiClient.kt: Error messages like "ERROR: HTTP $code $message" are returned as raw strings and propagated up to the UI with no user-friendly wrapping
  • SettingsScreen.kt (lines 169-177): "Test Gemini Connection" button shows raw error output via Toast.makeText() — user sees "ERROR: HTTP 401 Unauthorized" instead of something helpful
  • BrowserDetector.kt (lines 64-67): When Gemini fails, it silently falls back to the local browser list with no user notification
  • DashboardScreen.kt (line 138): Shows "Limit Reached" for Gemini quota but no other error states
  • AppInstallReceiver.kt (line 49): Shizuku uninstall failures are only logged, never shown to the user

Proposed Solution

Implement a centralized in-app error alert system that surfaces runtime errors to the user in user-friendly language.

Requirements

  • User-friendly error messages: Translate raw API errors (HTTP codes, exceptions) into clear, actionable messages. E.g.:
    • "ERROR: HTTP 401 Unauthorized""Your Gemini API key is invalid — check it in Settings"
    • "ERROR: HTTP 429 Too Many Requests""Daily Gemini quota reached — try again tomorrow"
    • "Connection refused""Cannot reach Gemini servers — check your internet"
  • Snackbar-based system for transient errors (non-intrusive, auto-dismissing)
  • Notification channel for important errors when app is in background
  • Error log accessible from Settings for reviewing recent failures
  • Should cover: Shizuku failures, Gemini API errors, permission denials, service crashes

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: engineBrowserDetector, GeminiClient, ShizukuUninstaller, BrowserDatabasearea: uiScreens, navigation, composables, themingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions