Skip to content

Add FlowIconText component for UI v2 migration#176

Open
tomerqodo wants to merge 3 commits intoqodo_claude_vs_qodo_base_add_flowicontext_component_for_ui_v2_migration_pr9from
qodo_claude_vs_qodo_head_add_flowicontext_component_for_ui_v2_migration_pr9
Open

Add FlowIconText component for UI v2 migration#176
tomerqodo wants to merge 3 commits intoqodo_claude_vs_qodo_base_add_flowicontext_component_for_ui_v2_migration_pr9from
qodo_claude_vs_qodo_head_add_flowicontext_component_for_ui_v2_migration_pr9

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#9

devin-ai-integration Bot and others added 3 commits January 25, 2026 12:10
Create a new FlowIconText component that displays a flow's icon and name
as a clickable link, fetching flow data by ID. This component follows the
existing Suspense pattern used in similar link components like FlowLink
and DeploymentLink.

Files added:
- flow-icon-text.tsx: Main component with Suspense wrapper
- flow-icon-text.stories.tsx: Storybook stories
- flow-icon-text.test.tsx: Unit tests
- index.ts: Export file

Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
Add RouterProvider decorator to the Storybook story so the component
renders correctly in Storybook. The Link component from TanStack Router
requires a router context to function properly.

Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add FlowIconText component for UI v2 migration

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add FlowIconText component displaying flow icon and name
• Component fetches flow data by ID using Suspense pattern
• Includes Storybook stories with RouterProvider decorator
• Provides unit tests and proper TypeScript exports
Diagram
flowchart LR
  A["FlowIconText Component"] --> B["Suspense Wrapper"]
  B --> C["FlowIconTextImplementation"]
  C --> D["useSuspenseQuery"]
  D --> E["buildFLowDetailsQuery"]
  C --> F["Link to Flow Details"]
  F --> G["Icon + Flow Name"]
Loading

Grey Divider

File Changes

1. ui-v2/src/components/flows/flow-icon-text/index.ts ✨ Enhancement +1/-0

Export FlowIconText component

• Exports FlowIconText component for public API

ui-v2/src/components/flows/flow-icon-text/index.ts


2. ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx ✨ Enhancement +33/-0

Implement FlowIconText component with data fetching

• Creates FlowIconText component with Suspense wrapper pattern
• Fetches flow data using useSuspenseQuery and buildFLowDetailsQuery
• Renders clickable Link with Workflow icon and flow name
• Follows existing component patterns for similar link components

ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx


3. ui-v2/src/components/flows/flow-icon-text/flow-icon-text.stories.tsx 🧪 Tests +66/-0

Add Storybook stories with router setup

• Creates Storybook stories with RouterProvider and QueryClientProvider decorators
• Sets up test router with memory history for component rendering
• Includes Default story with flow-123 as example flowId
• Provides component documentation in docs parameters

ui-v2/src/components/flows/flow-icon-text/flow-icon-text.stories.tsx


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Mar 10, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Missing flow-icon-text.test.tsx 📘 Rule violation ⛯ Reliability
Description
A new React component flow-icon-text.tsx was added without a co-located flow-icon-text.test.tsx
in the same directory. This reduces test discoverability and violates the required component/test
co-location convention.
Code

ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[R12-18]

+export const FlowIconText = ({ flowId }: FlowIconTextProps) => {
+	return (
+		<Suspense>
+			<FlowIconTextImplementation flowId={flowId} />
+		</Suspense>
+	);
+};
Evidence
Compliance rule 10 requires each component.tsx to have a component.test.tsx in the same
directory; the PR adds FlowIconText but no corresponding test file is present alongside it.

AGENTS.md
ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[12-18]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new React component was added without a co-located `*.test.tsx` file in the same directory, violating the required test co-location convention.

## Issue Context
The component `FlowIconText` was introduced under `ui-v2/src/components/flows/flow-icon-text/`, but there is no `flow-icon-text.test.tsx` alongside it.

## Fix Focus Areas
- ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[12-18]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Unused Skeleton import 🐞 Bug ✓ Correctness
Description
FlowIconText imports Skeleton but never uses it; with noUnusedLocals enabled this causes a
TypeScript compile error and breaks the ui-v2 build.
Code

ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[R4-6]

+import { buildFLowDetailsQuery } from "@/api/flows";
+import { Icon } from "@/components/ui/icons";
+import { Skeleton } from "@/components/ui/skeleton";
Evidence
The project enables TypeScript’s unused-local checking, and the new component imports Skeleton
without referencing it anywhere in the file; this fails compilation.

ui-v2/tsconfig.app.json[18-25]
ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[1-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`FlowIconText` imports `Skeleton` but does not use it. With `noUnusedLocals: true`, this fails TypeScript compilation for ui-v2.

### Issue Context
The repo’s `ui-v2/tsconfig.app.json` enforces unused locals as errors.

### Fix Focus Areas
- ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[1-33]
- ui-v2/tsconfig.app.json[18-25]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Blank loading state 🐞 Bug ⛯ Reliability
Description
FlowIconText wraps a suspenseful query in a Suspense boundary without a fallback, so it shows no
placeholder while loading and diverges from the established FlowLink UX pattern.
Code

ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[R12-17]

+export const FlowIconText = ({ flowId }: FlowIconTextProps) => {
+	return (
+		<Suspense>
+			<FlowIconTextImplementation flowId={flowId} />
+		</Suspense>
+	);
Evidence
FlowIconText introduces a Suspense boundary with no fallback even though it uses useSuspenseQuery;
the existing analogous FlowLink component provides a Skeleton fallback for the same flow-details
query pattern.

ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[12-17]
ui-v2/src/components/flows/flow-link.tsx[12-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`FlowIconText` wraps `useSuspenseQuery(...)` in `&lt;Suspense&gt;` without a fallback, resulting in an empty placeholder during loading and inconsistent behavior versus `FlowLink`.

### Issue Context
`FlowLink` is a highly similar component that uses a `Skeleton` fallback while fetching the same flow-details query.

### Fix Focus Areas
- ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[12-17]
- ui-v2/src/components/flows/flow-link.tsx[12-17]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +12 to +18
export const FlowIconText = ({ flowId }: FlowIconTextProps) => {
return (
<Suspense>
<FlowIconTextImplementation flowId={flowId} />
</Suspense>
);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Missing flow-icon-text.test.tsx 📘 Rule violation ⛯ Reliability

A new React component flow-icon-text.tsx was added without a co-located flow-icon-text.test.tsx
in the same directory. This reduces test discoverability and violates the required component/test
co-location convention.
Agent Prompt
## Issue description
A new React component was added without a co-located `*.test.tsx` file in the same directory, violating the required test co-location convention.

## Issue Context
The component `FlowIconText` was introduced under `ui-v2/src/components/flows/flow-icon-text/`, but there is no `flow-icon-text.test.tsx` alongside it.

## Fix Focus Areas
- ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[12-18]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +4 to +6
import { buildFLowDetailsQuery } from "@/api/flows";
import { Icon } from "@/components/ui/icons";
import { Skeleton } from "@/components/ui/skeleton";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Unused skeleton import 🐞 Bug ✓ Correctness

FlowIconText imports Skeleton but never uses it; with noUnusedLocals enabled this causes a
TypeScript compile error and breaks the ui-v2 build.
Agent Prompt
### Issue description
`FlowIconText` imports `Skeleton` but does not use it. With `noUnusedLocals: true`, this fails TypeScript compilation for ui-v2.

### Issue Context
The repo’s `ui-v2/tsconfig.app.json` enforces unused locals as errors.

### Fix Focus Areas
- ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[1-33]
- ui-v2/tsconfig.app.json[18-25]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +12 to +17
export const FlowIconText = ({ flowId }: FlowIconTextProps) => {
return (
<Suspense>
<FlowIconTextImplementation flowId={flowId} />
</Suspense>
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

3. Blank loading state 🐞 Bug ⛯ Reliability

FlowIconText wraps a suspenseful query in a Suspense boundary without a fallback, so it shows no
placeholder while loading and diverges from the established FlowLink UX pattern.
Agent Prompt
### Issue description
`FlowIconText` wraps `useSuspenseQuery(...)` in `<Suspense>` without a fallback, resulting in an empty placeholder during loading and inconsistent behavior versus `FlowLink`.

### Issue Context
`FlowLink` is a highly similar component that uses a `Skeleton` fallback while fetching the same flow-details query.

### Fix Focus Areas
- ui-v2/src/components/flows/flow-icon-text/flow-icon-text.tsx[12-17]
- ui-v2/src/components/flows/flow-link.tsx[12-17]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant