feat(web): show pending items on the installed app icon

Keep the Badging API count equal to the primary list's pending items, update it from optimistic changes and the list's SSE stream (shared across pages), and re-sync when the app returns to the foreground.

On iOS the badge needs notification permission, so Settings offers to enable it; Android does not support numeric web app badges.
This commit is contained in:
Jose Selesan
2026-10-29 14:20:21 -03:00
parent 7ed4d27844
commit aa170de8d1
14 changed files with 432 additions and 45 deletions

View File

@@ -4,6 +4,7 @@ import { MonitorIcon, MoonIcon, SunIcon } from 'lucide-react'
import { useForm } from 'react-hook-form'
import { toast } from 'sonner'
import { z } from 'zod'
import { AppBadgeCard } from '@/components/settings/app-badge-card'
import { PasskeysCard } from '@/components/settings/passkeys-card'
import { type Theme, useTheme } from '@/components/theme-provider'
import { Button } from '@/components/ui/button'
@@ -24,6 +25,7 @@ function SettingsPage() {
<div className="mx-auto grid w-full max-w-2xl gap-4 md:gap-6">
<ProfileCard />
<PasskeysCard />
<AppBadgeCard />
<AppearanceCard />
<Card>