Skip to content

H-6363: Add /ingest route to HASH frontend#8566

Draft
lunelson wants to merge 3 commits intomainfrom
ln/h-6363-ingest-route
Draft

H-6363: Add /ingest route to HASH frontend#8566
lunelson wants to merge 3 commits intomainfrom
ln/h-6363-ingest-route

Conversation

@lunelson
Copy link
Contributor

@lunelson lunelson commented Mar 23, 2026

Summary

  • Add /ingest route to HASH frontend with upload and results pages
  • Proxy /api/ingest/* to Mastra API (port 4111) via Next.js rewrites
  • Add "Ingest" sidebar link under Agents section
  • Add @ark-ui/react dependency for file upload drag-and-drop
  • Add .gitignore for memory/ directory (AI-generated working docs)

What's included

Pages:

  • /ingest — PDF upload landing page with Ark UI FileUpload drop zone and SSE progress display
  • /ingest/results — Three-panel results view: roster/claims sidebar (360px) + PDF page viewer with bbox overlays

Infrastructure:

  • Next.js rewrites proxy /api/ingest/*localhost:4111/discovery-runs/* and /api/ingest-fixtures/* → fixtures endpoint
  • Sidebar nav link under existing Agents section, gated on workers feature flag

Utilities:

  • useIngestRun hook — upload + SSE EventSource progress streaming state machine
  • resolveEvidence — selection → highlighted block IDs + target page
  • bboxToPercentage — PDF-point bbox → CSS percentage positioning
  • Contract types mirroring internal repo's pipeline schemas

Context

This is scaffolding for the ingest pipeline integration (H-6363, child of H-6290). The Mastra API backend lives in the internal repo — this PR only adds the frontend route and proxy. Components are a first pass that will evolve as data shapes and design stabilize.

Test plan

  • turbo lint:tsc --filter=@apps/hash-frontend passes
  • yarn fix:eslint (in apps/hash-frontend) — zero errors
  • yarn fix:format — no fixes needed
  • Navigate to /ingest — upload panel renders within sidebar layout
  • Navigate to /ingest/results — results page renders (needs Mastra API running for data)

🤖 Generated with Claude Code

lunelson and others added 3 commits March 23, 2026 12:48
Port the discovery pipeline UI from the internal agent-workflows prototype
into the main HASH frontend as an /ingest route. Adds:

- PDF upload with Ark UI FileUpload + SSE progress streaming
- Results view with roster/claims sidebar and PDF page viewer with bbox overlays
- Next.js rewrites to proxy /api/ingest/* to Mastra API (port 4111)
- Sidebar navigation link under Agents section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Git-ignore the memory/ directory used for AI-generated working documents
(roadmaps, plans, research notes). Excluded from linters/formatters
automatically via gitignore integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Mar 23, 2026 3:39pm
petrinaut Ready Ready Preview, Comment Mar 23, 2026 3:39pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Mar 23, 2026 3:39pm
hashdotdesign-tokens Ignored Ignored Preview Mar 23, 2026 3:39pm

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/infra Relates to version control, CI, CD or IaC (area) type/eng > frontend Owned by the @frontend team area/apps labels Mar 23, 2026
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lunelson lunelson changed the title codex ignores H-6363: Add /ingest route to HASH frontend Mar 23, 2026
: `/api/ingest/${source.runId}/view`;

try {
const response = await fetch(endpoint);

Check failure

Code scanning / CodeQL

Server-side request forgery Critical

The
URL
of this request depends on a
user-provided value
.

Copilot Autofix

AI about 13 hours ago

Copilot could not generate an autofix suggestion

Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant