Skip to content

Navigation Menu

Sign in
Sign up

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

Draft
matt2e wants to merge 4 commits into
main from
mobile-web
Draft

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

Conversation

@matt2e

@matt2e matt2e commented May 11, 2026

Copy link
Copy Markdown
Contributor

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 force-pushed the mobile-web branch 5 times, most recently from 808c1dd to 075b8bf Compare May 15, 2026 08:15
matt2e force-pushed the mobile-web branch 2 times, most recently from 6b9a11f to 5dcf4a0 Compare June 28, 2026 03:35
matt2e force-pushed the mobile-web branch 3 times, most recently from d42d13f to 9c5f909 Compare July 9, 2026 03:26
matt2e force-pushed the mobile-web branch 2 times, most recently from 62e8088 to b5016a7 Compare July 30, 2026 07:41
matt2e force-pushed the mobile-web branch 2 times, most recently from 60c1853 to c9d8534 Compare August 11, 2026 10:51
matt2e force-pushed the mobile-web branch 3 times, most recently from 55ac096 to fde912a Compare September 3, 2026 05:08
matt2e and others added 4 commits September 4, 2026 17:04
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>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Unauthenticated HTTPS is enough for browser access, so drop the bearer
token / session cookie layer entirely:
- Remove the require_auth middleware, /api/auth endpoint, session
 registry, and token generation from the Axum web server
- Remove the WebAccessToken managed state and get_web_access_token
 Tauri command
- Remove the WebLogin token entry screen, #/login hash routing, and
 401-redirect handling from the frontend transport layer
- Remove the token display/copy section from the settings page
- Drop the now-unused axum-extra, rand, hex, subtle, and time crates
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Encode the "release build + web server" flow from the note so its two traps
aren't rediscovered each time:
- Guard on STAGED_WEB_CERT_PATH/STAGED_WEB_KEY_PATH before building, using
 the same error style as `dev-web` (STAGED_WEB_HOST isn't needed here)
- Build with `tauri build --bundles app`, which regenerates dist/ and skips
 the DMG, keeping the window's embedded assets and the server's on-disk
 dist/ in sync
- Resolve the bundle under CARGO_TARGET_DIR and launch from src-tauri, since
 only the cwd-relative `../dist` candidate resolves for a release binary
- Probe https://localhost:5175/sw.js after launch and report cert/port versus
 missing-dist failures, which release builds otherwise swallow (no logger)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@baxen baxen Awaiting requested review from baxen baxen will be requested when the pull request is marked ready for review baxen is a code owner
@wesbillman wesbillman Awaiting requested review from wesbillman wesbillman will be requested when the pull request is marked ready for review wesbillman is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /