Skip to content

refactor(squads): move PrivacyOption into graphql/squads - #6987

Merged
idoshamun merged 1 commit into
mainfrom
claude/squads-privacy-option-cycle
Oct 21, 2026
Merged

idoshamun merged 1 commit into
mainfrom
claude/squads-privacy-option-cycle

Conversation

@idoshamun

@idoshamun idoshamun commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Why

graphql/squads.ts imported the PrivacyOption enum from the SquadPrivacySection component, so the GraphQL module depended on UI code. That closed an import cycle:

graphql/squads.ts
  -> components/squads/settings/SquadPrivacySection.tsx
  -> components/squads/settings/SquadCategoryDropdown.tsx
  -> components/fields/Dropdown.tsx
  -> hooks/index.ts (barrel)
  -> hooks/useLeaveSquad.ts
  -> graphql/squads.ts

It also meant every chunk that imports the squads GraphQL module pulled in the whole hooks barrel.

What

PrivacyOption moves next to SquadForm in graphql/squads.ts, since SquadForm is typed with it. SquadPrivacySection, SquadManageDetails and useEditSquad now import it from there. graphql/squads.ts no longer reaches the hooks barrel at all, and none of its runtime imports lead back to it.

This is structural cleanup with no known user-facing bug. It's a follow-up to #6986: this cycle looked like the cause of that webpack SSR crash, but breaking it left the crash unchanged.

Verification

node ./scripts/typecheck-strict-changed.js, eslint on the changed files, the squad jest suites in shared (19 suites), pnpm --filter webapp test, and the full webapp tsc --noEmit all pass.

Preview domain

https://claude-squads-privacy-option-cyc.preview.app.daily.dev

graphql/squads.ts imported the PrivacyOption enum from the
SquadPrivacySection component, so the GraphQL module depended on UI code. That
closed an import cycle: graphql/squads.ts -> SquadPrivacySection ->
SquadCategoryDropdown -> fields/Dropdown -> hooks/index.ts (barrel) ->
useLeaveSquad -> graphql/squads.ts. It also meant every chunk that imports the
squads GraphQL module pulled in the whole hooks barrel.

The enum belongs next to SquadForm, which is typed with it, so it moves there
and the component, SquadManageDetails and useEditSquad import it from the
GraphQL module. graphql/squads.ts no longer reaches the hooks barrel at all.

Structural cleanup only, with no known user-facing bug. This cycle is not
what caused the webpack SSR crash fixed in #6986. Breaking it locally left
that crash unchanged.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Oct 21, 2026 8:46am UTC
storybook Ready Ready Preview Oct 21, 2026 8:46am UTC

Request Review

@idoshamun
idoshamun merged commit a745d5e into main Oct 21, 2026
13 checks passed
@idoshamun
idoshamun deleted the claude/squads-privacy-option-cycle branch October 21, 2026 08:52

This branch was successfully deployed

2 active deployments
Preview – storybook — 3b11c200 Deployed Oct 21, 2026 by vercel[bot]
Preview – daily-webapp — 3b11c200 Deployed Oct 21, 2026 by vercel[bot]
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.

1 participant