feat(web): company brain onboarding redesign + connector entitlement#1178
feat(web): company brain onboarding redesign + connector entitlement#1178MaheshtheDev wants to merge 1 commit into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | 360cae0 | Jun 28 2026, 09:03 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | 360cae0 | Commit Preview URL Branch Preview URL |
Jun 28 2026, 09:04 PM |
How to use the Graphite Merge QueueAdd 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. |
|
Claude finished @MaheshtheDev's task in 2m 13s —— View job PR Review: feat(web): company brain onboarding redesign + connector entitlement
Overview: Redesigns company brain onboarding with unified About step, mode-aware Sources, Slack-focused Flows step, adds Issues found: None — all previously identified issues have been addressed. Verified Fixes:1. Race condition in
2. Invite CTA for non-admins (brain-home-view.tsx:118, 184) 3. Invite deeplink gating (account.tsx:217-227) 4. Connector entitlement gap (add-document/connections.tsx) 5. Crash on empty connections (company-brain-connections.tsx:281-282)
|
There was a problem hiding this comment.
PR Review: feat(web): company brain onboarding redesign + connector entitlement
Overview: Redesigns the company brain onboarding flow with a unified About step, mode-aware Sources, Slack-focused Flows step, adds the useConnectorAccess hook for connector entitlement gating, and fixes a crash in company-brain-connections when connections are empty.
Issues found: None — this looks good to ship.
What I reviewed:
-
use-connector-access.ts(new): Clean hook that consolidates pro tier and company_brain entitlement checks. Properly handles loading state and mirrors backendcanAccessConnectorlogic. -
company-brain-connections.tsx: The crash fix at line 277 (Array.isArray(data.toolkits) ? data.toolkits : []) correctly handles undefined/null responses from the API. -
step-sources.tsx: OAuth flows are handled correctly. Toast feedback on connection success, state reconciliation from URL params (?connected=<provider>), and theuseConnectorAccessintegration all look solid. -
step-about.tsx: The auto-draft company description feature properly uses refs to avoid stale closures, tracks which domain has been summarized to prevent duplicate fetches, and has appropriate error handling. -
onboarding/page.tsx: TheSHARED_TEAM_BRAIN_TAGrouting for team mode is correctly gated behindallowTeam && mode === "team". -
brain-home-view.tsx: Active members stat and invite functionality added cleanly.
Minor observation (not blocking):
In connections-board.tsx (line 42), the API response handling doesn't use the same defensive pattern as the fix in company-brain-connections.tsx:
setBrainRows(((await c.json()) as { toolkits: ConnRow[] }).toolkits)However, this won't cause a crash because brainConnected() (line 109-111) uses optional chaining brainRows?.find(). Worth unifying the pattern in a follow-up for consistency, but not a blocker.
Score: 9/10
|
Testing validation results Static validation found a connector entitlement gap: Company Brain orgs without api_pro can see connectors as enabled in IntegrationsView via useConnectorAccess, but clicking Google Drive, Notion, or OneDrive routes into the Add Document connector modal, where apps/web/components/add-document/connections.tsx still gates connection actions on api_pro only. That means connector access appears enabled, but the actual connect flow still disables or sends the user to upgrade. No screenshots or recordings were produced because automated UI/browser validation was prohibited for this review. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8623cce3bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8623cce to
60c09bd
Compare
There was a problem hiding this comment.
PR Review: feat(web): company brain onboarding redesign + connector entitlement
Overview: Redesigns company brain onboarding with unified About step, mode-aware Sources, adds useConnectorAccess hook for connector entitlement, and fixes company-brain-connections crash.
Issues found: None new — prior review findings have been addressed.
What I verified:
Race condition in draftCompany (step-about.tsx) — Fixed. The code now uses latestDraftDomain.current to track in-flight requests and discards stale responses before applying them (lines 127, 137, 143, 149, 151).
Invite CTA for non-admins (brain-home-view.tsx) — Fixed. The canInvite prop is computed from currentRole (line 118) and passed to StatsRow, which conditionally renders the invite button only when canInvite is true (line 184).
useConnectorAccess hook — Clean implementation that consolidates pro-tier and company_brain entitlement checks. Properly mirrors backend canAccessConnector logic.
Crash fix (company-brain-connections.tsx) — The Array.isArray(data.toolkits) ? data.toolkits : [] guard correctly handles undefined/null API responses.
Remaining items (already flagged by other reviewers):
The connector entitlement gap in add-document/connections.tsx (still uses isProUser instead of useConnectorAccess) and the invite deeplink gating in account.tsx have been noted by other reviewers. These are UX inconsistencies, not blocking bugs.
Score: 9/10
- onboarding: unified About step, mode-aware Sources, Slack-focused Flows step, connect feedback (toast + connected state), auto-draft company description from domain - brain-home: Active members stat + invite, real OneDrive icon - useConnectorAccess hook so company_brain unlocks pro-tier connectors across onboarding + integrations - fix company-brain-connections crash on empty connections
60c09bd to
360cae0
Compare

Session Details
(aside)to your comment to have me ignore it.