-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
@melonamin - since you built the web dashboard (#17), wanted to share an idea.
the --plan mode (#22) was designed with web integration in mind. the architecture already supports it:
what we have:
InputCollectorinterface - pluggable input collection (pkg/input/input.go)BroadcastLoggeralready emits Q&A events to SSE (pkg/web/broadcast_logger.go)- progress file stores full Q&A history - enables browser reconnect
QUESTIONsignal with JSON payload containing question + optionsPLAN_READYsignal when Claude finishes the plan
how terminal flow works:
- Claude explores codebase, emits
<<<RALPHEX:QUESTION>>>with JSON TerminalCollector.AskQuestion()displays options via fzf- user selects, answer logged to progress file
- next Claude iteration sees prior Q&A, asks follow-up or creates plan
PLAN_READYsignal → user confirms → full execution begins
web adaptation:
- create
WebInputCollectorimplementing same interface - when
QUESTIONsignal detected, pause execution loop - emit SSE event with question/options to browser
- browser renders form/modal for selection
- POST
/api/sessions/{id}/answer→ unblocks runner - continue to next iteration
the tricky part is bidirectional coordination - runner blocks on AskQuestion() waiting for web client response. options:
- channel-based: runner waits on channel, HTTP handler sends answer
- polling: runner checks for answer file/flag periodically
- context-based: inject answer via context value
leaning toward (1) - cleaner, no polling overhead.
open question: how does user navigate to project directory? current web dashboard assumes you're already in the right dir when starting ralphex. maybe:
- A) browser-based file picker (complex)
- B) predefined project list in config
- C) just document that user should cd to project first (same as CLI)
thoughts? feel free to take this in a different direction - just wanted to share that the groundwork is there.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request