Skip to content

feat(web): company brain trial visibility + setup timeline - #1384

Merged
graphite-app[bot] merged 1 commit into
mainfrom
mtd/main-0730
Aug 2, 2026
Merged

feat(web): company brain trial visibility + setup timeline#1384
graphite-app[bot] merged 1 commit into
mainfrom
mtd/main-0730

Conversation

@MaheshtheDev

@MaheshtheDev MaheshtheDev commented Jul 31, 2026

Copy link
Copy Markdown
Member
  • 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

@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 a787041 Commit Preview URL

Branch Preview URL
Aug 02 2026, 07:48 AM

@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 a787041 Aug 02 2026, 07:47 AM

Copy link
Copy Markdown
Member 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.

@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

ENG-1142

@MaheshtheDev
MaheshtheDev marked this pull request as ready for review July 31, 2026 08:09
@claude

claude Bot commented Jul 31, 2026

Copy link
Copy Markdown

Claude finished @MaheshtheDev's task in 2m 38s —— View job


Reviewing PR #1384

  • Fetch PR diff and existing review comments
  • Analyze trial state logic in use-brain-trial.ts
  • Review brain home view changes
  • Check connections board refactor
  • Evaluate issues flagged by previous automated review
  • Submit review

Review submitted. Found one real issue worth addressing: terminal metadata (exhausted/expired) should take precedence over an open Autumn trial to avoid showing "X days left" when the brain is actually paused. Suggested a fix in the review. 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 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 startedAtMs fallback assumes a 14-day trial length, which is fine as a display heuristic
  • All division operations are guarded against zero (Math.max(1, ...))
  • The ConnectionsBoard refactor into useConnectionsBoard + separate components is clean and maintains the same behavior

Score: 9/10

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread apps/web/hooks/use-brain-trial.ts
Comment thread apps/web/hooks/use-brain-trial.ts
Comment thread apps/web/components/brain-home/brain-home-view.tsx

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

Comment thread apps/web/components/brain-home/brain-home-view.tsx
@polylane

polylane Bot commented Aug 1, 2026

Copy link
Copy Markdown

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.

View the full analysis →

supermemory-app requests and errors (last hour)

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

Polylane analysed 85c0002 for production impact.

@graphite-app

graphite-app Bot commented Aug 2, 2026

Copy link
Copy Markdown

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
@graphite-app
graphite-app Bot merged commit a787041 into main Aug 2, 2026
7 of 8 checks passed
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