feat: mobile UI scaffold + desktop build wiring + dev port scheme (17687/5179)#1
Merged
Merged
Conversation
added 2 commits
July 18, 2026 00:11
Adds the three-screen MVP on top of @echohello/client:
- connect: manual ws:// endpoint + label, saved to AsyncStorage,
connects via SupaplaneClient
- sessions: workspace list grouped by freshness, tap to drill in
- session: transcript + composer (send/abort/start) bound to
ClientCommand wire types
Shared infrastructure:
- zustand connection-store: single SupaplaneClient instance,
status, workspaces, sessions, per-session event buffer
- AsyncStorage wrapper (v3 API: setMany/removeMany) for the
saved endpoint and TOFU-pinned server fingerprint
- dark theme tokens, Button, TextField, ConnectionBanner
Bundler plumbing: metro.config.cjs with explicit watchFolders
and nodeModulesPaths so Bun's hoisting doesn't trip the
resolver on a monorepo root.
Co-authored-by: opencode <opencode@echohello.dev>
Desktop build wiring:
- packages/desktop/tsconfig.build.json emits ESM to dist/
- packages/desktop/package.json: dev now runs tsc -> electron
- main.js (dist) replaces main.ts as the package entry, and
preload.js resolves to the dist sibling
- @echohello/server and @echohello/protocol exports point at
dist/ so Electron's Node can resolve them. Run
'bun run build:server' (or 'bun run build') before
'desktop dev'.
Dev port scheme (avoiding Paseo + Vite + Metro defaults):
- Daemon listenPort: 6767 -> 17687 (IANA-sparse range,
visually echoes 6767)
- Vite port: 5173 -> 5179 (adjacent to Vite default so it
reads as 'the Supaplane Vite port')
- vite.config.ts reads SUPAPLANE_DAEMON_PORT and VITE_PORT
envs; defaults updated
- AGENTS.md + docs/development.md updated to reflect the
new ports
Server hygiene:
- daemon-keypair.ts: replace require('node:crypto') with
a top-level import so it builds cleanly to ESM
Co-authored-by: opencode <opencode@echohello.dev>
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
Two commits covering the mobile UI MVP, the desktop-shell build gap,
and a port scheme that gets the dev loop off Paseo / Vite / Metro defaults.
Mobile UI scaffold (
feat(app): scaffold mobile UI for connect/sessions/transcript)Three screens on top of
@echohello/client:ws://endpoint + label, persists to AsyncStorage,drives
SupaplaneClient.connect()send/abort/start)bound to
ClientCommandwire typesShared infra:
zustandconnection-store owns a singleSupaplaneClientinstance,status, workspaces, sessions, and a per-session event buffer
setMany/removeMany) for the savedendpoint and TOFU-pinned server fingerprint
Button,TextField,ConnectionBannerBundler plumbing:
metro.config.cjsdeclares explicitwatchFoldersandnodeModulesPathsso Bun's hoisting doesn't tripMetro when resolving
app/screens from a monorepo root.Desktop build wiring + dev port scheme (
chore(dev): wire desktop build + shift dev ports off 6767/5173)The existing
desktop/dev: electron .was broken — Electron's Nodecouldn't load TS or follow
.jsimport paths into.tssources.Now:
packages/desktop/tsconfig.build.jsonemits ESM todist/packages/desktop/package.jsondevrunstscthenelectron@echohello/serverand@echohello/protocolexportspoint atdist/so Electron's Node can resolve them. Runbun run build:server(or fullbun run build) beforedesktop dev.daemon-keypair.ts: replacedrequire('node:crypto')with top-levelrandomBytesimport so it builds cleanly to ESM.Dev port scheme (verified against the IANA port list — the 17000–17999
range has only 10 registered ports; 5174–5189 are all unassigned):
1Verification
Manually ran the full stack end-to-end:
Env overrides remain available:
SUPAPLANE_LISTEN_PORT,SUPAPLANE_DAEMON_PORT,SUPAPLANE_WEB_PORT,VITE_PORT.Test status
connection-offer.test.tssupaplane.runbut the encoder producessupaplane.com; unrelated to this PR)config.test.tslistenPort === 6767, updated to17687)Net: 3 → 2 pre-existing failures, 0 new failures.
Consequences
@echohello/{protocol,server}exportsnow resolve todist/rather than
src/. Anyone importing these workspaces from Node(not via Bundler resolution) must run
bun run buildfirst.Mobile/Vite/web keep working via their bundler resolution.
5173. Any external tooling thathard-codes
5173(browser bookmarks, scripts) needs to be updatedto
5179.6767. The CLI defaults incli/src/commands/daemon.tsstill say6767in their help text(left intentionally — they're display strings); env override is
available via
--endpoint.Testing
bun run typecheckcleanbun run buildcleanbun test(no new failures; one pre-existing failure now passes)5179) + Electron-rendered web +embedded daemon (
17687) — health endpoint responds, WS session opensexportsflip