r/webdev • u/Turbulent_Rooster_73 • 1h ago
Showoff Saturday [Showoff Saturday] Testing a multi-role web app in one browser: our open-source browser now lets a script or agent work in background tabs, each with its own cookie jar
We make Kelpie, an open-source (Apache-2.0) browser for Mac, Windows, Linux, Android and iOS that you can also drive over HTTP or MCP. This week's change is something I wanted for my own testing, so here's how it works and where it got awkward.
The problem: anything with roles (admin vs member, two people in the same workspace) meant juggling a normal window, a private window and a second browser. And when a script drove the browser, it took over whichever tab was on screen.
Partitions. new-tab takes a partition string. Tabs with the same string share cookies, localStorage and IndexedDB, different strings are fully isolated, and tabs without one use the normal default store. So admin and member can be signed in to the same origin side by side on one device. get-partitions lists them and delete-partition closes their tabs and wipes the store.
Background tabs. Since release/2026-12-04, a tab opened over HTTP, MCP or the CLI opens in the background, and page commands (navigate, click, fill and so on) take a tabId on all five platforms. The tab you're looking at stays where it is.
POST /v1/new-tab {"url": "https://staging.example.com", "partition": "admin"}
-> {"success": true, "tabId": "..."}
POST /v1/click {"tabId": "...", "selector": "#login-button"}
Things that were less obvious than I expected:
- A tab that has never been shown has no size. On Android a hidden WebView would lay out at 0x0, so a background tab is now measured and laid out at the visible tab's width and height. On iOS the WKWebView is created with the active tab's bounds. Without that, your breakpoints are wrong in exactly the tab you're testing (second image).
- Screenshots still need a visible renderer. For background work you read a page snapshot instead, or switch to the tab when you actually want to look at it.
- It's isolation, not parallelism. Commands still run one at a time on each platform's main thread, so two partitions take turns.
- Support differs by engine: macOS on WebKit, Windows and Linux on Chromium (CEF), iOS 17+, and Android when the system WebView supports multi-profile (M114+). macOS on the Chromium engine returns
PARTITION_UNSUPPORTEDwith a hint to switch to WebKit. Mobile partitions are always persistent; desktop can also do memory-only ones. - On Windows and Linux, a CEF request context's
cache_pathhas to be a direct child ofroot_cache_path. Anywhere else and Chromium quietly falls back to memory, so the login is gone after a restart and nothing reports an error. That one took a while to find.
Trying it: install the browser app from https://kelpie.rocks (Mac zip, Windows zip, Linux packages, Android APK; iOS is built from source until the App Store version is out). The HTTP API and the MCP server are part of the app. There's also an optional npm CLI (@unlikeotherai/kelpie) that finds Kelpie browsers on your network over mDNS and pairs with them. It doesn't install the browser.
Repo: https://github.com/UnlikeOtherAI/kelpie
What I'd like feedback on:
- If you test multi-role apps, how do you do it today? Playwright contexts, browser profiles, something else?
- Is "background by default" right for programmatic tabs, or would you expect a new tab to come to the front unless you say otherwise?
- Anything about the partition model that would bite you on a real project?
Images: the first one is a generated concept picture, not a screenshot. The others are real: the tab code from the repo, the partitions doc, and Kelpie on Windows.



