Repository navigation
Add web browser mode reusing core services - #11
Merged
Merged
Conversation
Reuse core and main/services for a Node backend that serves the same renderer as a web app: - server/index.ts: HTTP + SSE server (POST /api/rpc, GET /api/events), static hosting of output/build/renderer, 1s timer tick, hardened static path serving. - server/rpc.ts: channel dispatch mirroring IPC_CHANNELS, reusing main/ipc requestValidation and settingsUpdateRequest. - server/composition.ts, clock.ts, noopPorts.ts: service wiring and no-op notification/sound/auto-launch/theme ports. - server/rpc.test.ts: dispatch coverage. - vite.server.config.ts, tsconfig.json, vitest.config.ts: server build and test/coverage wiring.
…notify - renderer/web/api.ts: implements FocusFlowApi over POST /api/rpc and SSE /api/events; system.* degrade to no-ops; theme resolved via matchMedia. - renderer/web/notify.ts: client-side completion notification and beep. - renderer/main.tsx: install the web transport when the Electron preload bridge is absent and flag data-focus-flow-web for web-only styling. - renderer/main.test.tsx: cover the new entry behavior.
- renderer/styles/tokens.css: centered responsive card layout only under data-focus-flow-web (desktop keeps the original full-bleed layout). - renderer/components/WindowTitleBar.tsx: hide window controls on web. - renderer/views/SettingsView.tsx: hide desktop-only settings on web (startup/window group and close-to-tray). - renderer/index.html + renderer/public/favicon.svg: web tab icon.
- package.json: web:dev / web:build / web:start scripts. - vite.web.config.ts: dev Vite config with /api proxy to the API server. - tools/web-dev.mjs: build + run the API server and the renderer dev server.
Resolve the window background from the effective theme (light #ffffff, dark #08192a) instead of the fixed light blue, and update it when the theme changes (settings update or system theme).
- CLAUDE.md: integrate web mode (server/, renderer/web, Web boundary, web commands, routing, verification); make code-review-graph optional; update test baseline. - README.md: merge web mode into the intro/structure, rework development & verification into a concise table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server/) that reusescore/andmain/services/, serving the same renderer as a web app.renderer/web/api.ts) implementing the sameFocusFlowApioverPOST /api/rpcand SSE/api/events.npm run web:dev/web:build/web:start).CLAUDE.mdandREADME.mdfor web mode; makecode-review-graphoptional.Notes / Boundaries
%USERPROFILE%\.focusflow-web\focusflow.sqlite), independent from the desktop userData database.127.0.0.1with no auth by default; exposing it requires explicit config.Verification