Skip to content

feat(brain): Company Brain Models settings tab#1292

Merged
graphite-app[bot] merged 1 commit into
mainfrom
mahesh/brain-models-settings-ui
Jul 14, 2026
Merged

feat(brain): Company Brain Models settings tab#1292
graphite-app[bot] merged 1 commit into
mainfrom
mahesh/brain-models-settings-ui

Conversation

@MaheshtheDev

@MaheshtheDev MaheshtheDev commented Jul 14, 2026

Copy link
Copy Markdown
Member

Adds an admin-gated Models tab (main/triage/research pickers) that reads/writes the mono /brain/models endpoint, shown only for Company Brain orgs. Extracts a shared useOrgMemberRole hook so the brain settings sections dedupe the getActiveMember call.

Fixes ENG-1054

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 14, 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 ef0026a Commit Preview URL

Branch Preview URL
Jul 14 2026, 06:58 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 14, 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 ef0026a Jul 14 2026, 06:58 PM

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 14, 2026

Copy link
Copy Markdown

ENG-1054

@MaheshtheDev MaheshtheDev marked this pull request as ready for review July 14, 2026 06:02
@claude

claude Bot commented Jul 14, 2026

Copy link
Copy Markdown

Claude finished @MaheshtheDev's task in 1m 55s —— View job


Review Complete

  • Fetching PR diff
  • Analyzing changed files for bugs and security issues
  • Checking surrounding code context
  • Submitting review

Summary: Reviewed the Company Brain Models settings tab implementation. The code is clean with no bugs or security issues found. The shared useOrgMemberRole hook properly deduplicates API calls, auth is handled correctly with credentials: "include", and admin gating is properly enforced both on the UI and via the backend 403 handling.

Score: 10/10 — Ready 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 an admin-gated Models settings tab for Company Brain orgs and extracts a shared useOrgMemberRole hook to dedupe role-checking across the company-brain settings components.

Issues found: None — this looks good to ship.

Details:

  • The useOrgMemberRole hook correctly guards the query with enabled && !!org?.id and returns consistent role/isAdmin values matching the original inline implementations
  • The useBrainModels and useUpdateBrainModels hooks properly use credentials: "include" for auth, handle errors appropriately, and invalidate the cache on successful mutation
  • The Models component correctly guards rendering with !isCompanyBrain early return and disables controls for non-admins
  • The dirty check and save button logic are correctly synchronized — the button is disabled when no changes exist, preventing empty PATCH requests
  • The nav filtering in settings-content.tsx properly shows/hides the Models tab based on Company Brain status

Score: 10/10

@graphite-app

graphite-app Bot commented Jul 14, 2026

Copy link
Copy Markdown

Merge activity

Adds an admin-gated Models tab (main/triage/research pickers) that reads/writes the mono /brain/models endpoint, shown only for Company Brain orgs. Extracts a shared useOrgMemberRole hook so the brain settings sections dedupe the getActiveMember call.

Fixes ENG-1054
@graphite-app graphite-app Bot force-pushed the mahesh/brain-models-settings-ui branch from ae1b8f7 to ef0026a Compare July 14, 2026 18:56
@graphite-app graphite-app Bot merged commit ef0026a into main Jul 14, 2026
5 of 7 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