mirror of
https://github.com/open-gitagent/langship.sh.git
synced 2026-08-03 07:21:04 +02:00
feat: add Gateway page and Runs page with real-time updates
- Implemented a new Gateway page that provides a uniform ingress for deployed agents. - Created a Runs page that lists recent pipeline executions with auto-refresh and error handling. - Added a RunsListener component to handle real-time notifications for new runs via SSE. - Updated the AppSidebar to include links to the new Gateway and Runs pages. - Enhanced FlowNode component to improve status display and styling. - Introduced EmptySection component for consistent empty state presentation. - Updated API utility to include a new endpoint for the runs stream.
This commit is contained in:
@@ -434,6 +434,28 @@ func (s *Server) dispatchAgent(ctx context.Context, a *storage.Agent, trigger an
|
||||
})
|
||||
continue
|
||||
}
|
||||
// Hook the log archiver onto the new execution so per-node lines
|
||||
// land in MinIO when each node finishes.
|
||||
startLogArchiver(context.Background(), s.logs, s.events, execID)
|
||||
|
||||
// Broadcast so /runs etc. light up without polling. We extract
|
||||
// `source` from the trigger payload (manual / github_push).
|
||||
source := ""
|
||||
if items, ok := trigger.([]map[string]any); ok && len(items) > 0 {
|
||||
if s, _ := items[0]["source"].(string); s != "" {
|
||||
source = s
|
||||
}
|
||||
}
|
||||
s.runsBus.Publish(RunCreatedEvent{
|
||||
Type: "run_created",
|
||||
ExecutionID: execID,
|
||||
PipelineID: pid,
|
||||
PipelineName: p.Name,
|
||||
AgentID: a.ID,
|
||||
Source: source,
|
||||
StartedAt: time.Now().UTC(),
|
||||
})
|
||||
|
||||
if s.runs != nil {
|
||||
_ = s.runs.Insert(ctx, &storage.Run{
|
||||
ID: execID,
|
||||
|
||||
Reference in New Issue
Block a user