andrewmusselman opened a new issue, #23:
URL: https://github.com/apache/tooling-gofannon/issues/23

   ### Summary
   The Runs page currently fires `POST /agents/run-code/stream` and reads the 
SSE stream inline. Navigating away drops the stream; returning shows nothing. 
The history list shows past runs only via in-memory React state, so it 
disappears on refresh.
    
   ### Details
   **Problem:**
   Closing the runs tab mid-run effectively loses access to that run. The 
history list cannot survive a page refresh. Deep links to 
`/agent/:agentId/runs/:runId` aren't possible because run IDs don't exist as 
durable identifiers yet.
    
   ### Proposed solution
   Refactor the runs page flow:
    
   1. Click Run → `POST /agents/run-code/start`, get `{run_id}`.
   2. `useRun(run_id)` mounts and subscribes to `/runs/{run_id}/stream`.
   3. On navigation away and back, `useRun(run_id)` reconnects to the same 
registry entry — replay events that fired during disconnect, then transition to 
live.
   4. `/agent/:agentId/runs/:runId` deep-links to an existing run (live or 
complete).
   5. History list reads from `GET /runs?agent_id=X` so it persists across 
sessions.
   ### Acceptance Criteria
   - [ ] Fixed: Runs page uses `POST /agents/run-code/start` for new runs
   - [ ] Fixed: `useRun(run_id)` hook implemented with replay-then-live 
semantics
   - [ ] Fixed: Deep link `/agent/:agentId/runs/:runId` resolves to existing run
   - [ ] Fixed: History list populated from `GET /runs?agent_id=X` server data
   - [ ] Test added: Reload page during a run; same run continues displaying 
with replayed events
   - [ ] Test added: Direct navigation to `/agent/:id/runs/:runId` for 
completed run shows full trace
   - [ ] Test added: History persists across browser sessions
   ### References
   - File: `webapp/packages/webui/src/pages/AgentCreationFlow/RunsScreen.jsx`
   - Tracker: FIXES.md item #4
   ### Priority
   **Medium** - Depends on ISSUE-003 (run registry). Once that lands, this is a 
focused frontend refactor.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to