diff --git a/index.html b/index.html index 8f75138..d31c65c 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,15 @@ + + + + + + + + + diff --git a/package.json b/package.json index 1c090b3..83a729e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kuannnn/clawtap", - "version": "0.2.1", + "version": "0.2.2", "description": "Mobile UI for AI coding assistants. Real-time sync with Claude Code, Codex CLI, and Gemini CLI via tmux.", "type": "module", "bin": { diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png new file mode 100644 index 0000000..7d3754e Binary files /dev/null and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png new file mode 100644 index 0000000..ac3c4b8 Binary files /dev/null and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..bb3c009 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/maskable-512x512.png b/public/maskable-512x512.png new file mode 100644 index 0000000..78c3ef7 Binary files /dev/null and b/public/maskable-512x512.png differ diff --git a/public/splash/apple-splash-1170x2532.png b/public/splash/apple-splash-1170x2532.png new file mode 100644 index 0000000..4e6ece1 Binary files /dev/null and b/public/splash/apple-splash-1170x2532.png differ diff --git a/public/splash/apple-splash-1179x2556.png b/public/splash/apple-splash-1179x2556.png new file mode 100644 index 0000000..2336e58 Binary files /dev/null and b/public/splash/apple-splash-1179x2556.png differ diff --git a/public/splash/apple-splash-1290x2796.png b/public/splash/apple-splash-1290x2796.png new file mode 100644 index 0000000..1d7cbd3 Binary files /dev/null and b/public/splash/apple-splash-1290x2796.png differ diff --git a/public/splash/apple-splash-2048x2732.png b/public/splash/apple-splash-2048x2732.png new file mode 100644 index 0000000..320e023 Binary files /dev/null and b/public/splash/apple-splash-2048x2732.png differ diff --git a/public/splash/apple-splash-750x1334.png b/public/splash/apple-splash-750x1334.png new file mode 100644 index 0000000..919f9eb Binary files /dev/null and b/public/splash/apple-splash-750x1334.png differ diff --git a/src/components/AdapterSettingsSection.tsx b/src/components/AdapterSettingsSection.tsx index 7dff7b7..164f675 100644 --- a/src/components/AdapterSettingsSection.tsx +++ b/src/components/AdapterSettingsSection.tsx @@ -36,7 +36,7 @@ export function AdapterSettingsSection({ adapter, onBack }: { adapter: string; o return (
-
+
{brand.displayName} Settings diff --git a/src/components/ChatView.tsx b/src/components/ChatView.tsx index f1408fe..576270d 100644 --- a/src/components/ChatView.tsx +++ b/src/components/ChatView.tsx @@ -477,7 +477,7 @@ export function ChatView({ } return ( -
+
{/* Header — auto-hides when scrolling up to view history */}
diff --git a/src/components/SavedInstructionsView.tsx b/src/components/SavedInstructionsView.tsx index a676fe6..b1a79ca 100644 --- a/src/components/SavedInstructionsView.tsx +++ b/src/components/SavedInstructionsView.tsx @@ -42,7 +42,7 @@ export function SavedInstructionsView({ onBack }: { onBack: () => void }) { return (
{/* Header */} -
+
Settings
diff --git a/src/sw.ts b/src/sw.ts index 6e544ba..d9934e6 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -1,11 +1,30 @@ /// import { precacheAndRoute } from 'workbox-precaching'; +import { registerRoute } from 'workbox-routing'; +import { NetworkFirst } from 'workbox-strategies'; declare const self: ServiceWorkerGlobalScope; // Precache static assets (injected by vite-plugin-pwa at build time) precacheAndRoute(self.__WB_MANIFEST); +// Cache stable API responses — show last-known data when offline. +// Exclude volatile real-time endpoints (messages, active sessions, reviews). +registerRoute( + ({ url }) => { + const p = url.pathname; + if (!p.startsWith('/api/')) return false; + if (p.includes('/messages')) return false; + if (p.startsWith('/api/active-sessions')) return false; + if (p.startsWith('/api/reviews')) return false; + return true; + }, + new NetworkFirst({ + cacheName: 'api-cache', + networkTimeoutSeconds: 5, + }) +); + // Push notification handler — server already filters by clientCount, // so we always show the notification if one is received. self.addEventListener('push', (event) => { diff --git a/vite.config.ts b/vite.config.ts index 115b422..2af6a16 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ icons: [ { src: '/pwa-192x192.png', sizes: '192x192', type: 'image/png' }, { src: '/pwa-512x512.png', sizes: '512x512', type: 'image/png' }, - { src: '/pwa-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' }, + { src: '/maskable-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' }, ], shortcuts: [ { @@ -39,7 +39,7 @@ export default defineConfig({ categories: ['developer-tools', 'productivity'], }, injectManifest: { - globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'], + globPatterns: ['**/*.{js,css,html,ico,svg,woff2}', '*.png', 'mascot/*.png'], }, }), ],