Skip to content

fix(web): use organization branding in Company Brain shares#1360

Merged
graphite-app[bot] merged 1 commit into
mainfrom
vorflux/fix-company-brain-share-branding
Jul 25, 2026
Merged

fix(web): use organization branding in Company Brain shares#1360
graphite-app[bot] merged 1 commit into
mainfrom
vorflux/fix-company-brain-share-branding

Conversation

@Dhravya

@Dhravya Dhravya commented Jul 25, 2026

Copy link
Copy Markdown
Member

Company Brain share snapshots now use the active organization’s branding instead of the signed-in user’s personal name.

Changes

  • Detect Company Brain workspaces through the canonical hook.
  • Render the normalized organization name with Company Brain, preserving personal share branding for other workspaces.
  • Handle missing, organization-suffixed, and already-possessive organization names.

Testing

  • Passed: node_modules/.bin/biome ci apps/web/components/share-modal.tsx
  • Passed: git diff --check -- apps/web/components/share-modal.tsx
  • Baseline failure: node_modules/.bin/tsc --noEmit --incremental false -p apps/web/tsconfig.json reports existing workspace diagnostics. The only diagnostic in share-modal.tsx is present on HEAD; none reference the new branding code.
  • Blocked: authenticated visual verification was not performed because no authenticated browser state was available and no login retry was requested.
    • Blocker screenshot:
    • Blocked-flow recording:

Attached Images and Videos

share-personal.png

🎥 View recording: share-branding-walkthrough.webm


Session Details


Note

Low Risk
Copy-only UI in the share preview with no auth, API, or data-handling changes.

Overview
Share snapshot previews now switch branding when the workspace is Company Brain, instead of always showing the signed-in user’s name and supermemory.

The modal uses useHasCompanyBrain and org data from auth to set the preview header: a normalized org possessive label (with fallbacks for missing names, trailing “organization”, and names that already end in 's) plus Company Brain as the product line. Non–Company Brain workspaces keep the existing personal supermemory branding.

Reviewed by Cursor Bugbot for commit 087019f. Bugbot is set up for automated code reviews on this repo. Configure here.

@Dhravya
Dhravya marked this pull request as draft July 25, 2026 02:35

Dhravya commented Jul 25, 2026

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.

@claude

claude Bot commented Jul 25, 2026

Copy link
Copy Markdown

Claude finished @Dhravya's task in 2m 4s —— View job


Code Review Complete

  • Analyzed PR context
  • Reviewed diff for bugs, security issues, and logic errors
  • Checked surrounding code and auth context types
  • Verified hook implementation and fallback handling

Overview: Updates the share modal to display organization branding (org name + "Company Brain") instead of user branding when sharing from a Company Brain workspace.

Issues found: None — this looks good to ship.

The implementation correctly:

  • Uses optional chaining for safe org access (org?.name)
  • Handles possessive edge cases with a regex that checks for both straight and curly apostrophes (/['']s$/i)
  • Strips trailing "organization" suffixes from org names before display
  • Falls back to "Your company's" when org name is unavailable
  • Reuses the existing useHasCompanyBrain hook for consistent workspace detection logic

The branching logic is clean:

  • Company Brain + org has name → {OrgName}'s Company Brain
  • Company Brain + no org name → Your company's Company Brain
  • Not Company Brain → {UserName}'s supermemory (existing behavior)

Score: 10/10

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 25, 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 80af8c9 Jul 25 2026, 03:47 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 25, 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 80af8c9 Commit Preview URL

Branch Preview URL
Jul 25 2026, 03:48 AM

@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: Updates the share modal to display organization branding (org name + "Company Brain") instead of user branding when sharing from a Company Brain space.

Issues found: None — this looks good to ship.

The implementation correctly:

  • Uses optional chaining for safe org access
  • Handles possessive edge cases (org names already ending in 's)
  • Falls back to "Your company's" when org name is unavailable
  • Reuses the existing useHasCompanyBrain hook for consistent logic

Score: 10/10

@Dhravya
Dhravya marked this pull request as ready for review July 25, 2026 02:38
@Dhravya
Dhravya requested a review from Prasanna721 July 25, 2026 03:42
@graphite-app

graphite-app Bot commented Jul 25, 2026

Copy link
Copy Markdown

Merge activity

<!-- VORFLUX_AGENT_PR_BODY_BEGIN -->
Company Brain share snapshots now use the active organization’s branding instead of the signed-in user’s personal name.

## Changes

- Detect Company Brain workspaces through the canonical hook.
- Render the normalized organization name with `Company Brain`, preserving personal share branding for other workspaces.
- Handle missing, organization-suffixed, and already-possessive organization names.

## Testing

- **Passed:** `node_modules/.bin/biome ci apps/web/components/share-modal.tsx`
- **Passed:** `git diff --check -- apps/web/components/share-modal.tsx`
- **Baseline failure:** `node_modules/.bin/tsc --noEmit --incremental false -p apps/web/tsconfig.json` reports existing workspace diagnostics. The only diagnostic in `share-modal.tsx` is present on `HEAD`; none reference the new branding code.
- **Blocked:** authenticated visual verification was not performed because no authenticated browser state was available and no login retry was requested.
  - Blocker screenshot:
  - Blocked-flow recording:

---
**Attached Images and Videos**

![share-personal.png](https://api.us1.vorflux.com/assets/artifacts/c3VwZXJtZW1vcnk6Zjo3NDI0.XIMCcXoYysALm_LIfpnvO2S9fa6ME5753QqP6-8JZQE.png)

🎥 [View recording: share-branding-walkthrough.webm](https://api.us1.vorflux.com/assets/artifacts/c3VwZXJtZW1vcnk6Zjo3NDI1.PLlwgZToeGPRdV49tEQESgrTiADIUq5pHQcQjzfGMQ0.mp4)
<!-- VORFLUX_AGENT_PR_BODY_END -->

---
**Session Details**
- Session: [View Session](https://supermemory.us1.vorflux.com/agent-sessions/22b72a15-9127-44be-b15b-3d341e26d016)
- Requested by: Dhravya Shah (dhravya@supermemory.com)
- Address comments on this PR. Add `(aside)` to your comment to have me ignore it.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Copy-only UI in the share preview with no auth, API, or data-handling changes.
>
> **Overview**
> Share snapshot previews now switch branding when the workspace is **Company Brain**, instead of always showing the signed-in user’s name and **supermemory**.
>
> The modal uses `useHasCompanyBrain` and org data from auth to set the preview header: a normalized org possessive label (with fallbacks for missing names, trailing “organization”, and names that already end in `'s`) plus **Company Brain** as the product line. Non–Company Brain workspaces keep the existing personal **supermemory** branding.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 087019f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@graphite-app
graphite-app Bot force-pushed the vorflux/fix-company-brain-share-branding branch from 087019f to 80af8c9 Compare July 25, 2026 03:46
@graphite-app
graphite-app Bot merged commit 80af8c9 into main Jul 25, 2026
6 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