Skip to content

refractor: Make TeamPage settings tabs and admin-access extensible#2374

Draft
teeohhem wants to merge 1 commit into
mainfrom
claude/teampage-extension-seam
Draft

refractor: Make TeamPage settings tabs and admin-access extensible#2374
teeohhem wants to merge 1 commit into
mainfrom
claude/teampage-extension-seam

Conversation

@teeohhem
Copy link
Copy Markdown
Contributor

What

Extracts two small extension points out of TeamPage into @/extensions/teamSettings:

  • useTeamSettingsTabs(baseTabs) — transforms the settings tab/section list before render (default: identity).
  • useTeamAdminAccess() — whether the current user can administer the team, gating the team-name edit affordance (default: always allowed).

TeamPage builds its base tabs, passes them through the transform, and reads admin access via the hook.

Why

The team-settings page is a single component that mixes tab composition, admin gating, and rendering. Pulling the composition + admin-access decisions behind small, well-typed seams makes the page composable and testable without editing it directly, and keeps future tab/section additions out of the page body.

Behavior

No behavior change. The default implementations (identity transform, always-allowed admin) preserve current behavior exactly. No resolution plumbing needed — @/extensions/* already resolves to src/extensions/* via the existing tsconfig/jest/next config.

Validation

  • yarn ci:lint ✅ (lint + tsc + stylelint)
  • yarn ci:unit ✅ (1752 passed)

Draft for review.

Extract two small extension points out of TeamPage into
@/extensions/teamSettings:

- useTeamSettingsTabs(baseTabs): transforms the settings tab/section
  list before render (default: identity).
- useTeamAdminAccess(): whether the current user can administer the
  team, gating the team-name edit affordance (default: always allowed).

TeamPage builds its base tabs and passes them through the transform,
and reads admin access via the hook. No behavior change — the defaults
preserve current behavior. This makes the team-settings page composable
and testable without editing the page itself.

No resolution plumbing needed: @/extensions/* already resolves to
src/extensions/* via the existing tsconfig/jest/next config.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

⚠️ No Changeset found

Latest commit: d8d4236

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment May 29, 2026 7:30pm
hyperdx-storybook Ready Ready Preview, Comment May 29, 2026 7:30pm

Request Review

@teeohhem teeohhem changed the title Make TeamPage settings tabs and admin-access extensible refractor: Make TeamPage settings tabs and admin-access extensible May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

E2E Test Results

All tests passed • 189 passed • 3 skipped • 1255s

Status Count
✅ Passed 189
❌ Failed 0
⚠️ Flaky 6
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

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