Skip to content

feat(serve): multi-tab host and Electron loopback PoC / serve 多 Tab 与 Electron 实验壳 - #7923

Draft
SivanCola wants to merge 1 commit into
esengine:main-v2from
SivanCola:feature/electron-serve-multi-tab
Draft

feat(serve): multi-tab host and Electron loopback PoC / serve 多 Tab 与 Electron 实验壳#7923
SivanCola wants to merge 1 commit into
esengine:main-v2from
SivanCola:feature/electron-serve-multi-tab

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • Add internal/tabhost multi-Controller runtime and reasonix serve --multi-tab /tabs… HTTP+SSE routes for concurrent project tabs.
  • Add internal/desktopsidebar + /desktop/* APIs so Electron and Wails share desktop-projects.json / topic metadata for project tree and topic CRUD.
  • Ship experimental electron-poc/ shell (loopback serve supervision, same-origin proxy, HttpSseHost, multi-tab desktop UI wiring). Official product remains Wails.

Scope / non-goals

  • In: multi-tab chat, open project, tab switch, sidebar tree/topics, shell auth cookie pin, dual-project smoke.
  • Out / deferred: Terminal PTY, Remote SSH, Bot IM runtime, Heartbeat, full Settings write-back, production Electron packaging/updater.

Test plan

  • go test ./internal/tabhost/ ./internal/desktopsidebar/ ./internal/serve/
  • cd electron-poc && npm test
  • npm run smoke:dual-project (with local REASONIX_BIN)
  • Manual Electron: add project, multi-tab switch, transcript isolation
  • CI green on draft PR

Add tabhost multi-Controller runtime, serve --multi-tab /tabs APIs, and
desktopsidebar metadata shared with Wails project-tree files. Ship an
experimental Electron shell over loopback reasonix serve with HTTP+SSE
host bindings, same-origin shell proxy auth fixes, and multi-project tab
UI wiring. Official desktop remains Wails; Electron is additive PoC.
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) tui Terminal UI / CLI (internal/cli, internal/control) labels Aug 8, 2026
}
}

const upstream = await fetch(target.toString(), init);
await serveStatic(req, res, url, staticDir, opts);
} catch (err) {
res.writeHead(500, { "Content-Type": "text/plain" });
res.end(String(err?.message || err));
}

func loadTopicTitles(workspaceRoot string) map[string]string {
b, err := os.ReadFile(topicTitlesPath(workspaceRoot))

func saveTopicTitles(workspaceRoot string, m map[string]string) error {
path := topicTitlesPath(workspaceRoot)
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
return err
}
tmp := path + ".tmp"
if err := os.WriteFile(tmp, b, 0o644); err != nil {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) tui Terminal UI / CLI (internal/cli, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants