Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- func HookReplayList(taskID, status string, hooks []orchestrator.Hook, errorMsg string) templ.Component
- func JobDetail(job *JobContextView) templ.Component
- func Layout(title string, backURL string) templ.Component
- func Login(errorMsg string) templ.Component
- func QuestionPage(task *orchestrator.Task, turn QuestionTurn) templ.Component
- func SessionList(sessions []SessionView, projectFilter string) templ.Component
- func SessionNew(projects []*orchestrator.Project, selectedProjectID string, errorMsg string) templ.Component
- func StaticCSSURL() string
- func TaskActionBar(task *orchestrator.Task, availableActions []string, activeTab string) templ.Component
- func TaskDetail(task *orchestrator.Task, timelineGroups []timeline.StatusGroup, ...) templ.Component
- func TaskDetailAwaitingBanner(task *orchestrator.Task) templ.Component
- func TaskDetailJobsSection(task *orchestrator.Task, jobs []*JobView) templ.Component
- func TaskDetailStatusSection(task *orchestrator.Task, availableActions []string, errorMsg string, ...) templ.Component
- func TaskDetailTabPanel(task *orchestrator.Task, timelineGroups []timeline.StatusGroup, ...) templ.Component
- func TaskDetailTabsSection(task *orchestrator.Task, timelineGroups []timeline.StatusGroup, ...) templ.Component
- func TaskDetailTimelineSection(task *orchestrator.Task, groups []timeline.StatusGroup) templ.Component
- func TaskEditPage(task *orchestrator.Task, projects []*orchestrator.Project, errorMsg string) templ.Component
- func TaskList(items []components.TreeItem, filter orchestrator.TaskFilter, ...) templ.Component
- func TaskListActionBar() templ.Component
- func TaskListContent(items []components.TreeItem, filter orchestrator.TaskFilter, ...) templ.Component
- func TaskListFragment(items []components.TreeItem, filter orchestrator.TaskFilter, currentURL string) templ.Component
- func TaskNew(projects []*orchestrator.Project, errorMsg string, form url.Values) templ.Component
- func TaskReopen(task *orchestrator.Task) templ.Component
- func TerminalNotReady(jobId string, reason string) templ.Component
- func TerminalPage(title string, backURL string, jobId string, wsPath string) templ.Component
- type JobContextView
- type JobView
- type QuestionTurn
- type SessionView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HookReplayList ¶
func JobDetail ¶
func JobDetail(job *JobContextView) templ.Component
func Layout ¶
Layout wraps the whole page chrome. The header is a single back-button + title row: one level of history is exposed (enough for the Tasks → Task → Job chain boid actually has), and the title lives in the header instead of being duplicated by a content-area <h1>. When backURL is empty the back button is hidden (top-level pages: Tasks list, login). The back button is icon-only so the current page title gets the full remaining header width.
Top-level pages (Tasks / Sessions) show a global nav bar below the header so users can switch between the two views.
func QuestionPage ¶
func QuestionPage(task *orchestrator.Task, turn QuestionTurn) templ.Component
QuestionPage renders the dedicated page for a single Q&A turn:
- the agent's question (preformatted, whitespace preserved)
- when active: the answer textarea + submit / abort buttons
- when answered: the persisted answer text (read-only history)
- when neither (task aborted before answer): a short "(aborted before answer)" line
Notification deep-links from `boid task notify --ask` land here so the user goes straight to the question without scrolling through the timeline.
func SessionList ¶ added in v0.0.2
func SessionList(sessions []SessionView, projectFilter string) templ.Component
SessionList renders the /sessions page listing running taskless jobs.
func SessionNew ¶ added in v0.0.2
func SessionNew(projects []*orchestrator.Project, selectedProjectID string, errorMsg string) templ.Component
SessionNew renders the /sessions/new page. Phase 3-d PR2: project.yaml の commands: schema を廃止し、 セッション起動の唯一の 入口を harness 直選択フォームに統合した。
func StaticCSSURL ¶
func StaticCSSURL() string
StaticCSSURL returns the stylesheet URL with a cache-busting content hash. Falls back to the unversioned path if the hash could not be computed — caching will be imperfect but the page still renders.
func TaskActionBar ¶
func TaskActionBar(task *orchestrator.Task, availableActions []string, activeTab string) templ.Component
TaskActionBar renders the sticky bottom action bar. Timeline tab: state-aware primary (Start/Abort/Rerun) + "⋯" kebab (duplicate / abort / delete). Other tabs show no bar.
func TaskDetail ¶
func TaskDetailAwaitingBanner ¶
func TaskDetailAwaitingBanner(task *orchestrator.Task) templ.Component
TaskDetailAwaitingBanner is the call-to-action shown at the top of the timeline tab when the task is in the awaiting state. It links to the dedicated Q&A page for the current question turn so the user can answer.
func TaskDetailJobsSection ¶
func TaskDetailJobsSection(task *orchestrator.Task, jobs []*JobView) templ.Component
TaskDetailJobsSection renders the jobs card. Wrapped in <div id="task-jobs"> so EventSource JS can replace it via outerHTML. `task` is needed so a running job can be re-labelled "parked" while the task is awaiting a user answer (see [jobDisplayStatus]).
func TaskDetailStatusSection ¶
func TaskDetailStatusSection(task *orchestrator.Task, availableActions []string, errorMsg string, projectName string) templ.Component
TaskDetailStatusSection renders the frameless meta strip under the site header. The title has moved to the header (one-level back-nav Plan B); what's left here is the status stripe + compact meta (status / behavior / project / updated). Actions are intentionally NOT rendered here — they live in the sticky action bar at the bottom of the page (see TaskActionBar).
func TaskDetailTabPanel ¶
func TaskDetailTabPanel(task *orchestrator.Task, timelineGroups []timeline.StatusGroup, jobs []*JobView, activeTab string) templ.Component
TaskDetailTabPanel renders the tab panel content for the given activeTab. id="tab-panel" is the HTMX swap target for tab switching.
func TaskDetailTabsSection ¶
func TaskDetailTabsSection(task *orchestrator.Task, timelineGroups []timeline.StatusGroup, jobs []*JobView, availableActions []string, activeTab string) templ.Component
TaskDetailTabsSection wraps tab-list + tab-panel + action-bar under a single #tabs node. HTMX tab-link clicks swap this entire section so:
- the active class on the visible tabs updates
- the "more" details element is freshly rendered (closed by default, summary label reflects the new active tab when it's a hidden one)
- the action bar primary button becomes tab-contextual without a separate swap
func TaskDetailTimelineSection ¶
func TaskDetailTimelineSection(task *orchestrator.Task, groups []timeline.StatusGroup) templ.Component
TaskDetailTimelineSection renders the action-and-job history grouped by status visit. The grouping, sort, and label text are built by internal/timeline so the TUI and Web UI render the same structure.
Layout: one continuous left rail across the whole timeline; each row (status header + events) sits on the rail with its own marker (○ for status header, ● for jobs with status color, ◆ for state-transition actions). Times right-align in a shared column, and the status header uses the same HH:MM:SS format as events so the eye finds them without re-parsing per row.
func TaskEditPage ¶
func TaskEditPage(task *orchestrator.Task, projects []*orchestrator.Project, errorMsg string) templ.Component
TaskEditPage renders the dedicated edit form for a pending task. All four fields (title / project / description / instructions) are shown on one page; Save POSTs to /tasks/{id}/edit.
func TaskList ¶
func TaskList(items []components.TreeItem, filter orchestrator.TaskFilter, projects []*orchestrator.Project, workspaces []*orchestrator.WorkspaceSummary, currentURL string) templ.Component
func TaskListActionBar ¶
TaskListActionBar renders the sticky bottom bar for the task list page. The only action is "Create" — positioned on the left to mirror the detail page's primary-action layout so the mental model of "bottom-left = primary forward action" stays consistent across pages.
func TaskListContent ¶
func TaskListContent(items []components.TreeItem, filter orchestrator.TaskFilter, projects []*orchestrator.Project, workspaces []*orchestrator.WorkspaceSummary, currentURL string) templ.Component
TaskListContent renders the inner content (filter form + task list) for HTMX partial swaps.
func TaskListFragment ¶
func TaskListFragment(items []components.TreeItem, filter orchestrator.TaskFilter, currentURL string) templ.Component
TaskListFragment renders only the task list container (for HTMX partial responses). currentURL is embedded as the polling target so filter params are preserved across polls.
func TaskNew ¶
TaskNew renders the minimal task-creation form. Only the fields a human realistically touches when creating a task from the Web UI are shown (title / project / behavior / description / auto-start). Per-task overrides for worktree / readonly / base_branch / branch_prefix have been removed: those are now derived from the canonical behavior name (supervisor / executor) combined with the project-top `worktree:` / `base_branch:` fields in project.yaml. The back arrow in the header acts as cancel, so no separate cancel button is needed.
func TaskReopen ¶
func TaskReopen(task *orchestrator.Task) templ.Component
TaskReopen renders the reopen form for a done task. Submitting the form calls POST /tasks/{id}/reopen with an optional message that is appended to the task's instruction history.
func TerminalNotReady ¶
TerminalNotReady renders an error page when a job is not running.
func TerminalPage ¶
TerminalPage renders the full-screen PTY terminal for an interactive running job. title should be built from jobPageTitle (e.g. "[main] claude-code"). jobId is the job UUID; wsPath is /api/jobs/{id}/attach/ws.
Types ¶
type JobContextView ¶
type JobContextView struct {
ID string
TaskID string
ProjectID string
TaskTitle string
HandlerID string
DisplayName string // optional; preferred over HandlerID when non-empty (hook job's `name`)
Role string
HookID string // set when job is a hook job; used for hook replay form
Status string
ExitCode int
Interactive bool // true = PTY output contains ANSI redraw sequences; don't live-follow
CreatedAt time.Time
UpdatedAt time.Time
Output string
}
type QuestionTurn ¶
type QuestionTurn struct {
QuestionID string
Question string
Answer string
IsActive bool
WasAborted bool
}
QuestionTurn is the data needed to render a single Q&A turn: the question text, the user's answer (empty when not yet answered), and whether this turn is the active awaiting turn (form vs read-only).