feat(web): company brain trial visibility + setup timeline - #1384
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | a787041 | Commit Preview URL Branch Preview URL |
Aug 02 2026, 07:48 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | a787041 | Aug 02 2026, 07:47 AM |
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 38s —— View job Reviewing PR #1384
Review submitted. Found one real issue worth addressing: terminal metadata ( |
There was a problem hiding this comment.
Overview: Adds trial visibility UI (header pill, timeline card, trial strip) with state derived from org metadata and Autumn subscriptions, and refactors the brain home layout.
Issues found: None — this looks good to ship.
The trial state logic in useBrainTrial correctly handles the dual-source approach (metadata-first with Autumn fallback), properly guards against showing "ended" state for paid/converted orgs, and includes appropriate null checks throughout. The 60-second tick for keeping daysRemaining current is a nice touch.
Minor observations (not blockers):
- The
startedAtMsfallback assumes a 14-day trial length, which is fine as a display heuristic - All division operations are guarded against zero (
Math.max(1, ...)) - The
ConnectionsBoardrefactor intouseConnectionsBoard+ separate components is clean and maintains the same behavior
Score: 9/10
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40c016c0dd
ℹ️ 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".
There was a problem hiding this comment.
Overview: Adds trial visibility UI (header pill, timeline card, trial strip) with dual-source state derived from org metadata and Autumn subscriptions, plus a layout refactor of the brain home view.
Issues found:
The P1 issue flagged by the prior automated review is valid: in use-brain-trial.ts:49, terminal metadata (exhausted/expired) should short-circuit before checking autumnOpen. If credits exhaust before the calendar trial ends, the backend marks metadata as "exhausted" but Autumn may still report an open trial — the current if (metaOpen || autumnOpen) would incorrectly return trialing instead of ended, showing "X days left" when the brain is actually paused.
Suggested fix at line 44-49:
const metaTerminal =
meta.status === "expired" || meta.status === "exhausted"
if (metaTerminal) {
// Terminal metadata takes precedence — brain is paused
return {
state: "ended" as const,
endsAtMs: meta.endsAtMs,
startedAtMs: meta.startedAtMs,
daysRemaining: 0,
}
}
// Then check for open trials...The P2 issues (Autumn trial edge case, overview invalidation) are lower priority — they're edge cases that won't cause production incidents but could cause minor UX inconsistencies. The overview invalidation in particular will self-correct within 30s due to staleTime.
Everything else looks solid: the 60-second tick for keeping daysRemaining current is a nice touch, the refactor of ConnectionsBoard into hook + components is clean, and all division operations are guarded against zero.
Score: 8/10
The P1 metadata precedence issue should be addressed before merge. Once fixed, this is a 9-10.
|
Note Production impact unlikely. Checked all new-hook deps exist, /brain/connections has zero remaining consumers, /brain/overview degrades safely to null. Worker: ~22 req/min, 0 errors last hour. Polylane analysed |
Merge activity
|
- Header pill with trial days left (Autumn-first, org metadata fallback) - Brain home: Your Company Brain timeline card (trial strip, milestones from /brain/overview) promoted to top-right - Trial copy in CB onboarding Slack step and docked header - Brain home now reads the new /brain/overview endpoint (drops the dead /brain/connections fetch) Fixes ENG-1142
85c0002 to
a787041
Compare

Fixes ENG-1142