components

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

templ: version: v0.3.1001

templ: version: v0.3.1001

templ: version: v0.3.1001

Index

Constants

This section is empty.

Variables

View Source
var BuildID = fmt.Sprintf("%d", time.Now().UnixNano())

BuildID is appended as a ?v= query parameter to static asset URLs that evolve at runtime-rebuild granularity (boid-terminal-init.js and anything it imports). Regenerated on every daemon startup so a restart reliably busts browser HTTP caches — ES modules in particular are cached hard across reloads and do not respect regular cache-control hints.

Functions

func IconBack

func IconBack(cls string) templ.Component

Heroicons (MIT License) SVG components. https://heroicons.com/

func IconCheck

func IconCheck(cls string) templ.Component

func IconChevronDown

func IconChevronDown(cls string) templ.Component

func IconChevronRight

func IconChevronRight(cls string) templ.Component

func IconClock

func IconClock(cls string) templ.Component

func IconDanger

func IconDanger(cls string) templ.Component

func IconEdit

func IconEdit(cls string) templ.Component

func IconJob

func IconJob(cls string) templ.Component

func IconProject

func IconProject(cls string) templ.Component

func IconTask

func IconTask(cls string) templ.Component

func SuggestionInapplicable added in v0.4.0

func SuggestionInapplicable(verb string, status orchestrator.TaskStatus) bool

SuggestionInapplicable reports whether a suggestion's own verb cannot fire a card transition from status right now — orchestrator.StateMachine. CanApplyTransitionAction (PR-3, suggestion 状態遷移化 follow-up), which reads card machine v2's own rule table (each of the six verbs admits exactly ONE FromStatus — e.g. "done" only fires from "working", machine_card.go's own doc comment). NewCardMachine (not machineFor's dynamic task-based selection) is correct here for the same reason TaskDetailSuggestionSection already establishes: a Suggestion only ever exists on a task_triage sidecar row (a card) in the first place.

func SuggestionInapplicableReason added in v0.4.0

func SuggestionInapplicableReason(verb string, status orchestrator.TaskStatus) string

SuggestionInapplicableReason is the reader-facing "why is Accept hidden / why is this verb badge marked inapplicable" text, naming both the verb and the current status plainly (rule 5, 隠さない — never a bare "cannot apply" with no context to act on). Both the Web UI and the API pull the "what CAN be applied" clause from the SAME single source — orchestrator.StateMachine.AvailableActionsHint — so they can never say two different things about the same status.

func TaskFilters

func TaskFilters(filter orchestrator.TaskFilter, projects []*orchestrator.Project, workspaces []*orchestrator.WorkspaceSummary) templ.Component

TaskFilters renders the task list toolbar (docs/plans/ webui-detail-list-redesign.md PR-4, §3.5): the 4-tab status switcher (Open/Closed/Queue/Parked, statusTab/statusTabActive) is GONE — the list no longer has separate tabbed views to switch between. In its place is a single 「アクティブのみ」(active-only) checkbox toggle (filter.ActiveOnly) — unchecked (the default, no query param) shows every status, checked narrows to non-terminal tasks. filter.Status itself is preserved as a hidden field only when a caller arrived with an explicit status (a bookmark, or an API-style deep link); the toolbar itself no longer writes one.

  • active-only toggle (see above)
  • search as a standalone input (its own hx-target avoids losing focus on each keystroke)
  • workspace > project as one logical filter group

Behavior is intentionally not exposed here — it was low-traffic in practice and shown on each task row instead. Its URL param still works so existing bookmarks keep narrowing the list.

Create lives in the sticky bottom action bar (TaskListActionBar), keeping the toolbar focused on filtering.

func Terminal

func Terminal(jobId string, wsPath string) templ.Component

Terminal renders an xterm.js-backed PTY widget. jobId is the job UUID; wsPath is the WebSocket API path (e.g. /api/jobs/{id}/attach/ws). The component is self-contained: it loads xterm.js, addon-fit.mjs, and boid-terminal.js, then initialises the terminal on DOMContentLoaded.

func VerbBadgeClass added in v0.3.11

func VerbBadgeClass(verb string) string

VerbBadgeClass maps a suggestion.verb to its badge CSS class (style.css). Kept in exactly one place and called from every rendering site — the card detail page's suggestion section (web/templates/tasks.templ's TaskDetailSuggestionSection) and the list row's movement line (web/templates/task_list_row.templ, docs/plans/ webui-detail-list-redesign.md PR-4) — so a future 7th verb, or a change to the unknown-verb fallback, only needs updating here. An unknown verb still gets a class (badge-verb-unknown, style.css) rather than no badge at all: the verb text itself always renders regardless (rule 5, 隠さない) — only the color is what falls back to neutral gray.

Prior to PR-4 this file was task_tree.templ, alongside the list-page tree row (taskTreeRow) that PR-4 deleted (タブ/ツリー撤廃). This function and its two neighbors below survive the deletion — plain Go, no templ syntax — because the card detail page (a caller PR-4 does not touch) still needs them, and the new flat list row (PR-4) needs them too.

Types

This section is empty.

Jump to

Keyboard shortcuts

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