Skip to content

feat(staged): add browser-accessible web mode#709

Draft
matt2e wants to merge 3 commits into
mainfrom
mobile-web
Draft

feat(staged): add browser-accessible web mode#709
matt2e wants to merge 3 commits into
mainfrom
mobile-web

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented May 11, 2026

Summary

  • Adds a web server mode that serves the Staged UI via HTTP, enabling browser-based access without the Tauri desktop shell
  • Implements a transport abstraction layer so the frontend can communicate over either Tauri IPC (desktop) or HTTP/WebSocket (web)
  • Broadcasts web project setup progress events and fixes missing function arguments in web server handlers

Test plan

  • Verify desktop app continues to work normally via Tauri IPC
  • Start the web server and confirm the UI loads in a browser
  • Test session launching, branch operations, and event streaming via the web transport
  • Confirm rebase/squash pipeline commands work through the web API

@matt2e matt2e force-pushed the mobile-web branch 3 times, most recently from d4f956c to 863dbf1 Compare May 12, 2026 09:41
matt2e and others added 3 commits May 13, 2026 17:15
Restore the full Axum HTTPS web server (previously stubbed) and implement
the frontend transport layer for running Staged in a browser. This enables
phone and desktop browser access to a running Staged instance.

Key changes:
- Unstub web_server::start() with TLS listener, static file serving, and
  auth-protected API routes
- Add HTTP transport in invokeCommand() that POSTs to /api/invoke/{command}
  with automatic 401 redirect to login
- Add WebSocket singleton for server-sent events in web mode
- Add WebLogin.svelte token entry screen with /api/auth session cookie flow
- Implement localStorage backend for persistentStore in web mode
- Expose web access token via Tauri command and settings UI with copy button
- Add `just dev-web` recipe requiring HTTPS cert/key env vars
- Add writeClipboardText/readClipboardText web fallbacks in transport layer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Bring over changes from reload-when-i-leave-web branch:
- Add service worker and web app manifest for PWA support
- Add core SWR cache infrastructure with IndexedDB persistence
- Wire commands to SWR cache with post-mutation invalidation
- Add event-driven cache invalidation for real-time updates
- Add Page Lifecycle integration for cache staleness detection
- Add Tier 2/3 caching and LRU eviction for cache size management
- Wire components to re-fetch data on cache-stale events
- Remove caching from side-effectful refresh commands

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Use definite assignment assertion for self-referencing promise variable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant