Skip to content

fix(MAJORLEA-006): getSocialIcon duplicated across HiringSection and TableView instead of shared - #89

Draft
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/majorlea-006-e0fa69a0-89424001
Draft

fix(MAJORLEA-006): getSocialIcon duplicated across HiringSection and TableView instead of shared#89
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/majorlea-006-e0fa69a0-89424001

Conversation

@flamingo

@flamingo flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes findings from rule MAJORLEA-006 — getSocialIcon duplicated across HiringSection and TableView instead of shared.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🔴 45 low — review closely getSocialIcon duplicated across HiringSection and TableView instead of shared frontend/src/components/HiringSection.tsx:24

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: 89424001-8db6-4ce6-8840-ab853de69d56

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🦩 What this fix changed, finding by finding

1 finding(s) fixed in this draft — 1 explained inline on the diff; 1 low-confidence hunk(s) need close review before merging.

};

export const HiringSection: React.FC<HiringSectionProps> = ({
hiringManager,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🦩 🟠 getSocialIcon duplicated across HiringSection and TableView instead of shared

In HiringSection.tsx, moved getSocialIcon to module scope (out of the component body, no functional change to callers) and added the missing 'website' case (using LanguageIcon from @mui/icons-material) so it now matches TableView.tsx's behavior for the shared SocialLink type, fixing the silent divergence noted in the finding. Also added a TODO comment documenting the duplication. This does NOT create a true shared module (e.g. in @flamingo/ui-kit or a common utils file) because that would require editing/creating files outside HiringSection.tsx, which was out of scope per the single-file constraint; TableView.tsx's copy still exists separately and must be kept in sync manually until a real shared extraction is done. A complete fix requires: creating a shared getSocialIcon utility (e.g. in @flamingo/ui-kit or a local utils/socialIcons.tsx) and updating both HiringSection.tsx and TableView.tsx to import from it.

🤖 Prompt for AI agents
In frontend/src/components/HiringSection.tsx around line 24, review and complete this code-review fix: getSocialIcon duplicated across HiringSection and TableView instead of shared.
What the draft fix changed: In `HiringSection.tsx`, moved `getSocialIcon` to module scope (out of the component body, no functional change to callers) and added the missing `'website'` case (using `LanguageIcon` from `@mui/icons-material`) so it now matches TableView.tsx's behavior for the shared `SocialLink` type, fixing the silent divergence noted in the finding. Also added a TODO comment documenting the duplication. This does NOT create a true shared module (e.g. in `@flamingo/ui-kit` or a common utils file) because that would require editing/creating files outside `HiringSection.tsx`, which was out of scope per the single-file constraint; TableView.tsx's copy still exists separately and must be kept in sync manually until a real shared extraction is done. A complete fix requires: creating a shared `getSocialIcon` utility (e.g. in `@flamingo/ui-kit` or a local `utils/socialIcons.tsx`) and updating both `HiringSection.tsx` and `TableView.tsx` to import from it.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.

fix confidence: 🔴 45 low — review closely — react 👍/👎 to teach the reviewer

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.

0 participants