Skip to content

C3: Replace /onboard template with preview design #1629

@nextlevelshit

Description

@nextlevelshit

Parent

Epic #1624
Depends on: #1627 (C1)

Scope

Replace the current /onboard template with the preview mockup design from templates/preview/onboard.html. Preserve all SSE wiring and prompt rendering — only the visual shell changes.

Current state

  • templates/onboard/index.html — uses layout.html sidebar, SSE-based chat with prompt forms
  • _message.html + _prompt.html partials for chat messages
  • SSE stream at /onboard/{sessionID}/stream — events: message, prompt, status, done, error
  • Prompt form POSTs to /onboard/{sessionID}/answer

Target state

  • New templates/onboard/index.html — standalone page using preview design
    • Top nav from C1 (Onboarding active)
    • Page header: "Setting up Wave for this project" + Restart/Abort buttons
    • Stepper: detect → inspect → propose → scaffold → smoke-test → commit
    • Chat area with message types: system, agent, prompt, user
    • Prompt rendering: choice grid (radio buttons) and text input (existing JS logic)
    • Agent message stream output (file write log)
  • Keep ALL existing JS/SSE logic — wrap in preview visual shell
  • No handler changes

Critical: preserve SSE behavior

The existing JS must continue working:

  • EventSource('/onboard/{sessionID}/stream')
  • Events: message, prompt, status, done, error
  • Prompt form POST with CSRF token
  • Auto-scroll conversation
  • Reconnect on error

Acceptance criteria

  • /onboard/{sessionID} renders with preview design (nav, stepper, chat)
  • SSE streaming works — messages appear in chat bubbles
  • Prompt rendering works — choice grids and text inputs
  • Form submission works — answer POSTs correctly
  • Reload survives via Last-Event-ID
  • Visual smoke in chromium: chat flow renders correctly

Files touched

  • internal/webui/templates/onboard/index.html (rewrite)
  • internal/webui/templates/onboard/_message.html (may adapt or inline)
  • internal/webui/templates/onboard/_prompt.html (may adapt or inline)

NOT touched

  • internal/webui/handlers_onboard.go (no changes)
  • SSE endpoints (unchanged)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions