partials

package
v0.98.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Package partials provides reusable Templ fragments for HTMX responses.

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Package partials provides HTMX-targeted partial views.

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Index

Constants

View Source
const (
	// ChatAgentPendingPromptKeyPrefix stores the first user prompt before navigation.
	// The create flow writes both ?prompt= and sessionStorage; the detail page must
	// always clear the storage key after consuming either source, or revisiting the
	// session from the list will re-send the first prompt.
	ChatAgentPendingPromptKeyPrefix = "flowbot-chatagent-pending:"
)

Variables

This section is empty.

Functions

func AgentKnowledgeForm added in v0.98.1

func AgentKnowledgeForm(item model.AgentKnowledge, isNew bool, errors map[string]string, listQ string) templ.Component

func AgentKnowledgeRow added in v0.98.1

func AgentKnowledgeRow(item model.AgentKnowledge) templ.Component

func AgentKnowledgeTable added in v0.98.1

func AgentKnowledgeTable(items []model.AgentKnowledge, q string) templ.Component

func AgentMemoryModal added in v0.95.0

func AgentMemoryModal() templ.Component

func AgentMemoryTable added in v0.98.1

func AgentMemoryTable(items []model.AgentMemoryFact, scope string) templ.Component

func AgentResourcePreview added in v0.94.0

func AgentResourcePreview(title, bodyHTML string, truncated bool, fullURL string) templ.Component

func AgentResourcePreviewURL added in v0.98.1

func AgentResourcePreviewURL(sessionID, resourceURI string, full bool) templ.SafeURL

AgentResourcePreviewURL builds the HTMX preview URL for a resource URI.

func AgentScheduledTaskDetailURL added in v0.95.0

func AgentScheduledTaskDetailURL(taskID string) templ.SafeURL

AgentScheduledTaskDetailURL builds the detail page URL for a scheduled task.

func AgentScheduledTaskKindLabel added in v0.95.0

func AgentScheduledTaskKindLabel(kind string) string

AgentScheduledTaskKindLabel returns a user-friendly label for schedule kind.

func AgentScheduledTaskPageTitle added in v0.95.0

func AgentScheduledTaskPageTitle(task model.AgentScheduledTask) string

AgentScheduledTaskPageTitle returns the browser title for a scheduled task detail page.

func AgentScheduledTaskRow added in v0.95.0

func AgentScheduledTaskRow(item model.AgentScheduledTask) templ.Component

func AgentScheduledTaskRunsTable added in v0.95.0

func AgentScheduledTaskRunsTable(items []model.AgentScheduledTaskRun) templ.Component

func AgentScheduledTaskScheduleSummary added in v0.95.0

func AgentScheduledTaskScheduleSummary(task model.AgentScheduledTask) string

AgentScheduledTaskScheduleSummary renders a compact schedule summary.

func AgentScheduledTaskStateOptions added in v0.95.0

func AgentScheduledTaskStateOptions() []string

AgentScheduledTaskStateOptions returns supported lifecycle states for manual updates.

func AgentScheduledTaskStatePanel added in v0.95.0

func AgentScheduledTaskStatePanel(task model.AgentScheduledTask) templ.Component

func AgentScheduledTaskStateURL added in v0.95.0

func AgentScheduledTaskStateURL(taskID string) templ.SafeURL

AgentScheduledTaskStateURL builds the state update endpoint for a scheduled task.

func AgentScheduledTaskTable added in v0.95.0

func AgentScheduledTaskTable(items []model.AgentScheduledTask) templ.Component

func AgentScheduledTaskTextPreview added in v0.95.0

func AgentScheduledTaskTextPreview(value string, limit int) string

AgentScheduledTaskTextPreview truncates long content for table cells.

func AgentScheduledTaskTimeOrDash added in v0.95.0

func AgentScheduledTaskTimeOrDash(value *time.Time) string

AgentScheduledTaskTimeOrDash formats an optional timestamp.

func AgentSessionEntriesTable added in v0.93.0

func AgentSessionEntriesTable(entries []model.AgentSessionEntry) templ.Component

func AgentSessionEntryPayload added in v0.93.0

func AgentSessionEntryPayload(payloadJSON string) templ.Component

func AgentSessionEntryRow added in v0.93.0

func AgentSessionEntryRow(entry model.AgentSessionEntry) templ.Component

func AgentSessionPageTitle added in v0.94.0

func AgentSessionPageTitle(session model.AgentSession) string

AgentSessionPageTitle returns the browser title for a session detail page.

func AgentSessionPlansCard added in v0.94.0

func AgentSessionPlansCard(sessionID string, plans []model.AgentPlan) templ.Component

func AgentSessionRow added in v0.93.0

func AgentSessionRow(item model.AgentSession) templ.Component

func AgentSessionStateBadge added in v0.93.0

func AgentSessionStateBadge(state string) templ.Component

AgentSessionStateBadge renders a session lifecycle state as a tooltip icon.

func AgentSessionSummariesTable added in v0.98.1

func AgentSessionSummariesTable(items []model.AgentSessionSummary, q string) templ.Component

func AgentSessionTable added in v0.93.0

func AgentSessionTable(items []model.AgentSession, nextCursor string) templ.Component

func AgentSessionTableAppend added in v0.98.1

func AgentSessionTableAppend(items []model.AgentSession, nextCursor string) templ.Component

AgentSessionTableAppend renders additional session rows plus an OOB Load more control.

func AgentSessionTodosCard added in v0.98.0

func AgentSessionTodosCard(todos []model.AgentTodo) templ.Component

AgentSessionTodosCard renders the session checklist on the inspect detail page.

func AgentSkillFileForm added in v0.94.0

func AgentSkillFileForm(skill model.AgentSkill, file model.AgentSkillFile, isNew bool, errors map[string]string) templ.Component

func AgentSkillFileRow added in v0.94.0

func AgentSkillFileRow(skill model.AgentSkill, file model.AgentSkillFile) templ.Component

func AgentSkillFileTable added in v0.94.0

func AgentSkillFileTable(skill model.AgentSkill, files []model.AgentSkillFile) templ.Component

func AgentSkillForm added in v0.93.0

func AgentSkillForm(item model.AgentSkill, isNew bool, errors map[string]string) templ.Component

func AgentSkillRow added in v0.93.0

func AgentSkillRow(item model.AgentSkill) templ.Component

func AgentSkillTable added in v0.93.0

func AgentSkillTable(items []model.AgentSkill) templ.Component

func AgentSubagentForm added in v0.93.0

func AgentSubagentForm(params model.AgentSubagentFormParams) templ.Component

func AgentSubagentRow added in v0.93.0

func AgentSubagentRow(item model.AgentSubagent) templ.Component

func AgentSubagentTable added in v0.93.0

func AgentSubagentTable(items []model.AgentSubagent) templ.Component

