Skip to content

feat: implement UI component library and scaffold application structu…#1

Merged
Praashh merged 1 commit into
mainfrom
feat/workflow-ui
Jun 25, 2026
Merged

feat: implement UI component library and scaffold application structu…#1
Praashh merged 1 commit into
mainfrom
feat/workflow-ui

Conversation

@Praashh

@Praashh Praashh commented Jun 25, 2026

Copy link
Copy Markdown
Owner

…re for workflow management

@github-actions

Copy link
Copy Markdown

React Doctor found 40 new issues in 8 files · 40 warnings · score 54 / 100 (Critical) · 11 fixed · vs main

40 warnings

app/app/flow/page.tsx

  • ⚠️ L55 Large component is hard to read and change no-giant-component
  • ⚠️ L55 Many related useState calls prefer-useReducer
  • ⚠️ L78 Client-side redirect for navigation nextjs-no-client-side-redirect
  • ⚠️ L81 Derived value copied into state no-derived-state
  • ⚠️ L203 next/image fill image is missing sizes nextjs-image-missing-sizes
  • ⚠️ L272 next/image fill image is missing sizes nextjs-image-missing-sizes
  • ⚠️ L280 Control missing accessible label control-has-associated-label

app/app/workflows/[id]/page.tsx

  • ⚠️ L55 Large component is hard to read and change no-giant-component
  • ⚠️ L55 Many related useState calls prefer-useReducer
  • ⚠️ L98 Pure function rebuilt every render prefer-module-scope-pure-function
  • ⚠️ L118 Pure function rebuilt every render prefer-module-scope-pure-function
  • ⚠️ L158 Pure function rebuilt every render prefer-module-scope-pure-function
  • ⚠️ L223 Client fetch for server data nextjs-no-client-fetch-for-server-data
  • ⚠️ L223 Data fetching inside an effect no-fetch-in-effect
  • ⚠️ L228 Client-side redirect for navigation nextjs-no-client-side-redirect
  • ⚠️ L263 Client fetch for server data nextjs-no-client-fetch-for-server-data
  • ⚠️ L263 Data fetching inside an effect no-fetch-in-effect
  • ⚠️ L461 Missing effect dependencies exhaustive-deps
  • ⚠️ L518 Pure function rebuilt every render prefer-module-scope-pure-function
  • ⚠️ L543 Plain img ships unoptimized images nextjs-no-img-element
  • ⚠️ L806 Control missing accessible label control-has-associated-label
  • ⚠️ L817 Plain img ships unoptimized images nextjs-no-img-element
  • ⚠️ L826 Control missing accessible label control-has-associated-label
  • ⚠️ L925 Component rendered by inline function call no-render-in-render
  • ⚠️ L991 Control missing accessible label control-has-associated-label
  • ⚠️ L1041 Component rendered by inline function call no-render-in-render
  • ⚠️ L1429 Spread copy before sort() js-tosorted-immutable
  • ⚠️ L1451 Control missing accessible label control-has-associated-label

app/dashboard/page.tsx

  • ⚠️ L43 Many related useState calls prefer-useReducer

app/page.tsx

  • ⚠️ L31 Pure function rebuilt every render prefer-module-scope-pure-function
  • ⚠️ L97 Static value rebuilt every render prefer-module-scope-static-value
  • ⚠️ L106 Static value rebuilt every render prefer-module-scope-static-value
  • ⚠️ L125 Static value rebuilt every render prefer-module-scope-static-value
  • ⚠️ L140 Static value rebuilt every render prefer-module-scope-static-value

app/workflow/[id]/page.tsx

  • ⚠️ L14 Client-side redirect for navigation nextjs-no-client-side-redirect

components/app-sidebar.tsx

  • ⚠️ L74 Control missing accessible label control-has-associated-label
  • ⚠️ L193 Bouncy easing animation no-inline-bounce-easing

components/promo-banner.tsx

  • ⚠️ L27 Pure function rebuilt every render prefer-module-scope-pure-function

components/ui/sidebar.tsx

  • ⚠️ L47 React 19 API migration can break callers no-react19-deprecated-apis
  • ⚠️ L283 Button missing explicit type button-has-type

