Skip to content

add Nova research experience - #1391

Open
ishaanxgupta wants to merge 5 commits into
codex/nova-citation-markup-recoveryfrom
codex/nova-research-mode-web
Open

add Nova research experience#1391
ishaanxgupta wants to merge 5 commits into
codex/nova-citation-markup-recoveryfrom
codex/nova-research-mode-web

Conversation

@ishaanxgupta

@ishaanxgupta ishaanxgupta commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds a persisted Chat/Research mode selector, durable progress timeline, cancellation, navigation restoration, and a rendered/downloadable Markdown report experience.

image image

Adds a persisted Chat/Research mode selector, durable progress timeline, cancellation, navigation restoration, and a rendered/downloadable Markdown report experience.

Research state loads in parallel with thread state, and unsupported attachments are rejected instead of silently ignored.

Validation: 2 focused web tests, Biome, and diff checks.

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app a89fdd7 Commit Preview URL

Branch Preview URL
Aug 03 2026, 03:33 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp a89fdd7 Aug 03 2026, 03:32 PM

Copy link
Copy Markdown
Member

@ishaanxgupta please remove test files in these as well

@ishaanxgupta
ishaanxgupta marked this pull request as ready for review August 3, 2026 14:32
@claude

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown

Claude finished @ishaanxgupta's task in 3m 23s —— View job


Review Complete

  • Fetch PR diff and existing review comments
  • Analyze changed files for bugs, security issues, and logic errors
  • Check surrounding code context for boundary issues
  • Submit review with findings

Summary: Reviewed ~1750 lines across 12 files. Found one error handling gap where research mode failures don't show user feedback. The rest of the implementation is solid — state management, polling, cleanup, and citation handling are well-structured. No security concerns.

Score: 8/10

@claude claude Bot 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.

Overview: Adds a persisted Chat/Research mode selector with durable progress timeline, cancellation, navigation restoration, and rendered Markdown report experience for Nova research.

Issues found:

  1. Missing .catch() on the cancel fetch can cause unhandled promise rejections
  2. Error thrown from handleSend in research mode propagates as unhandled rejection - users won't see error feedback

The rest of the implementation looks solid. The state management, polling logic, citation handling, and UI components are well-structured. No security concerns.

Score: 8/10

Minor error handling gaps that should be addressed but won't cause data loss or security issues.

@claude claude Bot 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.

Overview: Adds a persisted Chat/Research mode selector with durable progress timeline, cancellation, navigation restoration, and rendered Markdown report experience for Nova research.

Issues found:

  1. Error thrown from submitChatMessage in research mode propagates as unhandled rejection — users won't see error feedback when research fails to start

The rest of the implementation is solid:

  • State management and polling logic are well-structured with proper cleanup
  • cancelResearch errors are properly caught in handleStop
  • Citation handling and source annotation parsing have good edge-case coverage
  • No security concerns with the URL construction or markdown rendering

Score: 8/10

One error handling gap that should be addressed for better UX, but won't cause data loss or security issues.

Comment on lines +1334 to +1353
const save = async () => {
if (saved || saving) return
setSaveState("saving")
try {
const response = await fetch(
`${apiBase}/chat/research/${runId}/save-to-memory`,
{ method: "POST", credentials: "include" },
)
const result = (await response.json().catch(() => null)) as {
error?: string
saved?: boolean
} | null
if (!response.ok || !result?.saved) {
throw new Error(result?.error || "Could not save this report")
}
setSaveState("saved")
} catch {
setSaveState("error")
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The save function is defined as a const arrow function expression (const save = async () => { ... }). According to the style guide rule 'Use function declarations over function expressions', this should be written as a function declaration: async function save() { ... }. Function expressions assigned to variables should be avoided in favor of named function declarations.

Spotted by Graphite (based on custom rule: TypeScript style guide (Google))

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +38 to +57
const submit = async () => {
if (!canContinue || submitting) return
setSubmitting(true)
setError(null)
try {
await onSubmit(
request.questions.map((item) => ({
questionId: item.id,
value: answers[item.id]?.trim() ?? "",
})),
)
} catch (submitError) {
setError(
submitError instanceof Error
? submitError.message
: "Could not submit your answers.",
)
setSubmitting(false)
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The submit function is defined as a const arrow function expression (const submit = async () => { ... }). According to the style guide rule 'Use function declarations over function expressions', this should be written as a function declaration: async function submit() { ... }.

Spotted by Graphite (based on custom rule: TypeScript style guide (Google))

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +134 to +154
const invokeAction = async (
action: NonNullable<typeof pendingAction>,
callback: (() => Promise<void> | void) | undefined,
) => {
if (!callback || pendingAction) return
setPendingAction(action)
setActionError(null)
try {
await callback()
} catch {
setActionError(
action === "cancel"
? "Could not stop this research. Please try again."
: action === "retry-finalization"
? "Could not retry the report yet. Your collected sources are still preserved."
: "Could not start a new research run. Please try again.",
)
} finally {
setPendingAction(null)
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The invokeAction function is defined as a const arrow function expression (const invokeAction = async (...) => { ... }). According to the style guide rule 'Use function declarations over function expressions', this should be written as a function declaration: async function invokeAction(...) { ... }.

Spotted by Graphite (based on custom rule: TypeScript style guide (Google))

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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