func AgentSubagentTaskDetail added in v0.94.0

func AgentSubagentTaskDetail(item model.AgentSubagentTask) templ.Component

func AgentSubagentTaskRow added in v0.94.0

func AgentSubagentTaskRow(item model.AgentSubagentTask) templ.Component

func AgentSubagentTaskTable added in v0.94.0

func AgentSubagentTaskTable(items []model.AgentSubagentTask) templ.Component

func ApprovalCountBadge added in v0.98.1

func ApprovalCountBadge(count int) templ.Component

ApprovalCountBadge renders a compact count chip for pending tool approvals. Empty when count is zero so HTMX can clear previous badges.

func BrandMark added in v0.97.8

func BrandMark(class string) templ.Component

BrandMark renders the Flowbot logomark (central hub with three flow nodes). Uses currentColor so it adapts to DaisyUI themes.

func CapabilityCard

func CapabilityCard(d hub.Descriptor) templ.Component

func CapabilityGrid

func CapabilityGrid(descriptors []hub.Descriptor, filtered bool) templ.Component

func CapsLabel added in v0.97.8

func CapsLabel(caps []homelab.AppCapability) string

CapsLabel joins capability names with a middle-dot separator for compact display.

func ChartScripts added in v0.97.8

func ChartScripts() templ.Component

ChartScripts loads Chart.js for dashboard charts.

func ChatAgentApprovalPanel added in v0.95.0

func ChatAgentApprovalPanel(sessionID string, endpoints ChatAgentEndpoints, pending *ChatAgentPendingConfirm) templ.Component

func ChatAgentApprovalScripts added in v0.97.8

func ChatAgentApprovalScripts() templ.Component

ChatAgentApprovalScripts loads JS for standalone approval panels (e.g. session detail).

func ChatAgentApproveAlwaysHint added in v0.98.1

func ChatAgentApproveAlwaysHint(suggestedPattern string) string

ChatAgentApproveAlwaysHint explains that always remembers the suggested pattern for future matching calls.

func ChatAgentApproveAlwaysLabel added in v0.98.1

func ChatAgentApproveAlwaysLabel() string

ChatAgentApproveAlwaysLabel is the remember-pattern approval button text.

func ChatAgentApproveDenyLabel added in v0.98.1

func ChatAgentApproveDenyLabel() string

ChatAgentApproveDenyLabel is the reject button text.

func ChatAgentApproveOnceHint added in v0.98.1

func ChatAgentApproveOnceHint() string

ChatAgentApproveOnceHint explains that once applies only to this tool call.

func ChatAgentApproveOnceLabel added in v0.98.1

func ChatAgentApproveOnceLabel() string

ChatAgentApproveOnceLabel is the primary one-shot approval button text.

func ChatAgentAssistantMeta added in v0.98.1

func ChatAgentAssistantMeta(msg model.AgentChatMessage, showCopy bool) templ.Component

ChatAgentAssistantMeta renders duration (left) and copy-markdown (right) under assistant content.

func ChatAgentComposer added in v0.95.0

func ChatAgentComposer(endpoints ChatAgentEndpoints, placeholder string, disabled bool) templ.Component

func ChatAgentComposerScripts added in v0.97.8

func ChatAgentComposerScripts() templ.Component

ChatAgentComposerScripts loads JS for the agents home composer (create session).

func ChatAgentContextPopover added in v0.95.0

func ChatAgentContextPopover(endpoints ChatAgentEndpoints) templ.Component

func ChatAgentContextRing added in v0.95.0

func ChatAgentContextRing() templ.Component

func ChatAgentCopyMarkdownButton added in v0.98.1

func ChatAgentCopyMarkdownButton(markdown string) templ.Component

ChatAgentCopyMarkdownButton copies the assistant reply as raw markdown.

func ChatAgentDetailURL added in v0.95.0

func ChatAgentDetailURL(template, sessionID string) string

ChatAgentDetailURL builds a session detail URL from a template containing "{id}".

func ChatAgentDurationFooter added in v0.98.1

func ChatAgentDurationFooter(msg model.AgentChatMessage) templ.Component

ChatAgentDurationFooter shows turn/total timing inside the assistant meta row.

func ChatAgentDurationLabel added in v0.95.0

func ChatAgentDurationLabel(ms int64) string

ChatAgentDurationLabel formats a millisecond duration for chat UI labels.

func ChatAgentListActionURL added in v0.98.1

func ChatAgentListActionURL(template, sessionID, filter string) string

ChatAgentListActionURL builds pin/archive action URLs and preserves the active list filter.

func ChatAgentMessage added in v0.95.0

func ChatAgentMessage(msg model.AgentChatMessage, streaming bool) templ.Component

func ChatAgentPendingPromptKey added in v0.95.0

func ChatAgentPendingPromptKey(sessionID string) string

ChatAgentPendingPromptKey returns the sessionStorage key for a pending first prompt.

func ChatAgentPermissionsForm added in v0.95.0

func ChatAgentPermissionsForm(data PermissionFormPageData) templ.Component

func ChatAgentSessionActivityLabel added in v0.98.1

func ChatAgentSessionActivityLabel(activity string) string

ChatAgentSessionActivityLabel returns a human-readable runtime activity label.

func ChatAgentSessionDayGroup added in v0.98.1

func ChatAgentSessionDayGroup(group model.AgentSessionDayGroup, endpoints ChatAgentEndpoints) templ.Component

func ChatAgentSessionList added in v0.95.0

func ChatAgentSessionList(items []model.AgentSession, nextCursor string, endpoints ChatAgentEndpoints) templ.Component

func ChatAgentSessionListAppend added in v0.95.0

func ChatAgentSessionListAppend(items []model.AgentSession, nextCursor string, endpoints ChatAgentEndpoints) templ.Component

func ChatAgentSessionListFilters added in v0.98.1

func ChatAgentSessionListFilters(endpoints ChatAgentEndpoints) templ.Component

func ChatAgentSessionListURL added in v0.98.1

func ChatAgentSessionListURL(endpoints ChatAgentEndpoints, cursor string) string

ChatAgentSessionListURL builds the HTMX list URL including optional filter and cursor.

func ChatAgentSessionLoadMore added in v0.95.0

func ChatAgentSessionLoadMore(nextCursor string, endpoints ChatAgentEndpoints, oob bool) templ.Component

func ChatAgentSessionRow added in v0.95.0

func ChatAgentSessionRow(item model.AgentSession, endpoints ChatAgentEndpoints) templ.Component

func ChatAgentSessionTitle added in v0.95.0

func ChatAgentSessionTitle(item model.AgentSession) string

ChatAgentSessionTitle returns the display title for a session list row.

func ChatAgentSessionsDrawer added in v0.98.1

func ChatAgentSessionsDrawer(endpoints ChatAgentEndpoints) templ.Component

func ChatAgentSettingsCluster added in v0.98.0

func ChatAgentSettingsCluster(
	modelID string,
	thinkingID string,
	models []SelectableModelOption,
	selectedModel string,
	selectedThinking string,
	disabled bool,
) templ.Component

ChatAgentSettingsCluster renders compact model and thinking selects for the bottom-left corner of the agents composer and thread input dialogs.

func ChatAgentThread added in v0.95.0

func ChatAgentThread(session model.AgentSession, messages []model.AgentChatMessage, todos []model.AgentTodo, endpoints ChatAgentEndpoints, pending *ChatAgentPendingConfirm) templ.Component

func ChatAgentThreadScripts added in v0.97.8

func ChatAgentThreadScripts() templ.Component

ChatAgentThreadScripts loads the full chat thread stack (SSE, markdown, stream UI).

func ChatAgentTodosList added in v0.98.0

func ChatAgentTodosList(todos []model.AgentTodo) templ.Component

func ChatAgentTodosPanel added in v0.98.0

func ChatAgentTodosPanel(todos []model.AgentTodo) templ.Component

ChatAgentTodosPanel renders the read-only session checklist above the chat thread.

func ChatAgentToolCardExpanded added in v0.98.1

func ChatAgentToolCardExpanded(status string) bool

ChatAgentToolCardExpanded reports whether a tool card should render expanded. Successful and in-progress cards stay collapsed; failures and approval gates open.

func ChatAgentToolMessage added in v0.95.0

func ChatAgentToolMessage(msg model.AgentChatMessage) templ.Component

func ClassifyHistoryMessage added in v0.95.0

func ClassifyHistoryMessage(role, text string, createdAt time.Time) []model.AgentChatMessage

ClassifyHistoryMessage splits one persisted history row into UI-friendly chat bubbles.

func ClipRow added in v0.97.8

func ClipRow(item ClipListItem) templ.Component

func ClipsTable added in v0.97.8

func ClipsTable(items []ClipListItem) templ.Component

func CommandPalette added in v0.98.1

func CommandPalette() templ.Component

func CommandPalettePagesJSON added in v0.98.1

func CommandPalettePagesJSON() string

CommandPalettePagesJSON returns nav page jump targets as JSON for the command palette script.

func ConfigForm

func ConfigForm(item model.ConfigItem, isNew bool, errors map[string]string) templ.Component

func ConfigRow

func ConfigRow(item model.ConfigItem) templ.Component

func ConfigTable

func ConfigTable(items []model.ConfigItem) templ.Component

func ConfirmModal

func ConfirmModal() templ.Component

func CursorLoadMore added in v0.98.1

func CursorLoadMore(id string, listURL string, rowsTarget string, nextCursor string, oob bool) templ.Component

CursorLoadMore renders a cursor-based Load more control. When nextCursor is set, the button appends into rowsTarget via hx-swap beforeend. When oob is true and nextCursor is empty, the control is removed via hx-swap-oob delete.

func DataEventsTable

func DataEventsTable(sources, eventTypes []string, events []*gen.DataEvent, pageInfo PageInfo, runMap map[string][]store.PipelineRunInfo) templ.Component

func EmptyState

func EmptyState(message string) templ.Component

EmptyState renders a centered empty placeholder with a short message.

func EmptyStateCTA added in v0.97.8

func EmptyStateCTA(message string, detail string, href string, cta string) templ.Component

EmptyStateCTA renders an empty placeholder with optional primary link action.

func EmptyStateHXCTA added in v0.98.1

func EmptyStateHXCTA(message string, detail string, hxGet string, hxTarget string, hxSwap string, cta string) templ.Component

EmptyStateHXCTA renders an empty placeholder with an HTMX GET primary action.

func EmptyStateOnClickCTA added in v0.98.1

func EmptyStateOnClickCTA(message string, detail string, onClick string, cta string) templ.Component

EmptyStateOnClickCTA renders an empty placeholder with a scripted primary action.

func EventFilterScripts added in v0.97.8

func EventFilterScripts() templ.Component

EventFilterScripts loads event timeline filter controls and clip-copy for payloads. event-filters.js is loaded synchronously (no defer) so Alpine.data registers before alpine:init.

func EventPagination

func EventPagination(info PageInfo) templ.Component

func EventPayloadDetail

func EventPayloadDetail(payloadJSON string) templ.Component

func EventRunStatusChipClass added in v0.98.1

func EventRunStatusChipClass(status string) string

EventRunStatusChipClass returns the chip class for a pipeline run status string.

func EventRunStatusText added in v0.98.1

func EventRunStatusText(status string) string

EventRunStatusText returns a short label for a pipeline run status string.

func EventSourceChipClass added in v0.98.1

func EventSourceChipClass(source string) string

EventSourceChipClass returns a stable chip class for a source name.

func EventTypeChipClass added in v0.98.1

func EventTypeChipClass(eventType string) string

EventTypeChipClass returns the flowbot-chip CSS class for an event type.

func FilterBar

func FilterBar(p FilterBarParams) templ.Component

func FormError added in v0.97.8

func FormError(message string) templ.Component

FormError renders a consistent inline error fragment for HTMX form failures.

func FormatChatAgentDuration added in v0.95.0

func FormatChatAgentDuration(ms int64) string

FormatChatAgentDuration formats milliseconds for chat timing labels.

func FormatChatAgentMessageHTML added in v0.95.0

func FormatChatAgentMessageHTML(role, text string) string

FormatChatAgentMessageHTML converts assistant markdown to trusted server HTML.

func FormatChatAgentRelativeTime added in v0.95.0

func FormatChatAgentRelativeTime(t time.Time) string

FormatChatAgentRelativeTime returns a compact relative timestamp (e.g. "2h", "6d").

func FormatDurationMs added in v0.98.1

func FormatDurationMs(ms int64) string

FormatDurationMs formats a millisecond duration for list table cells.

func FormatEntryPayload added in v0.93.0

func FormatEntryPayload(payload map[string]any) string

FormatEntryPayload pretty-prints entry payload JSON for display.

func FormatPendingApprovalBadgeText added in v0.98.1

func FormatPendingApprovalBadgeText(count int) string

FormatPendingApprovalBadgeText formats a compact count for nav / home badges. Zero returns empty so callers can hide the badge.

func FormatRuleSetSummary added in v0.95.0

func FormatRuleSetSummary(rs permission.RuleSet) string

FormatRuleSetSummary returns a compact human-readable summary of one rule set.

func GroupAgentSessionsByDay added in v0.98.1

func GroupAgentSessionsByDay(items []model.AgentSession, now time.Time) []model.AgentSessionDayGroup

GroupAgentSessionsByDay buckets sessions by local calendar day of UpdatedAt. Input order is preserved within each day group.

func GroupAgentSessionsForList added in v0.98.1

func GroupAgentSessionsForList(items []model.AgentSession, now time.Time) []model.AgentSessionDayGroup

GroupAgentSessionsForList builds pinned + calendar-day buckets for the agents home list.

func HealthzStatus

func HealthzStatus(data HealthzData) templ.Component

func HighlightJSON added in v0.98.1

func HighlightJSON(raw string) string

HighlightJSON wraps JSON tokens in span classes for syntax highlighting. All text is HTML-escaped. Invalid JSON is returned fully escaped without spans.

func HomeDashboardBlock added in v0.97.8

func HomeDashboardBlock(d HomeDashboard) templ.Component

func HomeDashboardSummary added in v0.97.8

func HomeDashboardSummary(d HomeDashboard) templ.Component
func HomeQuickLinksSection(links []HomeQuickLink) templ.Component

func HomeSetupChecklist added in v0.97.8

func HomeSetupChecklist(items []HomeChecklistItem) templ.Component

func HomelabCard

func HomelabCard(app homelab.App) templ.Component

func HomelabGrid

func HomelabGrid(apps []homelab.App, scannedAt string) templ.Component

func HomelabRegistryScripts added in v0.97.8

func HomelabRegistryScripts() templ.Component

HomelabRegistryScripts loads homelab registry interactions. Loaded synchronously (no defer) so Alpine.data registers before alpine:init.

func HomelabStatusBadge

func HomelabStatusBadge(status homelab.AppStatus) templ.Component

func HtmxIndicator added in v0.98.1

func HtmxIndicator() templ.Component

HtmxIndicator renders a soft DaisyUI spinner gated by the htmx-indicator class. Place as a child of the requesting button so htmx-request reveals it during the request.

func HubAppStatusBadge

func HubAppStatusBadge(status homelab.AppStatus) templ.Component

func HubAppsTable

func HubAppsTable(apps []homelab.App, updatedAts map[string]string) templ.Component

func NormalizeNotifyHistoryGroup added in v0.98.1

func NormalizeNotifyHistoryGroup(group string) string

NormalizeNotifyHistoryGroup returns a known History group mode or empty (flat list).

func NotifyChannelForm

func NotifyChannelForm(item model.NotifyChannel, isNew bool, errors map[string]string, protocols []string) templ.Component

func NotifyChannelJumpURL added in v0.98.1

func NotifyChannelJumpURL(channel string) string

NotifyChannelJumpURL links History rows to the Channels tab focused on a channel name.

func NotifyChannelRow

func NotifyChannelRow(item model.NotifyChannel, highlighted bool) templ.Component

func NotifyChannelsTable

func NotifyChannelsTable(channels []model.NotifyChannel, highlight string) templ.Component

func NotifyHistoryListURL added in v0.98.1

func NotifyHistoryListURL(group, channel, ruleID, cursor string) string

NotifyHistoryListURL builds the History fragment URL preserving group and filters.

func NotifyPlayground added in v0.97.8

func NotifyPlayground(p NotifyPlaygroundParams) templ.Component

func NotifyPlaygroundPayloadField added in v0.97.8

func NotifyPlaygroundPayloadField(payloadJSON, errMsg string) templ.Component

func NotifyPlaygroundResult added in v0.97.8

func NotifyPlaygroundResult(p NotifyPlaygroundResultParams) templ.Component

func NotifyRecordReadURL added in v0.98.1

func NotifyRecordReadURL(id int64) string

NotifyRecordReadURL is the mark-read endpoint for a delivery record.

func NotifyRecordRowClass added in v0.98.1

func NotifyRecordRowClass(status string) string

NotifyRecordRowClass returns row classes; failed deliveries are highlighted.

func NotifyRuleForm

func NotifyRuleForm(item model.NotifyRule, isNew bool, errors map[string]string, templateIDs []string) templ.Component

func NotifyRuleJumpURL added in v0.98.1

func NotifyRuleJumpURL(ruleID string) string

NotifyRuleJumpURL links History rows to the Rules tab focused on a rule id.

func NotifyRuleRow

func NotifyRuleRow(item model.NotifyRule, templateIDs []string, highlighted bool) templ.Component

func NotifyRulesTable

func NotifyRulesTable(rules []model.NotifyRule, templateIDs []string, highlight string) templ.Component

func NotifyTemplateForm added in v0.97.8

func NotifyTemplateForm(item model.NotifyTemplate, isNew bool, errors map[string]string) templ.Component

func NotifyTemplateRow added in v0.97.8

func NotifyTemplateRow(item model.NotifyTemplate) templ.Component

func NotifyTemplatesTable added in v0.97.8

func NotifyTemplatesTable(templates []model.NotifyTemplate) templ.Component
func PageHeader(title, subtitle string) templ.Component

PageHeader renders a consistent page title row for the ops console. Optional children are actions (buttons) aligned to the right.

func PanelSkeleton added in v0.97.8

func PanelSkeleton() templ.Component

PanelSkeleton renders a compact delayed loading cue for hx-trigger="load" panels. Prefer this over DaisyUI gray skeleton slabs to avoid harsh flash on navigation.

func ParseToolSummaryLine added in v0.95.0

func ParseToolSummaryLine(text string) (name, args string, ok bool)

ParseToolSummaryLine parses compact summaries like run_terminal({...}).

func PermissionFieldError added in v0.95.0

func PermissionFieldError(errors map[string]string, key string) string

PermissionFieldError returns a validation error for one permission field.

func PermissionPatternActionError added in v0.95.0

func PermissionPatternActionError(errors map[string]string, key string, idx int) string

PermissionPatternActionError returns a validation error for one pattern action.

func PermissionPatternActionErrorClass added in v0.95.0

func PermissionPatternActionErrorClass(errors map[string]string, key string, idx int) string

PermissionPatternActionErrorClass returns a border class when a pattern action has an error.

func PermissionPatternError added in v0.95.0

func PermissionPatternError(errors map[string]string, key string, idx int) string

PermissionPatternError returns a validation error for one pattern row.

func PermissionPatternErrorClass added in v0.95.0

func PermissionPatternErrorClass(errors map[string]string, key string, idx int) string

PermissionPatternErrorClass returns a border class when a pattern field has an error.

func PipelineIsPublished added in v0.95.0

func PipelineIsPublished(def *gen.PipelineDefinition) bool

PipelineIsPublished reports whether a pipeline has a published runtime definition.

func PipelineLastRunOrDash added in v0.97.8

func PipelineLastRunOrDash(value *time.Time) string

PipelineLastRunOrDash formats an optional last-run timestamp for table cells.

func PipelineListTable

func PipelineListTable(entries []PipelineListEntry) templ.Component

func PipelineRunLiveURL added in v0.98.1

func PipelineRunLiveURL(pipelineName string, runID int64) string

PipelineRunLiveURL builds the live run page URL for a pipeline run.

func PipelineRunsTable

func PipelineRunsTable(name string, runs []*gen.PipelineRun) templ.Component

func PipelineStats

func PipelineStats(name string, stats *types.PipelineStats) templ.Component

func PipelineStatsScripts added in v0.97.8

func PipelineStatsScripts() templ.Component

PipelineStatsScripts loads pipeline stats chart helpers.

func PipelineStepRunsDetail

func PipelineStepRunsDetail(steps []*gen.PipelineStepRun) templ.Component

func PipelineTriggerIcon added in v0.97.8

func PipelineTriggerIcon(tr PipelineTriggerSummary) templ.Component

PipelineTriggerIcon renders a compact letter badge for a configured pipeline trigger.

func PipelineTriggerLetter added in v0.97.8

func PipelineTriggerLetter(typ string) string

PipelineTriggerLetter returns the list badge letter for a trigger type.

func PipelineWaterfallBarClass added in v0.98.1

func PipelineWaterfallBarClass(status int) string

PipelineWaterfallBarClass returns CSS classes for a pipeline step waterfall bar.

func PipelineWebPath added in v0.97.8

func PipelineWebPath(name string) string

PipelineWebPath returns the encoded web UI path for a pipeline name.

func PrettyJSON added in v0.98.1

func PrettyJSON(raw string) string

PrettyJSON indents compact JSON; empty input becomes "{}"; invalid JSON is returned unchanged.

func RelationDetail

func RelationDetail(p RelationDetailParams) templ.Component

func RelationEdgeBadge

func RelationEdgeBadge(edge schema.ResourceEdge, direction string) templ.Component

func RelationNodeCard

func RelationNodeCard(ref schema.ResourceRef, side string) templ.Component

func RelationSearchResults

func RelationSearchResults(results []schema.ResourceRef) templ.Component

func RelationTree

func RelationTree(p RelationTreeParams) templ.Component

func RenderChatAgentMarkdownHTML added in v0.95.0

func RenderChatAgentMarkdownHTML(text string) string

RenderChatAgentMarkdownHTML converts assistant markdown to sanitized HTML for web display.

func RunLatencyCompactOrDash added in v0.98.1

func RunLatencyCompactOrDash(s *types.RunLatencyStats) string

RunLatencyCompactOrDash formats success · P50 / P95 for a single list column.

func RunLatencyCompactTip added in v0.98.1

func RunLatencyCompactTip(s *types.RunLatencyStats) string

RunLatencyCompactTip is the tooltip explaining the compact 7d runs column.

func RunLatencyP50OrDash added in v0.98.1

func RunLatencyP50OrDash(s *types.RunLatencyStats) string

RunLatencyP50OrDash formats P50 duration, or an em dash when unknown.

func RunLatencyP95OrDash added in v0.98.1

func RunLatencyP95OrDash(s *types.RunLatencyStats) string

RunLatencyP95OrDash formats P95 duration, or an em dash when unknown.

func RunLatencySuccessOrDash added in v0.98.1

func RunLatencySuccessOrDash(s *types.RunLatencyStats) string

RunLatencySuccessOrDash formats success rate as a percent, or an em dash when unknown.

func SessionBadge added in v0.97.8

func SessionBadge(username string, expiresLabel string) templ.Component

SessionBadge renders the signed-in operator identity for the navbar.

func SimilarEventsURL added in v0.98.1

func SimilarEventsURL(source, eventType string) string

SimilarEventsURL builds the events page URL filtered by source and/or type.

func StatusIcon added in v0.97.8

func StatusIcon(spec StatusIconSpec, testID string) templ.Component

StatusIcon renders a status value as a colored glyph with DaisyUI tooltip on hover.

func StepCard

func StepCard() templ.Component

func TableFilterBar added in v0.98.1

func TableFilterBar(placeholder string, testID string) templ.Component

TableFilterBar renders a client-side search field bound to Alpine tableFilter.search.

func TableFilterScripts added in v0.98.1

func TableFilterScripts() templ.Component

TableFilterScripts loads shared client-side table filter controls. Loaded synchronously (no defer) so Alpine.data registers before alpine:init.

func TokenFilterText added in v0.98.1

func TokenFilterText(item model.TokenItem) string

TokenFilterText builds the client-side filter haystack for a token row.

func TokenForm

func TokenForm(errors map[string]string) templ.Component

func TokenRow

func TokenRow(item model.TokenItem) templ.Component

func TokenTable

func TokenTable(items []model.TokenItem) templ.Component

func TokenUsage added in v0.95.0

func TokenUsage(stats *types.TokenUsageStats) templ.Component

func TokenUsageScripts added in v0.97.8

func TokenUsageScripts() templ.Component

TokenUsageScripts loads home token usage chart helpers.

func TriggerCard

func TriggerCard() templ.Component

func TruncateChatAgentSessionPreview added in v0.98.1

func TruncateChatAgentSessionPreview(text string, limit int) string

TruncateChatAgentSessionPreview shortens last-message text for list rows.

func TruncateErrorSummary added in v0.98.1

func TruncateErrorSummary(s string) string

TruncateErrorSummary shortens long error text for the summary strip.

func ViewExpiredPage

func ViewExpiredPage() templ.Component

func ViewFormContent

func ViewFormContent(fields []any) templ.Component

func ViewImageContent

func ViewImageContent(url string, alt string) templ.Component

func ViewMarkdownContent

func ViewMarkdownContent(content templ.Component) templ.Component

func ViewPipelineRunContent

func ViewPipelineRunContent(steps any) templ.Component

func ViewTextContent

func ViewTextContent(content string) templ.Component

func WaterfallBarStyle added in v0.98.1

func WaterfallBarStyle(bar RunWaterfallBar) string

WaterfallBarStyle returns the inline style for offset and width.

func WebhookLogsTable

func WebhookLogsTable(sources, eventTypes []string, events []*gen.DataEvent, pageInfo PageInfo, runMap map[string][]store.PipelineRunInfo) templ.Component

func WebhookMethodChipClass added in v0.98.1

func WebhookMethodChipClass(method string) string

WebhookMethodChipClass returns the chip class for an HTTP method.

func WebhookPayloadDetail

func WebhookPayloadDetail(headersJSON, bodyJSON string, bodyTruncated bool) templ.Component

func WorkflowDAG added in v0.98.0

func WorkflowDAG(view WorkflowDAGView) templ.Component

func WorkflowDAGNodeIndex added in v0.98.0

func WorkflowDAGNodeIndex(view WorkflowDAGView, layerIdx, nodeIdx int) int

WorkflowDAGNodeIndex returns a 1-based display index for a node in the layered view.

func WorkflowInputDefaultString added in v0.98.0

func WorkflowInputDefaultString(def types.WorkflowInputDef) string

WorkflowInputDefaultString formats an input default for form placeholders.

