Documentation
¶
Overview ¶
Package dashboard provides the OCA operator dashboard — a read-only web UI showing cross-project ADV changes, tmux sessions, and Temporal/worker health, updated in real-time via SSE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ADVOpsPoller ¶
type ADVOpsPoller struct {
// contains filtered or unexported fields
}
ADVOpsPoller populates the ADV Ops panel in the dashboard snapshot. It runs the worktree census and a read-only session debt scan. Temporal-based checks (workflows, search attributes) are optional and degrade gracefully.
func NewADVOpsPoller ¶
func NewADVOpsPoller(config advruntime.Config) *ADVOpsPoller
NewADVOpsPoller creates a poller with the given ADV runtime config.
type ADVOpsRow ¶
type ADVOpsRow struct {
Status string `json:"status"`
WorkflowQueues int `json:"workflow_queues"`
StaleQueues int `json:"stale_queues"`
MissingSearchAttrs int `json:"missing_search_attrs"`
SessionDebt int `json:"session_debt"`
WorktreeDebt int `json:"worktree_debt"`
RecoverySteps int `json:"recovery_steps"`
Message string `json:"message,omitempty"`
}
ADVOpsRow represents ADV runtime state for the dashboard panel.
type ChangeRow ¶
type ChangeRow struct {
ID string `json:"id"`
ChangeID string `json:"change_id"`
Title string `json:"title"`
Status string `json:"status"`
ActiveGate string `json:"active_gate"`
CurrentGate string `json:"current_gate"`
TasksDone int `json:"tasks_done"`
TasksTotal int `json:"tasks_total"`
DoomLoop bool `json:"doom_loop"`
Project string `json:"project"`
LastSeenAgo string `json:"last_seen_ago,omitempty"`
}
ChangeRow represents a single ADV change in the dashboard.
type HealthPoller ¶
type HealthPoller struct {
// contains filtered or unexported fields
}
HealthPoller implements Poller by checking Temporal and worker health.
func NewHealthPoller ¶
func NewHealthPoller(checker healthChecker, logger *slog.Logger) *HealthPoller
NewHealthPoller creates a new health poller.
type HealthRow ¶
type HealthRow struct {
TemporalReachable bool `json:"temporal_reachable"`
WorkerRunning bool `json:"worker_running"`
Uptime string `json:"uptime,omitempty"`
}
HealthRow represents system health status.
type Poller ¶
type Poller interface {
// Poll executes one data-fetch cycle and updates the state.
Poll(ctx context.Context, s *State) error
}
Poller is the interface for background data sources that populate the state.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the dashboard HTTP server.
type SessionPoller ¶
type SessionPoller struct {
// contains filtered or unexported fields
}
SessionPoller implements Poller by fetching tmux sessions.
func NewSessionPoller ¶
func NewSessionPoller(lister sessionLister, logger *slog.Logger) *SessionPoller
NewSessionPoller creates a new session poller.
type SessionRow ¶
type SessionRow struct {
Name string `json:"name"`
Attached bool `json:"attached"`
Path string `json:"path"`
}
SessionRow represents a tmux session in the dashboard.
type Snapshot ¶
type Snapshot struct {
Changes []ChangeRow `json:"changes"`
Sessions []SessionRow `json:"sessions"`
Health HealthRow `json:"health"`
ADVOps ADVOpsRow `json:"adv_ops"`
Warm bool `json:"warm"`
Version uint64 `json:"version"`
}
Snapshot is a point-in-time view of all dashboard data.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State is the shared in-memory dashboard state cache.
type TemporalPoller ¶
type TemporalPoller struct {
// contains filtered or unexported fields
}
TemporalPoller implements Poller by fetching ADV change workflows from Temporal.
func NewTemporalPoller ¶
func NewTemporalPoller(client workflowLister, logger *slog.Logger) *TemporalPoller
NewTemporalPoller creates a new Temporal poller.