Skip to content

simpler user components#29063

Open
chrisnojima-zoom wants to merge 1 commit intonojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-simpler-user
Open

simpler user components#29063
chrisnojima-zoom wants to merge 1 commit intonojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-simpler-user

Conversation

@chrisnojima-zoom
Copy link
Contributor

  • test

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors several user profile and teams UI components to simplify props usage, extract helper functions/components, and make state/logic more readable (notably around teams showcase, profile bio/proofs layout, and action button rendering).

Changes:

  • Simplified multiple components by destructuring props and extracting helpers (teams showcase, friend tiles, action buttons).
  • Restructured the profile screen into smaller subcomponents/helpers (bio/proofs panels, friends section item building).
  • Refactored useUserData into smaller pure helpers for base/SBS/Keybase profile state derivation.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shared/profile/user/teams/teaminfo.tsx Simplifies TeamInfo by destructuring props and inlining derived strings/handlers.
shared/profile/user/teams/index.tsx Cleans up teams showcase container logic and factors membership calculation into a helper.
shared/profile/user/index.tsx Large refactor splitting profile UI into smaller components and extracting helper functions for friends/sections.
shared/profile/user/hooks.tsx Refactors useUserData into composable helpers for clearer profile state derivation.
shared/profile/user/friend.tsx Simplifies Friend component and extracts follow icon selection logic.
shared/profile/user/actions/index.tsx Extracts action button selection into getButtons and factors dropdown item construction.
shared/profile/user/actions/follow-button.tsx Simplifies FollowButton implementation and hover handling.
AGENTS.md Adds repo note about React Compiler expectations for React code edits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return styles.typedBackgroundGreen
case 'blue':
return styles.typedBackgroundBlue
default:
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This switch has an intentional fallthrough from case 'blue' into default, which will be flagged by ESLint's no-fallthrough (the repo extends eslint:recommended). Since BackgroundColorType is already a closed union, consider returning in the 'blue' case and removing the default branch (or add an explicit fallthrough comment if you want to keep the structure).

Suggested change
default:

Copilot uses AI. Check for mistakes.
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