How theunknownodysseus/happy-sisyphus works
happy-sisyphus is an Electron desktop chat and project workspace for the Bonsai CLI. A user opens the app, which manages login and a persistent Bonsai terminal session; prompts and terminal output flow through IPC to the chat UI. The workspace also supports changed-file and Git status views, file browsing/editing, and an embedded shell. README and sampled source establish the main process, session, and renderer relationships; unsampled subsystem links are omitted where their callers are not evidenced.
Main entry points: index.ts Electron main · EditorView.tsx Mini editor · App.tsx App shell · BonsaiSession.ts Bonsai session
Components 26
Desktop and session
- CLI launcher
bin/index.js - Electron main
src/main/index.ts - Bonsai session
src/main/BonsaiSession.ts - File watcher
src/main/FileWatcher.ts - Session persistence
src/main/persistence.ts
Chat interface
- App shell
src/renderer/src/App.tsx - Session state hook
src/renderer/src/hooks/useSession.ts - Prompt input
src/renderer/src/components/PromptInput.tsx - Bonsai terminal
src/renderer/src/components/TerminalPanel.tsx - Session toolbar
src/renderer/src/components/Toolbar.tsx - Theme preference
src/renderer/src/hooks/useTheme.ts
Project workspace
- Workspace shell
src/main/ShellTerminal.ts - Changed files
src/renderer/src/components/ChangedFiles.tsx - Mini editor
src/renderer/src/components/EditorView.tsx - File tree
src/renderer/src/components/FileTree.tsx - File finder
src/renderer/src/components/FileFinder.tsx - Editor tabs
src/renderer/src/components/EditorTabs.tsx - Code editor
src/renderer/src/components/CodeEditor.tsx - Editor terminal
src/renderer/src/components/EditorTerminal.tsx - Git footer
src/renderer/src/components/Footer.tsx - Git status hook
src/renderer/src/hooks/useGitStatus.ts - Editor preferences
src/renderer/src/hooks/useEditorSettings.ts
IPC and state
- Context bridge
src/preload/index.ts - Shared IPC types
src/shared/types.ts
Other components
- Developer
- Bonsai CLI
Connections 33
- Developer → CLI launcher: launches
README.md - CLI launcher → Electron main: opens app
README.md - Electron main → Bonsai session: owns session
src/main/index.ts - Electron main → File watcher: starts watcher
src/main/index.ts - Electron main → Session persistence: uses persistence
src/main/index.ts - Bonsai session → Bonsai CLI: drives PTY
README.md - Electron main → Context bridge: configures bridge
src/main/index.ts - Context bridge → App shell: exposes IPC
README.md - App shell → Session state hook: reads session
src/renderer/src/App.tsx - App shell → Prompt input: renders
src/renderer/src/App.tsx - App shell → Bonsai terminal: renders
src/renderer/src/App.tsx - App shell → Changed files: renders
src/renderer/src/App.tsx - App shell → Mini editor: renders
src/renderer/src/App.tsx - App shell → Session toolbar: renders
src/renderer/src/App.tsx - Session state hook → Context bridge: calls API
src/renderer/src/hooks/useSession.ts - Bonsai terminal → Session state hook: subscribes data
README.md - Prompt input → Session state hook: sends prompts
src/renderer/src/components/PromptInput.tsx - Bonsai session → Electron main: streams events
src/main/index.ts - File watcher → Electron main: reports changes
README.md - Mini editor → File tree: renders
src/renderer/src/components/EditorView.tsx - Mini editor → File finder: renders
src/renderer/src/components/EditorView.tsx - Mini editor → Editor tabs: renders
src/renderer/src/components/EditorView.tsx - Mini editor → Code editor: renders
src/renderer/src/components/EditorView.tsx - Mini editor → Editor terminal: renders
src/renderer/src/components/EditorView.tsx - File tree → Git status hook: reads status
src/renderer/src/components/FileTree.tsx - Git footer → Git status hook: reads status
src/renderer/src/components/Footer.tsx - Mini editor → Editor preferences: loads preferences
src/renderer/src/components/EditorView.tsx - Mini editor → Theme preference: uses theme
src/renderer/src/components/EditorView.tsx - Electron main → Workspace shell: routes shell IPC
src/main/index.ts - Bonsai session → Session persistence: stores history
- Electron main → Changed files: forwards file events
README.md - Electron main → Shared IPC types: uses channel contracts
src/main/index.ts - Context bridge → Shared IPC types: uses API types
src/preload/index.ts