Skip to content

Phase 3: Next.js web app (landing, streaming agent chat, float pages) - #12

Merged
CodexManvik merged 8 commits into
mainfrom
phase3-web-app
Nov 8, 2026
Merged

CodexManvik merged 8 commits into
mainfrom
phase3-web-app

Conversation

@CodexManvik

Copy link
Copy Markdown
Owner

Phase 3: a Next.js web app in web/ that replaces the Streamlit stopgap as the showcase. The spec is in docs/superpowers/specs/2026-11-09-phase3-web-app-design.md.

What's in it

  • Landing page:
    • an asymmetric hero with a question box and a live, draggable canvas globe of all 660 floats, coloured by surface temperature (cmocean thermal)
    • live dataset numbers and sample questions
    • a scroll-driven "How an answer is made", where the real run-log component fills in as the story reaches each stage
    • the latest benchmark score, read from eval/latest.json on GitHub
    • the stack
  • Chat (/chat, streams /query/stream):
    • a live run log while the answer is worked out: what the router understood (AI router or keyword fallback, filters as chips), each SQL attempt with rows and timing, the search with its match count, and who wrote the text; when done it collapses to a one-line summary
    • the streaming answer, then Chart / Data / SQL tabs, or the matching profiles on a map
    • Stop, Retry, copy, suggested follow-ups, and history for follow-ups
  • Float pages (/floats/[id]): trajectory map, latest profile, a depth-time section (temperature, salinity or oxygen, square-root depth axis) and a T-S diagram. Plus /floats (search, region and BGC filters) and /compare (two floats overlaid).
  • Design: graphite neutrals with one accent, marine safety orange, kept to actions and live state. Data uses the oceanographers' cmocean scales. Geist and Geist Mono type, light and dark themes, mobile menu, reduced-motion support, and AA contrast checked numerically.
  • Agent UI follows current agent-UX guidance: visible tool calls with their inputs and outputs, a chronological step log, calibrated signals ("keyword fallback", "SQL repaired", "widened search") instead of reasoning prose, and stop/retry controls.

Checks

  • web/: 16 Vitest unit tests (SSE parser, run reducer, cmocean sampling, profile shaping), ESLint and tsc clean, next build passes. A new web CI job runs all of these.
  • Lighthouse, mobile, production build of the landing page: performance 92, accessibility 100, best practices 100, SEO 100.
  • Verified in the browser against the live API, on desktop and at 375 px, in both themes:
    • analytical and search questions
    • follow-up chips
    • float page, index and compare
  • While building this I found a streaming mojibake bug, fixed and merged separately in Decode the LLM event stream as UTF-8 #11.

Needs you (accounts)

Import the repo on Vercel with root directory web and set NEXT_PUBLIC_API_URL, then add the Vercel URL to ALLOWED_ORIGINS on Render. The steps are in DEPLOY.md, section 5.

🤖 Generated with Claude Code

CodexManvik and others added 7 commits November 9, 2026 03:24
…nt run log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ucer, cmocean scales

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reaming chat with run log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Groq's event stream carries no charset, so requests decoded it as ISO-8859-1
and streamed answers showed mojibake (for example around µmol/kg and narrow
spaces). Read bytes and decode each line as UTF-8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… T-S diagram), float index and comparison

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mobile menu, social card, icon, not-found and error pages; a CI job that
lints, tests and builds web/; DEPLOY.md gains the Vercel steps and the
README describes the new frontend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lighthouse (mobile) went from performance 72 to 92: the globe no longer
competes with the first render, and redrawing at ~24 fps keeps total
blocking time at 80 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 8, 2026 22:26
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ff47aeff-abb9-4892-ba99-631ab709ee81
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

The Python .gitignore template's lib/ rule also matched web/lib, so the web
app's API client, SSE parser, colour scales and their tests were never
committed. CI caught it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CodexManvik
CodexManvik merged commit 7c1412d into main Nov 8, 2026
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.

2 participants