Skip to content

Add a demo interface for Hackbot#6115

Open
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-hackbot-ui
Open

Add a demo interface for Hackbot#6115
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-hackbot-ui

Conversation

@suhaibmujahid
Copy link
Copy Markdown
Member

Add a new Next.js based Hackbot web interface under services/hackbot-ui to be used for demonstration.

@suhaibmujahid suhaibmujahid changed the title Add demo interface for Hackbot Add a demo interface for Hackbot Jun 3, 2026
@suhaibmujahid suhaibmujahid force-pushed the worktree-hackbot-ui branch from ec3b845 to 300ed21 Compare June 4, 2026 02:25
@suhaibmujahid suhaibmujahid requested a review from Copilot June 4, 2026 02:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new standalone Next.js “Hackbot Launchpad” demo UI under services/hackbot-ui/ that authenticates users via Google OAuth (better-auth) and proxies requests to an external hackbot-api using a server-side API key. It also includes containerization and a Cloud Run deployment script to make the demo easy to build and deploy.

Changes:

  • Introduce a new Next.js app (App Router) with pages to trigger runs, view recent runs, and inspect run details/artifacts.
  • Add stateless Google OAuth auth (better-auth) plus middleware and server-side session revalidation for /api/* proxy routes.
  • Add Dockerfile + deploy.sh for Cloud Run deployment and the required environment/config scaffolding.

Reviewed changes

Copilot reviewed 31 out of 34 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
services/hackbot-ui/tsconfig.json TypeScript configuration for the Next.js app (path aliases, strict mode, etc.).
services/hackbot-ui/README.md Usage/architecture/deployment documentation for the demo UI.
services/hackbot-ui/public/.gitkeep Keeps public/ tracked in git.
services/hackbot-ui/package.json App scripts and dependencies (Next/React/better-auth).
services/hackbot-ui/package-lock.json Locked dependency tree for reproducible installs.
services/hackbot-ui/next.config.mjs Next.js config enabling standalone output.
services/hackbot-ui/next-env.d.ts Next.js TypeScript ambient type references.
services/hackbot-ui/middleware.ts Middleware auth gate (redirects to /login, 401 JSON for /api/*).
services/hackbot-ui/lib/types.ts TypeScript models mirroring hackbot-api responses.
services/hackbot-ui/lib/store.ts Client-side localStorage store for tracking runs (since upstream has no list endpoint).
services/hackbot-ui/lib/session.ts Server-side session validation and mozilla.com allowlist enforcement.
services/hackbot-ui/lib/hackbot.ts Server-only hackbot-api client that injects the X-API-Key and handles errors.
services/hackbot-ui/lib/auth.ts better-auth configuration for stateless Google OAuth and domain restriction.
services/hackbot-ui/lib/auth-client.ts Client auth helpers/hooks (signIn, signOut, useSession).
services/hackbot-ui/Dockerfile Multi-stage build producing a small standalone Next.js runtime image.
services/hackbot-ui/deploy.sh Cloud Run deployment script with Secret Manager + Artifact Registry setup.
services/hackbot-ui/components/UserMenu.tsx Signed-in user display and sign-out control.
services/hackbot-ui/components/TriggerForm.tsx Form to trigger a bug-fix run via the proxy API.
services/hackbot-ui/components/StatusBadge.tsx Status display for run state.
services/hackbot-ui/components/RunDetail.tsx Run detail view with polling, findings/log display, and artifact download links.
services/hackbot-ui/components/RecentRuns.tsx Dashboard table of locally tracked runs with polling for active runs.
services/hackbot-ui/app/runs/[runId]/page.tsx Dynamic run details page wiring.
services/hackbot-ui/app/page.tsx Home page with trigger form + recent runs panels.
services/hackbot-ui/app/login/page.tsx Login page initiating Google OAuth flow and showing denial errors.
services/hackbot-ui/app/layout.tsx Root layout (top bar + user menu + container).
services/hackbot-ui/app/globals.css Global styling for the demo UI.
services/hackbot-ui/app/api/runs/route.ts POST proxy endpoint to create a new run.
services/hackbot-ui/app/api/runs/[runId]/route.ts GET proxy endpoint to fetch a run document.
services/hackbot-ui/app/api/runs/[runId]/artifacts/[...path]/route.ts Artifact download proxy endpoint that redirects to a signed URL.
services/hackbot-ui/app/api/auth/[...all]/route.ts better-auth Next.js handler wiring for auth endpoints.
services/hackbot-ui/app/api/agents/route.ts GET proxy endpoint to list available agents.
services/hackbot-ui/.gitignore App-specific ignores + re-include lib/ despite repo-root ignore patterns.
services/hackbot-ui/.env.example Example environment variables for local/dev.
services/hackbot-ui/.dockerignore Build context exclusions for smaller Docker builds.
Files not reviewed (1)
  • services/hackbot-ui/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/hackbot-ui/tsconfig.json
Comment thread services/hackbot-ui/README.md
Comment thread services/hackbot-ui/README.md Outdated
Comment thread services/hackbot-ui/lib/types.ts
Comment thread services/hackbot-ui/app/api/runs/route.ts
Comment thread services/hackbot-ui/Dockerfile Outdated
Add a new Next.js based Hackbot web interface under services/hackbot-ui to be used for demonstration.
@suhaibmujahid suhaibmujahid force-pushed the worktree-hackbot-ui branch from 300ed21 to e82c720 Compare June 4, 2026 02:47
@suhaibmujahid suhaibmujahid marked this pull request as ready for review June 4, 2026 02:47
@suhaibmujahid suhaibmujahid requested a review from marco-c June 4, 2026 02:48
@suhaibmujahid suhaibmujahid enabled auto-merge (squash) June 4, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants