Skip to content

Chat-based onboarding and project overview (experimental)#42

Merged
bhackett1024 merged 9 commits into
mainfrom
chat-interface
Jul 5, 2026
Merged

Chat-based onboarding and project overview (experimental)#42
bhackett1024 merged 9 commits into
mainfrom
chat-interface

Conversation

@bhackett1024

Copy link
Copy Markdown
Contributor

Summary

Behind the existing new_project_overview_page experimental flag, this reworks onboarding and the project overview to be chat-based. When the flag is off, the classic form and overview are completely unchanged.

Chat-based onboarding (Dashboard)

  • The user enters a regular app URL or a GitHub URL, which starts a chat instead of the multi-step form.
  • An agent greets the user, lists what they can optionally provide (test scope, logins, design doc, polish passes, budget, reverse proxy), and records settings as the user types via tool calls.
  • When the user approves, a "Ready to start" card summarizes the configuration and creates the project with the same createProject payload the classic form produces (reusing the qaConfig helpers), then navigates to the overview.
  • GitHub URLs are routed to the Replay QA GitHub App connect flow, as before.

Chat sidebar on the project overview

  • A collapsible QA chat sits on the left of the overview (collapses to a thin sidebar rail; the masthead "Open chat" button re-opens it).
  • It shows a live activity timeline of what QA has been doing (from the task history / running queue) alongside the user's conversation with QA.
  • The user can ask questions about the project or request settings changes; approved changes are applied via updateProject.

Backend

  • New project-chat Netlify function runs the agent server-side with a bounded tool-calling loop using the existing Anthropic integration (netlify/functions/lib/llm.ts).

Reuse from nut.new

Per the request, the chat interface incorporates logic from replayio/nut.new rather than writing a new one from scratch: the flat { id, role, content } message model, the merge-by-id accumulation (mergeResponseMessage), and the message-list / message-input component structure are adapted from its chat implementation. (nut.new keeps its agent on a closed backend, so the server-side agent loop itself is implemented here against the app's Anthropic infra.)

Files

  • netlify/functions/project-chat.ts, netlify/functions/lib/project-chat-types.ts — server agent + shared types
  • src/components/chat/* — reusable chat model + UI (adapted from nut.new)
  • src/components/OnboardingChat.* — chat onboarding
  • src/components/ProjectChat.* — overview chat sidebar
  • src/pages/Dashboard.tsx, src/pages/ProjectOverview.* — flag-gated wiring

Testing

  • tsc --noEmit clean; ESLint clean on all changed/new files. (One pre-existing lint failure in the unrelated scripts/lib/replay-node-preload.cjs shim is untouched.)
  • Production vite build succeeds (no server code leaks into the client bundle).
  • Verified end-to-end in dev:mock: URL entry → chat greeting → conversation → "start" → config summary → project creation → overview with chat sidebar, activity timeline, send, and collapse/expand.

🤖 Generated with Claude Code

When the `new_project_overview_page` experimental flag is enabled, replace the
form-based onboarding and the static overview with a chat-driven experience:

- Onboarding (Dashboard): after entering an app/GitHub URL, an agent walks the
  user through setup conversationally, records settings via tool calls, lists
  what they can provide, and — once the user approves — creates the project with
  the same createProject payload the classic form produces.
- Project overview: a collapsible QA chat sidebar on the left shows what QA has
  been doing (a live activity timeline from the task history/queue) alongside the
  user's conversation, and can answer questions or change project settings.

The agent runs server-side in a new `project-chat` Netlify function using the
existing Anthropic (lib/llm.ts) tool-calling infra. The chat client model and
components (message model, merge-by-id, message list, input) are adapted from
replayio/nut.new. Everything is gated behind the experimental flag; the classic
form and overview are unchanged when it's off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@replay-qa

replay-qa Bot commented Jul 5, 2026

Copy link
Copy Markdown

Replay QA

🚫 Cancelled — the pull request was closed.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

🔎 Loop QA preview (all-k8s backend): https://pr-42--loop-qa-j63k5x.netlify.app

App Builder and others added 7 commits July 5, 2026 20:02
…idance

Addresses three follow-ups to the experimental chat onboarding/overview:

1. Inline forms for global variables (logins). The agent can call a
   `request_login_form` tool; the client renders an inline form (reusing
   LoginsEditor) so credentials are entered in masked fields instead of typed
   into the chat transcript. Onboarding stores them in the draft config;
   the project chat saves them as login global variables via
   update-global-variables.

2. Streaming responses. The `project-chat` function is now a native Netlify
   Functions 2.0 handler that streams newline-delimited JSON (adapted from
   nut.new's ChatResponse model): assistant text arrives as incremental `delta`
   events accumulated client-side by message id, with side-band events for
   config/settings/form/ready. Adds callLlmStreaming() to lib/llm.ts using the
   Anthropic streaming API.

3. Budget guidance. The onboarding/project system prompts now explain what a
   budget buys (~10 credits = smoke test, 20-50 = thorough, 50+ = broad
   coverage) so the agent clarifies it when budget comes up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1. chat should be able to provide forms for ...
Previously the running-project QA chat rendered as its own column inside the
project overview. Move it into the app's main sidebar instead: when the
new_project_overview_page experiment is on and a project overview is open, the
sidebar switches to a chat-focused layout — the user / Help / Discord cluster
relocates to the top and the QA chat fills the lower ~3/4 of the sidebar. The
sidebar widens and its own collapse toggle hides the chat (falling back to the
normal icon nav), so no separate chat collapse control is needed.

- AppShell: detect the /projects/:id/overview route + flag, render ProjectChat
  in a chat-mode sidebar; factor the footer (user/Help/Discord) into a shared
  block reused at top or bottom.
- ProjectChat: simplified to fill its container (no self-collapse/rail).
- ProjectOverview: reverted to a single column (chat no longer lives here).

All rendering changes are gated on the experimental flag; with it off the
sidebar and overview are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All changes gated on the new_project_overview_page experimental flag.

Chat fixes:
- Login form: password fields are masked with a per-row show/hide (eye) button
  (LoginsEditor maskPassword prop). The "let agents register their own test
  accounts" toggle is hidden for chat and that setting is always on (agents may
  self-register but prefer any provided login) — LoginsEditor hideAutoCreate prop.
- Sidebar chat: the top now shows a user info row followed by four icon-only
  buttons (Projects, New project, Help, Discord). When the sidebar is collapsed,
  those icons sit at the top of the rail in the same (expanded) order.

Overview redesign — the experimental ProjectOverview now mirrors the classic
overview instead of collapsible sections:
- A live QA-activity banner (reused StatusSentence).
- The active / most recent exploration's rrweb replay, with prev/next to cycle
  through all explorations (new OverviewExplorations).
- If there are bugs: bug breakdown chart + top open bugs (reused from OverviewTab)
  with a Copy bug reports button and a "Load all bugs" control that expands the
  full paginated bug list.
- The full grid of journey cards (reused JourneyCard).
StatusSentence / TopOpenBugs / BugBreakdownChart are now exported from OverviewTab.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bhackett1024 bhackett1024 merged commit 7da5d69 into main Jul 5, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant