Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0a0a0a" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<title>Valet</title>
<meta name="description" content="AI coding agent platform — background sessions with full dev environments" />
<meta property="og:type" content="website" />
Expand Down
Binary file added packages/client/public/icons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/client/public/icons/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/client/public/icons/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions packages/client/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Valet",
"short_name": "Valet",
"description": "AI coding agent platform — background sessions with full dev environments",
"start_url": "/",
"display": "standalone",
"background_color": "#0a0a0a",
"theme_color": "#0a0a0a",
"icons": [
{
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/icons/icon-512-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
22 changes: 22 additions & 0 deletions packages/client/public/sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// TODO: Integrate ACP (Agent Client Protocol) to enable connecting Valet to local
// coding agents and vice versa. This PWA is the foundation for a native-feeling
// desktop experience that can bridge cloud-hosted agent sessions with local dev tools.

// Minimal service worker for PWA installability.
// This does NOT provide offline support or caching — it simply satisfies
// Chrome's PWA install criteria (a registered service worker with a fetch handler).

self.addEventListener('install', (event) => {
// Activate immediately — no waiting for existing clients to close
self.skipWaiting();
});

self.addEventListener('activate', (event) => {
// Claim all open clients so the SW is controlling pages right away
event.waitUntil(self.clients.claim());
});

self.addEventListener('fetch', (event) => {
// Pass all requests through to the network (no caching)
event.respondWith(fetch(event.request));
});
9 changes: 9 additions & 0 deletions packages/client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ createRoot(rootElement).render(
<App />
</StrictMode>
);

// Register service worker for PWA install support
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').catch(() => {
// Service worker registration failed — non-critical for app functionality
});
});
}
Loading