Reviewed by React Doctor for commit 1571669. See inline comments for fixes.

Comment thread app/app/flow/page.tsx
return `${days}d ago`;
}

export default function FlowPage() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/no-giant-component (warning)

Component "FlowPage" is 354 lines long, which is hard to read & change. Split it into a few smaller components.

Fix → Pull each section into its own component so the parent is easier to read, test, and change.

Docs

Comment thread app/app/flow/page.tsx
return `${days}d ago`;
}

export default function FlowPage() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/prefer-useReducer (warning)

6 useState calls in "FlowPage" can each trigger a separate render.

Fix → Group related state in useReducer so one logical update does not fan out into separate renders.

Docs

Comment thread app/app/flow/page.tsx

useEffect(() => {
if (isLoaded && !isSignedIn) {
router.push("/");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/nextjs-no-client-side-redirect (warning)

router.push() in useEffect flashes the wrong page before redirecting.

Fix → Avoid redirects inside useEffect. Use an event handler, middleware, or server-side redirect (App Router: redirect() from next/navigation; Pages Router: getServerSideProps redirect)

Docs

Comment thread app/app/flow/page.tsx
router.push("/");
return;
}
if (isLoaded) fetchWorkflows();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/no-derived-state (warning)

"workflows" is only set here from other values, so storing it costs an extra render.

Fix → Work out the value while rendering (or with useMemo if it's expensive) instead of copying it into useState through a useEffect. See https://react.dev/learn/you-might-not-need-an-effect#updating-state-based-on-props-or-state

Docs

Comment thread app/app/flow/page.tsx
className="group text-left bg-white border border-gray-200 rounded-xl overflow-hidden hover:shadow-md transition-all cursor-pointer flex flex-col w-full"
>
<div className="aspect-[4/3] relative overflow-hidden bg-gray-100 w-full">
<Image

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/nextjs-image-missing-sizes (warning)

next/image uses fill without sizes, so your users download the largest image.

Fix → Add sizes matching your layout so next/image does not assume the largest candidate and make users download oversized images.

Docs

<Tooltip>
<TooltipTrigger
render={
<button

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/control-has-associated-label (warning)

Blind users can't tell what this control does because screen readers find no label, so add visible text, aria-label, or aria-labelledby.

Fix → Give every interactive control a label screen readers can read.

Docs

<Gift className="size-5" />
Claim Offer
</Button>
<ChevronDown className="size-4 text-gray-400 -mt-0.5 animate-bounce-subtle" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/no-inline-bounce-easing (warning)

Your users see a dated, tacky animate-bounce, so use a subtle ease-out transform for a smoother finish.

Fix → Use cubic-bezier(0.16, 1, 0.3, 1) (ease-out-expo) for a natural finish. Real objects don't bounce.

Docs

return () => clearInterval(interval);
}, []);

const pad = (n: number) => String(n).padStart(2, "0");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/prefer-module-scope-pure-function (warning)

pad inside PromoBanner uses no local state but is rebuilt on every render, so it wastes work & breaks memoized children. Move it to the top of the file, outside the component.

Fix → Move the function above the component, at the top of the file. It doesn't use local state, so rebuilding it each update is wasted work.

Docs

Comment thread components/ui/sidebar.tsx
const SidebarContext = React.createContext<SidebarContextProps | null>(null);

function useSidebar() {
const context = React.useContext(SidebarContext);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/no-react19-deprecated-apis (warning)

useContext is replaced by use() in React 19, which reads context inside ifs & loops too, so switch to import { use } from 'react'.

Fix → Pass ref as a normal prop on function components, since forwardRef isn't needed in React 19. Replace useContext(X) with use(X). Only runs on React 19+ projects.

Docs

Comment thread components/ui/sidebar.tsx
const { toggleSidebar } = useSidebar();

return (
<button

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/button-has-type (warning)

Your users can submit the form by accident because a <button> with no type defaults to submit.

Fix → Set an explicit button type so plain buttons do not submit forms by accident: type="button", "submit", or "reset".

Docs

@Praashh
Praashh merged commit 21d35c1 into main Jun 25, 2026
2 checks passed
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