fix(MULTIPLA-002-3): CU-86akhf8u5 2 review findings in tags-editor.tsx - #394
flamingo[bot] wants to merge 1 commit into
Conversation
| @@ -1,7 +1,6 @@ | |||
| 'use client'; | |||
|
|
|||
| import { Button } from '@flamingo-stack/openframe-frontend-core'; | |||
There was a problem hiding this comment.
🦩 🔴 PlusCircle icon imported from lucide-react instead of ui-kit / core icon set
Replaced import { PlusCircle } from 'lucide-react' with PlusCircleIcon imported from @flamingo-stack/openframe-frontend-core in the same named import as Button, and updated the leftIcon={<PlusCircle ... />} usage in the TagsEditor function to <PlusCircleIcon ... />. This matches the pattern cited (PlusCircleIcon in devices-panel-header.tsx) and removes the lucide-react dependency from this file. Assumes PlusCircleIcon is indeed exported from that package's icon set, consistent with the finding's evidence.
🤖 Prompt for AI agents
In src/app/components/shared/tags/tags-editor.tsx around line 3, review and complete this code-review fix: PlusCircle icon imported from lucide-react instead of ui-kit / core icon set.
What the draft fix changed: Replaced `import { PlusCircle } from 'lucide-react'` with `PlusCircleIcon` imported from `@flamingo-stack/openframe-frontend-core` in the same named import as `Button`, and updated the `leftIcon={<PlusCircle ... />}` usage in the `TagsEditor` function to `<PlusCircleIcon ... />`. This matches the pattern cited (PlusCircleIcon in devices-panel-header.tsx) and removes the lucide-react dependency from this file. Assumes `PlusCircleIcon` is indeed exported from that package's icon set, consistent with the finding's evidence.
Verify the change is correct and complete; do not refactor unrelated code.
fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer
| 'use client'; | ||
|
|
||
| import { Button } from '@flamingo-stack/openframe-frontend-core'; | ||
| import { PlusCircle } from 'lucide-react'; | ||
| import { Button, PlusCircleIcon } from '@flamingo-stack/openframe-frontend-core'; | ||
| import { useCallback } from 'react'; | ||
| import { graphql, useLazyLoadQuery } from 'react-relay'; | ||
| import type { tagsEditor_keySuggestions$key as KeySuggestionsFragmentKey } from '@/__generated__/tagsEditor_keySuggestions.graphql'; |
There was a problem hiding this comment.
🦩 🔴 Fragment spread used in tag-row.tsx but not colocated with useFragment call in this file
No code change made in this file for the fragment colocation issue: the fragment tagsEditor_keySuggestions is defined here and only its typed key is passed to TagRow via keySuggentionsRef, which is the existing, arguably correct pattern (parent owns the query/fragment definition, child receives an opaque fragment ref and calls useFragment itself — this is the standard Relay colocation pattern, not a violation). Since I cannot see or edit tag-row.tsx in this task (only this file is in scope), I could not verify or move the useFragment call there. A complete fix would require confirming tag-row.tsx calls useFragment(tagsEditor_keySuggestions, keySuggestionsRef) colocated with its own consumption, which is outside this file's editable scope; no change was made here to avoid speculatively altering the GraphQL contract.
🤖 Prompt for AI agents
In src/app/components/shared/tags/tags-editor.tsx around line 20, review and complete this code-review fix: Fragment spread used in tag-row.tsx but not colocated with useFragment call in this file.
What the draft fix changed: No code change made in this file for the fragment colocation issue: the fragment `tagsEditor_keySuggestions` is defined here and only its typed key is passed to `TagRow` via `keySuggentionsRef`, which is the existing, arguably correct pattern (parent owns the query/fragment definition, child receives an opaque fragment ref and calls `useFragment` itself — this is the standard Relay colocation pattern, not a violation). Since I cannot see or edit `tag-row.tsx` in this task (only this file is in scope), I could not verify or move the `useFragment` call there. A complete fix would require confirming `tag-row.tsx` calls `useFragment(tagsEditor_keySuggestions, keySuggestionsRef)` colocated with its own consumption, which is outside this file's editable scope; no change was made here to avoid speculatively altering the GraphQL contract.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.
fix confidence: 🔴 20 low — review closely — react 👍/👎 to teach the reviewer
Closes 2 review findings in
src/app/components/shared/tags/tags-editor.tsx.Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.
src/app/components/shared/tags/tags-editor.tsx:3src/app/components/shared/tags/tags-editor.tsx:20What 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:
c69bf2d8-6eaa-4e2d-815b-af08b880c8dfMerging 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.
ClickUp task: CU-86akhf8u5 OpenFrame OSS frontend review findings sweep (12 PRs)