Skip to content

Conversation

@sergiocarracedo
Copy link
Collaborator

@sergiocarracedo sergiocarracedo commented Jan 9, 2026

  • chore: lefthoox lint on commit
  • chore: bugbot
  • chore: bugbot
  • chore: test bugbot

Description

Screenshots (if applicable)

[Link to Figma Design](Figma URL here)

Implementation details


Note

Adds a small new component and tightens repo automation.

  • New component: OneTestComponent with CSS and subcomponents TestHeader, TestContent, TestFooter, TestSidebar under src/components/OneTestComponent
  • Repo automation: pre-commit hook now runs package-scoped format and new lint-react on staged React files; packages/react lint/format scripts accept optional path args
  • Code review: adds packages/react/BUGBOT.md with detailed guidelines for imports/exports, types, tests, styling, accessibility, and Storybook

Written by Cursor Bugbot for commit 764e647. This will update automatically on new commits. Configure here.

@github-actions github-actions bot added the react Changes affect packages/react label Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-3210 to install the package

Use pnpm i github:factorialco/f0#213a50944e085e5dbcb2169d21d57af9dbc05c00 to install this specific commit

)
})

OneTestComponent.displayName = "OneTestComponent"
Copy link

Choose a reason for hiding this comment

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

New component not exported in exports.ts (Bugbot Rules)

Medium Severity

The OneTestComponent is added to the components folder but is not exported in components/exports.ts. This violates the BUGBOT.md rule: "Ensure a component in components or experimental is exported in exports.ts". The component will not be accessible to consumers of the package.

Fix in Cursor Fix in Web

)
})

OneTestComponent.displayName = "OneTestComponent"
Copy link

Choose a reason for hiding this comment

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

Component name missing required F0 prefix (Bugbot Rules)

Low Severity

The component is named OneTestComponent but BUGBOT.md specifies "New Components name should start with F0" (e.g., F0Button). The One prefix is reserved for renaming old components, not for new ones.

Fix in Cursor Fix in Web

children?: ReactNode
className?: string
variant?: "default" | "outlined" | "filled"
}
Copy link

Choose a reason for hiding this comment

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

Component exposes className as public prop (Bugbot Rules)

Low Severity

The OneTestComponentProps interface exposes className as a public prop. This violates the BUGBOT.md rule: "Avoid className in public components (can be a private prop)". Multiple component interfaces in this file (TestHeaderProps, TestContentProps, etc.) also expose className.

Fix in Cursor Fix in Web

}
)

TestSidebar.displayName = "TestSidebar"
Copy link

Choose a reason for hiding this comment

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

Component logic in index.tsx instead of separate file (Bugbot Rules)

Low Severity

The component implementation is in index.tsx which violates the BUGBOT.md folder organization rule: "index.tsx the entrypoint of the components, it should only export, not having the logic" and "[COMPONENTNAME].tsx the component code". The types are also defined inline instead of in a separate types.ts file.

Fix in Cursor Fix in Web

export interface OneTestComponentProps {
children?: ReactNode
className?: string
variant?: "default" | "outlined" | "filled"
Copy link

Choose a reason for hiding this comment

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

Union types used instead of const arrays (Bugbot Rules)

Low Severity

Props use inline union types like variant?: "default" | "outlined" | "filled" instead of the pattern specified in BUGBOT.md: using const arrays (export const variants = ['default', 'outlined', 'filled'] as const) with derived types. This applies to variant, padding, align, and position props.

Additional Locations (2)

Fix in Cursor Fix in Web

}
)

TestSidebar.displayName = "TestSidebar"
Copy link

Choose a reason for hiding this comment

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

Component missing required tests and storybook files (Bugbot Rules)

Medium Severity

The OneTestComponent is missing the required __tests__ and __stories__ folders. BUGBOT.md explicitly states that each component in components folder should have these: "__tests__ the components tests" and "__stories__ the storybook files". It also requires "Ensure the components have at least one story file" and lists "Missing test coverage for new components" as a common issue to check.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 37.42% 5772 / 15423
🔵 Statements 36.85% 5893 / 15991
🔵 Functions 26.52% 1224 / 4614
🔵 Branches 27.13% 3293 / 12135
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/components/OneTestComponent/index.tsx 0% 0% 0% 0% 38-127
Generated in workflow #10116 for commit 764e647 by the Vitest Coverage Report Action

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

Labels

react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants