Update deep research agent template dashboard#90
Conversation
|
bugbot run verbose=true |
|
Bugbot request id: serverGenReqId_99a1e2b6-44c5-4517-8468-61436b1da0dc |
fba2b10 to
c7da4fe
Compare
Co-authored-by: shriyatheunicorn <shriavj@gmail.com>
There was a problem hiding this comment.
This file is quite long and would be very hard for a beginner to follow or understand what's going on. Is there any way we can split this up into separate files?
| `Research question: ${topic}`, | ||
| ].join(" "), | ||
| ResearchReportSchema, | ||
| ); |
There was a problem hiding this comment.
Synthesis output not validated
Medium Severity
synthesizeReport returns the raw stagehand.extract result without ResearchReportSchema.parse, unlike planning, rubric, strategy, and verification steps. If extraction succeeds but omits required fields such as claimMap, later verifyReport and artifact rendering can throw and turn an otherwise completed run into a 500 response.
Reviewed by Cursor Bugbot for commit 7022c0c. Configure here.
| function errorMessage(error: unknown): string { | ||
| if (error instanceof Error) return error.message; | ||
| return String(error); | ||
| } |
There was a problem hiding this comment.
Duplicated errorMessage helper
Low Severity
The same errorMessage helper is implemented independently in research.ts and api-utils.ts. Identical logic in two modules increases the risk that one copy changes while the other does not, leading to inconsistent API and CLI error text.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7022c0c. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ec7f475. Configure here.
| } | ||
| renderResults(payload); | ||
| setStatus("Ready", "ready"); | ||
| setPipeline("complete"); |
There was a problem hiding this comment.
Verify step shows success on failure
Medium Severity
After a successful HTTP response, the dashboard always calls setPipeline("complete"), which marks every pipeline step—including Verify—as completed with success styling. When verification.pass is false, metrics and overview still show review/failure, so the timeline contradicts the verification outcome.
Reviewed by Cursor Bugbot for commit ec7f475. Configure here.
| topic: task.question, | ||
| runId: task.id, | ||
| externalRubric: task.precomputedRubric, | ||
| }); |
There was a problem hiding this comment.
Benchmark init URL never used
Medium Severity
Benchmark loading stores init_url / website on each task, but runBenchmark only passes the question and rubric into runResearchTask. Tasks that expect research to start from a specific URL never get that URL in the pipeline.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ec7f475. Configure here.


Summary
file://opens pointed at local dev API candidates instead of an external deploymentindex.tsVercel function config so the staticpublic/UI plus/api/researchdeploy cleanly in the Browserbase Vercel projectVerification
npm run checknode scripts/check-readme-template-index.mjs/,/api/health, and/browserbase-logo.svgNote
Medium Risk
Large new surface area (long-running research jobs, Browserbase/Stagehand calls, open CORS on dashboard helpers) and cost/latency exposure from misconfigured env limits, but scoped to an optional demo template rather than shared production services.
Overview
Adds the deep-research-agent TypeScript template to the repo index and ships a full bb research engine: CLI (
npm start), local dashboard (npm run web), optional benchmark mode, and Vercel serverless entrypoints.The dashboard is reworked around Browserbase preview styling—logo asset, simplified topbar, a static six-step pipeline timeline with run/fail highlighting, loading ETA UI, and tabbed results (overview, findings, sources, raw JSON). Opening
public/index.htmlviafile://probes local API hosts (localhost:3000/3210) before posting to/api/research.Deployment uses
public/for static UI,api/health.tsandapi/research.ts(300s max duration), andvercel.jsonrewrites for/healthand/research. Shared routing lives insrc/api-utils.ts(HTML/CSS/logo serving, CORS, JSON research responses); the local server adds a 409 guard when a run is already in progress.The core pipeline in
src/research.tsplans and verifies research with Stagehand, discovers via Browserbase Search, fetches with Fetch API, falls back to browser sessions when needed, iterates strategy from traces, synthesizes a cited brief, and writes auditable workspace/output artifacts (plus optional FARA-style benchmarks).Reviewed by Cursor Bugbot for commit ec7f475. Bugbot is set up for automated code reviews on this repo. Configure here.