Write in Yellow · a proposal · 16 Oct 2026
One Backend, Two Doors
The desktop app and the web version run the same backend. Right now the small change that makes that possible lives only on the web branch, so every week your new features have to be carried across by hand. Taking that change into the main app changes nothing about how the desktop app behaves, and from then on everything you build works in the browser too, the day you build it.
The idea in one picture
both speak through one transport ↓
The backend file used to talk to Electron directly. The change gives it one thin layer in between. Electron supplies one side of that layer and the web server supplies the other. Not one handler's body changed: all 108 handler registrations kept their exact code. Only the first word of each registration changed.
What changes when you write code
One word per handler
That is the main habit. There are two smaller ones:
- Ask the host for window things. A file dialog, the settings folder or "is this the packaged app" comes from a small
hostobject instead of from Electron directly. On the desktop it opens the same native dialog as today; in the browser it shows a file picker. - One line per new app method. When you add a method to the preload, you add the same method as one row in
src/shared/apiChannels.ts. You don't have to remember: a test drives the real preload and names any row that's missing.
Claude does all three without being asked once your project's CLAUDE.md says so. We would add that paragraph as part of the change.
This week, as a worked example
What carrying your work across costs now
Your last six pull requests are wonderful: Fitz reading your notes, Beats as the home for outlines, outlines that create chapters, and rename, reorder and move with every link following. Bringing them into the web version takes this much hand work:
| Hand work to bring this week's features to the browser | Without the shared layer | With it |
|---|---|---|
| New backend handlers rewritten for the web | 10 | 0 |
| Desktop-only file dialogs rebuilt for the browser | 1 | 0, the host handles it |
| Channel rows added after the fact | 11 | 0, written as you go |
| Merge conflicts in the backend file | every week | rare |
| Days before testers in the browser see it | after a sync | the same day |
To be fair about it: some conflicts will still happen. Fitz's guided-tour work touches the same screens you're improving, such as the chapter list and the Beats margin, so those need a careful merge either way. The shared layer removes the backend conflicts, which are the costly and repetitive ones.
The honest ledger
Costs small
- One review. A single pull request against your latest main: 43 files, about 2,700 lines, most of them new files for the web server that the desktop app never loads.
- Three habits, described above. Tests remind you of two of them.
- A guard test. It fails if anything outside two files imports Electron. Now and then it will ask you to route something through the host.
- One small package.
ws(pure JavaScript, no native code) joins the dependencies, so it's included in the desktop download. It adds about 150 KB to the installer. - A few new commands (
npm run web:dev,web:build). You never have to run them.
Benefits large
- Everything you build works in the browser at once. Nobody ports your features by hand, and nothing gets lost in translation.
- Testers see your work the day you merge it. No installer and no download. They just get a link.
- A route to the hosted beta. Outside writers can try the app in a browser with Fitz switched off, so their words never reach Claude.
- Better tests for you. The whole backend can be driven over HTTP in a test, including two tabs at once. That's how we proved a change can't land in the wrong project.
- Fitz's guided tours and lessons are built on the same layer. When that work is ready for you, it arrives as a clean pull request.
- Syncing becomes routine. Week after week the remaining merges get smaller and the hand-porting stops.
What does not change
The desktop app behaves exactly as it does today. The same windows, dialogs, menus, shortcuts, autosave, quit-time save and packaging. Your whitelist packaging still ships only the built app; the web server is built separately and never goes into the installer.
Your projects, their files and their git history are untouched. No setting moves. Your existing tests keep passing; the change adds new ones beside them.
What happens meanwhile
Whatever you decide, this week's six pull requests are being brought into the web version now. That work happens on a separate copy and doesn't touch your repository. If you say yes, the pull request we send you will be built on top of your latest main, so it merges cleanly.
The one question
Would you like a pull request that brings the shared layer into your main app? It changes nothing you can see in the desktop app, and from then on your features reach the browser by themselves.
Reply with a yes, a no, or "show me the pull request first". All three are fine.