Skip to content

Unify guest + assistant into one inline streaming chat#646

Merged
asim merged 1 commit into
mainfrom
claude/guest-query-limits-rxda1o
Jun 26, 2026
Merged

Unify guest + assistant into one inline streaming chat#646
asim merged 1 commit into
mainfrom
claude/guest-query-limits-rxda1o

Conversation

@asim

@asim asim commented Jun 26, 2026

Copy link
Copy Markdown
Member

The landing page (/ logged out) redirected the query box to the heavy /agent flow page, while the logged-in assistant (/) used a separate inline chat that kept no server-side memory, and the /agent page used a third "continue=flow" model. Guest follow-ups lost all context because guest flows are never persisted, so the continue lookup found nothing.

Collapse the two / surfaces onto one shared inline streaming chat:

  • home/chat.go: new self-contained chatComponent(guest) — streams the SSE response from POST /agent inline, keeps the thread in the DOM + sessionStorage, threads recent turns back to the server for context, and shows an inline sign-up CTA when a guest hits the free limit.
  • home/landing.go: guest / now uses the inline chat in its branded hero instead of redirecting to /agent; accepts ?q= and ?prompt= prefill.
  • home/assistant.go: logged-in / uses the same component.
  • agent/agent.go: handleQuery accepts an optional client-supplied history array, giving multi-turn memory to guests and the inline chat without server-side persistence. Also accept ?q= as a prompt alias on the /agent page.

Claude-Session: https://claude.ai/code/session_01KdcPjN9ndJwMGKQSRrAGPE

The landing page (`/` logged out) redirected the query box to the heavy
`/agent` flow page, while the logged-in assistant (`/`) used a separate
inline chat that kept no server-side memory, and the `/agent` page used a
third "continue=flow" model. Guest follow-ups lost all context because
guest flows are never persisted, so the continue lookup found nothing.

Collapse the two `/` surfaces onto one shared inline streaming chat:

- home/chat.go: new self-contained `chatComponent(guest)` — streams the
  SSE response from POST /agent inline, keeps the thread in the DOM +
  sessionStorage, threads recent turns back to the server for context,
  and shows an inline sign-up CTA when a guest hits the free limit.
- home/landing.go: guest `/` now uses the inline chat in its branded hero
  instead of redirecting to /agent; accepts ?q= and ?prompt= prefill.
- home/assistant.go: logged-in `/` uses the same component.
- agent/agent.go: handleQuery accepts an optional client-supplied
  `history` array, giving multi-turn memory to guests and the inline chat
  without server-side persistence. Also accept ?q= as a prompt alias on
  the /agent page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdcPjN9ndJwMGKQSRrAGPE
@asim asim merged commit beadd7d into main Jun 26, 2026
2 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.

2 participants