func WorkflowInputField added in v0.98.0

func WorkflowInputField(in types.WorkflowInputDef) templ.Component

func WorkflowInputIsBoolean added in v0.98.0

func WorkflowInputIsBoolean(typ string) bool

WorkflowInputIsBoolean reports whether the input type is boolean.

func WorkflowInputIsJSON added in v0.98.0

func WorkflowInputIsJSON(typ string) bool

WorkflowInputIsJSON reports whether the input type is json.

func WorkflowInputIsNumber added in v0.98.0

func WorkflowInputIsNumber(typ string) bool

WorkflowInputIsNumber reports whether the input type is number.

func WorkflowInputsReadonly added in v0.98.0

func WorkflowInputsReadonly(inputs []types.WorkflowInputDef) templ.Component

func WorkflowListTable added in v0.98.0

func WorkflowListTable(entries []WorkflowListEntry) templ.Component

func WorkflowRunDuration added in v0.98.0

func WorkflowRunDuration(r *gen.WorkflowRun) string

WorkflowRunDuration formats the elapsed time for a workflow run.

func WorkflowRunNowForm added in v0.98.0

func WorkflowRunNowForm(name string, inputs []types.WorkflowInputDef) templ.Component

func WorkflowRunStatusClass added in v0.98.0

func WorkflowRunStatusClass(status int) string

WorkflowRunStatusClass returns the flowbot-chip CSS class for a workflow run status.

func WorkflowRunStatusText added in v0.98.0

func WorkflowRunStatusText(status int) string

WorkflowRunStatusText returns a short label for a workflow run status.

func WorkflowRunsTable added in v0.98.0

func WorkflowRunsTable(name string, runs []*gen.WorkflowRun) templ.Component

func WorkflowStepKey added in v0.98.0

func WorkflowStepKey(s *gen.WorkflowStepRun) string

WorkflowStepKey returns a stable identifier for step-run test ids and UI keys.

func WorkflowStepRunDuration added in v0.98.0

func WorkflowStepRunDuration(sr *gen.WorkflowStepRun) string

WorkflowStepRunDuration formats the elapsed time for a workflow step run.

func WorkflowStepRunsDetail added in v0.98.0

func WorkflowStepRunsDetail(steps []*gen.WorkflowStepRun) templ.Component

func WorkflowTriggersTable added in v0.98.0

func WorkflowTriggersTable(workflowName string, triggers []*gen.WorkflowTrigger) templ.Component

func WorkflowWaterfallBarClass added in v0.98.1

func WorkflowWaterfallBarClass(status int) string

WorkflowWaterfallBarClass returns CSS classes for a workflow step waterfall bar.

func WorkflowWebPath added in v0.98.0

func WorkflowWebPath(name string) string

WorkflowWebPath returns the encoded web UI path for a workflow name.

func WorkflowYAMLSource added in v0.98.0

func WorkflowYAMLSource(yamlText string) templ.Component

func WriteTableEmptyOOB added in v0.98.1

func WriteTableEmptyOOB(ctx context.Context, w io.Writer, id, rowsSelector, colspan string, empty templ.Component) error

WriteTableEmptyOOB renders an empty-state row that HTMX swaps into a tbody.

Types

type ChatAgentEndpoints added in v0.95.0

type ChatAgentEndpoints struct {
	CreateURL          string
	ListURL            string
	DetailURLTemplate  string
	PinURLTemplate     string
	ArchiveURLTemplate string
	SettingsURL        string
	MessagesURL        string
	CancelURL          string
	CloseURL           string
	ConfirmURL         string
	EventsURL          string
	InspectURL         string
	RenderMarkdownURL  string
	ContextURL         string
	TodosURL           string
	// Filter is the active session list filter query value.
	Filter string
	// PendingApprovalCount is how many sessions currently wait on tool approval.
	PendingApprovalCount int
	// SelectableModels is the list of models available in the composer/thread picker.
	SelectableModels []SelectableModelOption
	// DefaultModel is the global chat_model used when no session override is set.
	DefaultModel string
}

ChatAgentEndpoints carries configurable HTTP paths for chat agent UI components.

type ChatAgentPendingConfirm added in v0.98.1

type ChatAgentPendingConfirm struct {
	ID               string
	Tool             string
	Summary          string
	Permission       string
	Pattern          string
	SuggestedPattern string
	SuggestAlways    bool
}

ChatAgentPendingConfirm is a tool approval still waiting on the active run.

func ChatAgentPendingConfirmFromEvent added in v0.98.1

func ChatAgentPendingConfirmFromEvent(pending ChatAgentPendingConfirm) *ChatAgentPendingConfirm

ChatAgentPendingConfirmFromEvent maps a stream confirm payload into view data.

type ClipListItem added in v0.97.8

type ClipListItem struct {
	// Slug is the public short identifier.
	Slug string
	// Title is the clip title.
	Title string
	// Description is the short preview text.
	Description string
	// CreatedBy is the optional creator identifier.
	CreatedBy string
	// CreatedAt is when the clip was created.
	CreatedAt time.Time
	// URL is the public reader path (/c/{slug}).
	URL string
}

ClipListItem is one row in the web clips list table.

type CommandPaletteNavPage added in v0.98.1

type CommandPaletteNavPage struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Subtitle string `json:"subtitle,omitempty"`
	Href     string `json:"href"`
	Group    string `json:"group"`
}

CommandPaletteNavPage is one static jump target for the global command palette.

func CommandPaletteNavPages added in v0.98.1

func CommandPaletteNavPages() []CommandPaletteNavPage

CommandPaletteNavPages returns static jump targets aligned with the navbar.

type FilterBarParams

type FilterBarParams struct {
	Tab            string
	Sources        []string
	EventTypes     []string
	PipelineNames  []string
	SourceFilter   string
	TypeFilter     string
	PipelineFilter string
	SearchFilter   string
	TimeStart      string
	TimeEnd        string
}

type HealthzCap

type HealthzCap struct {
	Type   string
	Status string
	Error  string
}

HealthzCap represents a capability health status for display.

type HealthzData

type HealthzData struct {
	PostgresLatency time.Duration
	PostgresOk      bool
	RedisLatency    time.Duration
	RedisOk         bool
	Goroutines      int
	HeapAlloc       uint64
	TotalAlloc      uint64
	SysMem          uint64
	NumGC           uint32
	LastGCPause     time.Duration
	Capabilities    []HealthzCap
	Errors          []flog.ErrorEntry
}

HealthzData is the data model for the health dashboard.

type HomeChecklistItem added in v0.97.8

type HomeChecklistItem struct {
	Done   bool
	Title  string
	Detail string
	Href   string
	CTA    string
	TestID string
}

HomeChecklistItem is a setup step shown when the instance looks empty.

type HomeDashboard added in v0.97.8

type HomeDashboard struct {
	PipelineTotal    int64
	PipelineOK       int64
	PipelineFailed   int64
	Events24h        int64
	PostgresOK       bool
	RedisOK          bool
	UnhealthyCaps    int
	HubAppsTotal     int
	HubAppsRunning   int
	PendingApprovals int
	Checklist        []HomeChecklistItem
}

HomeDashboard is the view model for the authenticated home page.

type HomeQuickLink struct {
	Title  string
	Detail string
	Href   string
	TestID string
	Badge  int
}

HomeQuickLink is a shortcut card on the home dashboard.

func HomeQuickLinks(pendingApprovals int) []HomeQuickLink

HomeQuickLinks returns the standard home shortcut set.

type NotificationGroup added in v0.98.1

type NotificationGroup struct {
	Key     string
	Label   string
	Records []*gen.NotificationRecord
}

NotificationGroup is a labeled section of delivery records for History grouping.

func GroupNotificationRecords added in v0.98.1

func GroupNotificationRecords(group string, records []*gen.NotificationRecord) []NotificationGroup

GroupNotificationRecords builds section headers for channel/rule History grouping. Unread and flat modes return a single unlabeled group.

type NotificationHistoryParams added in v0.98.1

type NotificationHistoryParams struct {
	Records    []*gen.NotificationRecord
	NextCursor string
	Group      string // "", "channel", "rule", or "unread"
	Channel    string
	RuleID     string
	Channels   []string
	RuleIDs    []string
}

NotificationHistoryParams holds History tab list state for the notifications table.

type NotifyPlaygroundForm added in v0.97.8

type NotifyPlaygroundForm struct {
	Mode           string
	ChannelID      int64
	TemplateID     string
	CustomTemplate string
	Format         string
	PayloadJSON    string
	Priority       string
	URL            string
}

NotifyPlaygroundForm holds playground form field values for redisplay.

type NotifyPlaygroundParams added in v0.97.8

type NotifyPlaygroundParams struct {
	Channels  []model.NotifyChannel
	Templates []notify.Template
	Form      NotifyPlaygroundForm
	Errors    map[string]string
	Result    *NotifyPlaygroundResultParams
}

NotifyPlaygroundParams is the view model for the Notifications playground tab.

type NotifyPlaygroundResultParams added in v0.97.8

type NotifyPlaygroundResultParams struct {
	Title   string
	Body    string
	Format  string
	Preview bool
	Success bool
	Error   string
}

NotifyPlaygroundResultParams holds preview/send outcome for the playground result panel.

type PageInfo

type PageInfo struct {
	Page       int
	TotalPages int
	Total      int64
	PerPage    int
	HasPrev    bool
	HasNext    bool
}

PageInfo holds pagination state for the event table.

type PermissionFormField added in v0.95.0

type PermissionFormField struct {
	Meta           PermissionKeyMeta
	DefaultSummary string
	SelectedAction string
	PatternRows    []PermissionPatternRow
	IsOverridden   bool
}

PermissionFormField is the view model for one permission key row.

func ApplySubmittedPermissionForm added in v0.95.0

func ApplySubmittedPermissionForm(fields []PermissionFormField, form permission.FormValues) []PermissionFormField

ApplySubmittedPermissionForm overlays submitted form values onto rendered fields.

func BuildPermissionFormFields added in v0.95.0

func BuildPermissionFormFields(view chatagent.PermissionsView) []PermissionFormField

BuildPermissionFormFields builds form rows from a permissions API view.

type PermissionFormPageData added in v0.95.0

type PermissionFormPageData struct {
	Fields   []PermissionFormField
	UserJSON string
	Errors   map[string]string
}

PermissionFormPageData is the full page model for the permissions editor.

type PermissionKeyMeta added in v0.95.0

type PermissionKeyMeta struct {
	Key              string
	Label            string
	Description      string
	SupportsPatterns bool
	DisallowAllow    bool
}

PermissionKeyMeta describes one editable permission key for the web form.

type PermissionPatternRow added in v0.95.0

type PermissionPatternRow struct {
	Pattern string
	Action  string
}

PermissionPatternRow is one pattern rule row in the permissions form.

type PipelineListEntry added in v0.95.0

type PipelineListEntry struct {
	Definition *gen.PipelineDefinition
	Enabled    bool
	LastRunAt  *time.Time
	// Triggers lists configured triggers from the displayed YAML (published when published).
	Triggers []PipelineTriggerSummary
	// StepCount is the number of steps in the displayed YAML.
	StepCount int
	// Stats holds recent completed-run latency aggregates when available.
	Stats *types.RunLatencyStats
}

PipelineListEntry augments a pipeline definition with runtime enabled state and last run time.

func AttachRunLatencyStats added in v0.98.1

func AttachRunLatencyStats(entries []PipelineListEntry, stats map[string]types.RunLatencyStats) []PipelineListEntry

AttachRunLatencyStats copies matching per-pipeline latency stats onto list entries.

func BuildPipelineListEntries added in v0.95.0

func BuildPipelineListEntries(defs []*gen.PipelineDefinition, lastRunAt map[string]time.Time) []PipelineListEntry

BuildPipelineListEntries derives list rows from stored pipeline definitions. lastRunAt maps parent pipeline name to the latest run started_at; missing keys mean never run.

type PipelineTriggerSummary added in v0.97.8

type PipelineTriggerSummary struct {
	// Type is the trigger kind: event, cron, or webhook.
	Type string
	// Label is the tooltip text (event name, cron expression, or webhook path).
	Label string
	// Enabled reports whether the trigger is active in the definition.
	Enabled bool
	// Letter is the single-character badge shown in the list (E / C / W).
	Letter string
}

PipelineTriggerSummary describes one configured trigger for the pipelines list.

func PipelineListSummaryFromYAML added in v0.97.8

func PipelineListSummaryFromYAML(yamlStr string) (int, []PipelineTriggerSummary)

PipelineListSummaryFromYAML extracts step count and trigger summaries from editor YAML. Unparseable or empty YAML yields zero steps and a nil trigger slice.

func WorkflowTriggerSummaries added in v0.98.0

func WorkflowTriggerSummaries(rows []*gen.WorkflowTrigger) []PipelineTriggerSummary

WorkflowTriggerSummaries converts stored workflow triggers into list badge summaries.

type RelationDetailParams

type RelationDetailParams struct {
	Type string // "node" or "edge"
	Node schema.ResourceRef
	Edge schema.ResourceEdge
}

type RelationTreeParams

type RelationTreeParams struct {
	Node       schema.ResourceRef
	Upstream   []schema.ResourceEdge
	Downstream []schema.ResourceEdge
}

type RunErrorSummaryItem added in v0.98.1

type RunErrorSummaryItem struct {
	// Name is the step display name.
	Name string
	// Error is the truncated error message.
	Error string
}

RunErrorSummaryItem is one failed step shown in the run error summary.

func PipelineStepErrorSummary added in v0.98.1

func PipelineStepErrorSummary(steps []*gen.PipelineStepRun) []RunErrorSummaryItem

PipelineStepErrorSummary returns failed/errored pipeline steps for the top summary.

func WorkflowStepErrorSummary added in v0.98.1

func WorkflowStepErrorSummary(steps []*gen.WorkflowStepRun) []RunErrorSummaryItem

WorkflowStepErrorSummary returns failed/errored workflow steps for the top summary.

type RunWaterfallBar added in v0.98.1

type RunWaterfallBar struct {
	// Name is the step display name.
	Name string
	// Status is the step run status code.
	Status int
	// OffsetPct is the left offset as a percent of the total timeline.
	OffsetPct float64
	// WidthPct is the bar width as a percent of the total timeline.
	WidthPct float64
}

RunWaterfallBar is one bar in the simplified run step waterfall.

func PipelineStepWaterfall added in v0.98.1

func PipelineStepWaterfall(steps []*gen.PipelineStepRun) []RunWaterfallBar

PipelineStepWaterfall builds waterfall bars from pipeline step runs.

func WorkflowStepWaterfall added in v0.98.1

func WorkflowStepWaterfall(steps []*gen.WorkflowStepRun) []RunWaterfallBar

WorkflowStepWaterfall builds waterfall bars from workflow step runs.

type SelectableModelOption added in v0.98.0

type SelectableModelOption struct {
	ID   string
	Name string
}

SelectableModelOption is one model entry available for the session picker.

type StatusGlyph added in v0.97.8

type StatusGlyph string

StatusGlyph identifies which SVG shape a status icon renders.

const (
	// StatusGlyphCheck is a checkmark for positive / completed states.
	StatusGlyphCheck StatusGlyph = "check"
	// StatusGlyphX is a cross for disabled / failed states.
	StatusGlyphX StatusGlyph = "x"
	// StatusGlyphPause is a pause mark inside a circle for paused states.
	StatusGlyphPause StatusGlyph = "pause"
	// StatusGlyphPlay is a play mark for active / running states.
	StatusGlyphPlay StatusGlyph = "play"
	// StatusGlyphStop is a stop square inside a circle for closed states.
	StatusGlyphStop StatusGlyph = "stop"
	// StatusGlyphAlert is a warning triangle for unknown or attention states.
	StatusGlyphAlert StatusGlyph = "alert"
	// StatusGlyphInfo is an info mark for terminal non-error states.
	StatusGlyphInfo StatusGlyph = "info"
	// StatusGlyphMinus is a dash for muted or unspecified states.
	StatusGlyphMinus StatusGlyph = "minus"
)

type StatusIconSpec added in v0.97.8

type StatusIconSpec struct {
	// Label is the tooltip and accessible name for the status.
	Label string
	// ToneClass is a Tailwind text color utility for the icon.
	ToneClass string
	// Glyph selects the SVG path set rendered inside the icon.
	Glyph StatusGlyph
}

StatusIconSpec describes a status value rendered as a colored icon with tooltip.

func EnabledStatusIcon added in v0.97.8

func EnabledStatusIcon(enabled bool) StatusIconSpec

EnabledStatusIcon maps an enabled flag to icon styling.

func PipelineRuntimeStatusIcon added in v0.97.8

func PipelineRuntimeStatusIcon(enabled bool) StatusIconSpec

PipelineRuntimeStatusIcon maps a published pipeline enabled flag to Active/Paused icon styling.

func ScheduledTaskRunStateStatusIcon added in v0.97.8

func ScheduledTaskRunStateStatusIcon(state string) StatusIconSpec

ScheduledTaskRunStateStatusIcon maps a scheduled task run state to icon styling.

func ScheduledTaskStateStatusIcon added in v0.97.8

func ScheduledTaskStateStatusIcon(state string) StatusIconSpec

ScheduledTaskStateStatusIcon maps a scheduled task lifecycle state to icon styling.

func SessionStateStatusIcon added in v0.97.8

func SessionStateStatusIcon(state string) StatusIconSpec

SessionStateStatusIcon maps an agent session display state to icon styling.

type WorkflowDAGNode added in v0.98.0

type WorkflowDAGNode struct {
	// ID is the task identifier.
	ID string
	// Describe is the optional human description.
	Describe string
	// Action is the task action string.
	Action string
	// Deps lists upstream task IDs (Conn).
	Deps []string
}

WorkflowDAGNode is one task box in the workflow DAG view.

type WorkflowDAGView added in v0.98.0

type WorkflowDAGView struct {
	// Layers groups tasks by topological depth (roots first).
	Layers [][]WorkflowDAGNode
	// Sequential reports whether the graph is a linear pipeline (no branching Conn).
	Sequential bool
	// ParallelRuntime reports whether max_concurrency enables parallel DAG execution.
	ParallelRuntime bool
}

WorkflowDAGView is a layered layout of workflow tasks for read-only display.

func BuildWorkflowDAGView added in v0.98.0

func BuildWorkflowDAGView(tasks []types.WorkflowTask, pipeline []string, maxConcurrency int) WorkflowDAGView

BuildWorkflowDAGView builds a layered DAG view from tasks and pipeline order. When no Conn edges exist, pipeline order (falling back to task order) is shown as a chain. ParallelRuntime is true only when maxConcurrency > 1 (matching the runner).

type WorkflowListEntry added in v0.98.0

type WorkflowListEntry struct {
	// Name is the workflow identifier.
	Name string
	// Describe is the optional human description.
	Describe string
	// Enabled reports whether cron/webhook triggers are active.
	Enabled bool
	// Triggers lists configured triggers for badge display.
	Triggers []PipelineTriggerSummary
	// TaskCount is the number of pipeline steps.
	TaskCount int
	// LastRunAt is the latest run started_at when known.
	LastRunAt *time.Time
	// Stats holds recent completed-run latency aggregates when available.
	Stats *types.RunLatencyStats
}

WorkflowListEntry is one row in the workflows list table.

func AttachWorkflowRunLatencyStats added in v0.98.1

func AttachWorkflowRunLatencyStats(entries []WorkflowListEntry, stats map[string]types.RunLatencyStats) []WorkflowListEntry

AttachWorkflowRunLatencyStats copies matching per-workflow latency stats onto list entries.

func BuildWorkflowListEntries added in v0.98.0

func BuildWorkflowListEntries(defs []*gen.Workflow, triggers []*gen.WorkflowTrigger, lastRunAt map[string]time.Time) []WorkflowListEntry

BuildWorkflowListEntries maps store rows to list entries. triggers may be nil; when provided they are grouped by workflow_id. lastRunAt maps workflow name to the latest run started_at; missing keys mean never run.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL