Skip to content

Connect knowledge bases from Nova chat - #1390

Open
ishaanxgupta wants to merge 4 commits into
mainfrom
codex/nova-knowledge-base-actions
Open

Connect knowledge bases from Nova chat#1390
ishaanxgupta wants to merge 4 commits into
mainfrom
codex/nova-knowledge-base-actions

Conversation

@ishaanxgupta

@ishaanxgupta ishaanxgupta commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render Notion, Google Drive, OneDrive, and Granola knowledge-base cards in Nova
  • start existing OAuth flows directly from chat and collect Granola API keys in the existing secure modal
  • refresh live connection, indexed-item, and sync status after redirects and while a sync is running

@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 1b4a85d Aug 01 2026, 03:19 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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 1b4a85d Commit Preview URL

Branch Preview URL
Aug 01 2026, 03:20 PM

Copy link
Copy Markdown
Contributor Author

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.

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

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown

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


Code Review Complete

  • Fetch PR diff and existing review comments
  • Review apps/web/components/chat/index.tsx
  • Review apps/web/components/chat/message/agent-message.tsx
  • Review apps/web/lib/chat-knowledge-connectors.ts
  • Submit review with findings

Summary: Reviewed ~750 lines adding knowledge base connection cards to Nova chat. No bugs, security issues, or logic errors found. The implementation handles OAuth flows, popup management, and live sync status polling with proper security measures and cleanup.

Score: 9/10 — Good to ship.

@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 knowledge base connection cards (Notion, Google Drive, OneDrive, Granola) to Nova chat with OAuth flow integration and live sync status polling.

Issues found: None — this looks good to ship.

The implementation is well-designed:

  • Security: Uses safeExternalUrl to validate auth links, sets popup.opener = null to prevent reverse tabnabbing, and uses textContent (not innerHTML) for popup content
  • UX: Pre-opens popup on message submit to avoid popup blockers, monitors popup closure with proper cleanup timers
  • State management: Uses refs appropriately to prevent stale closures, handles connection completion via polling with appropriate intervals
  • Error handling: Cleans up reserved windows on errors, proper timeout handling (2-min component timeout + 5-min window cleanup)

Score: 9/10

@polylane

polylane Bot commented Aug 3, 2026

Copy link
Copy Markdown

Note

Production impact unlikely.

Checked the knowledge-base connector UI against supermemory-app (~6k req/hr, 0 errors); all new code is additive client-side React calling existing /connections endpoints already used elsewhere in the app.

View the full analysis →

supermemory-app · requests by status

view-investigation review-in-polylane disable-pr-reviews

Polylane analysed 0e1aff3 for production impact.

Comment on lines +584 to +586
throw new Error(
response.error.message || "Failed to start connection",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Violation of the 'Exception handling' rule: supporting data should be passed as the cause argument instead of being inlined into the error message string. The expression response.error.message || "Failed to start connection" inlines the error detail into the message string. Instead, throw new Error("Failed to start connection", { cause: response.error }) to pass the supporting data as the cause.

Suggested change
throw new Error(
response.error.message || "Failed to start connection",
)
throw new Error(
"Failed to start connection",
{ cause: response.error },
)

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 +601 to +604
} catch (cause) {
stopWaiting(
cause instanceof Error ? cause.message : "Failed to connect",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Violation of the 'Exception handling' rule: supporting data should be passed as the cause argument instead of being inlined into the error message string. In the catch block, cause instanceof Error ? cause.message : "Failed to connect" inlines the original error's message into the new error string. Instead, use new Error("Failed to connect", { cause }) to preserve the original error as the cause.

Suggested change
} catch (cause) {
stopWaiting(
cause instanceof Error ? cause.message : "Failed to connect",
)
} catch (cause) {
stopWaiting(
new Error("Failed to connect", { cause }),
)

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

Fix in Graphite


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

body: { containerTags: [] },
})
if (response.error) {
throw new Error(response.error.message || "Failed to load connections")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Violation of the 'Exception handling' rule: supporting data should be passed as the cause argument instead of being inlined into the error message string. The expression response.error.message || "Failed to load connections" inlines the error detail into the message string. Instead, throw new Error("Failed to load connections", { cause: response.error }) to pass the supporting data as the cause.

Suggested change
throw new Error(response.error.message || "Failed to load connections")
throw new Error("Failed to load connections", { cause: response.error })

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.

1 participant