Skip to content

Conversation

@pasqualevitiello
Copy link
Contributor

@pasqualevitiello pasqualevitiello commented Dec 15, 2025

Summary by cubic

Adds a new examples app that demonstrates a Cal.com-style shell using @coss/ui in Next.js. Includes a responsive sidebar, mobile header/footer, and an Event Types page.

  • New Features

    • Next.js app in apps/examples with theme and toast providers, custom fonts.
    • Sidebar system with tooltips, collapsible groups, menus, and badges.
    • Navigation components (main and secondary) powered by lib/navigation-data.
    • Event Types page with search, duration badges, hide toggle, and action menus.
    • Mobile header/footer with scroll-hide behavior and quick actions.
    • User menu with profile, settings, help, and sign-out.
  • Dependencies

    • Added package.json for the examples app and updated bun.lock.
    • next.config transpiles @coss/ui; PostCSS config imported from @coss/ui.
    • Tailwind v4 setup via @tailwindcss/postcss and globals.css.
    • Shared CalSans fonts via @coss/ui/fonts; updated packages/ui exports and examples imports.

Written for commit 09183f7. Summary will update automatically on new commits.

@vercel
Copy link

vercel bot commented Dec 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
coss-com Ready Ready Preview, Comment Dec 15, 2025 7:30pm
coss-com-origin Ready Ready Preview, Comment Dec 15, 2025 7:30pm
coss-com-ui Ready Ready Preview, Comment Dec 15, 2025 7:30pm

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 26 files

Prompt for AI agents (all 4 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/examples/components/ui/sidebar.tsx">

<violation number="1" location="apps/examples/components/ui/sidebar.tsx:369">
P2: Using `Math.random()` in `useMemo` will cause hydration mismatches because the value generated on the server differs from the client. Consider using `useId()` to generate a deterministic seed, or move the random calculation to a `useEffect` with state, or use a CSS-based solution for the varying widths.</violation>
</file>

<file name="apps/examples/components/header-actions.tsx">

<violation number="1" location="apps/examples/components/header-actions.tsx:31">
P2: Avatar fallback initials &quot;CC&quot; don&#39;t match the alt text &quot;Luke Tracy&quot;. Consider using &quot;LT&quot; for consistency, or update the alt text to match the intended user.</violation>
</file>

<file name="apps/examples/components/nav-main.tsx">

<violation number="1" location="apps/examples/components/nav-main.tsx:156">
P2: Inconsistent use of Next.js `Link` vs plain `&lt;a&gt;` tags. The MenuPopup uses `&lt;Link&gt;` for client-side navigation, but this SidebarMenuSubButton uses a plain `&lt;a&gt;` tag which causes a full page reload. Use `&lt;Link&gt;` for consistent SPA navigation.</violation>

<violation number="2" location="apps/examples/components/nav-main.tsx:179">
P2: Use Next.js `Link` instead of plain `&lt;a&gt;` tag for consistent client-side navigation behavior.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

showIcon?: boolean;
}) {
// Random width between 50 to 90%.
const width = React.useMemo(() => {
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 15, 2025

Choose a reason for hiding this comment

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

P2: Using Math.random() in useMemo will cause hydration mismatches because the value generated on the server differs from the client. Consider using useId() to generate a deterministic seed, or move the random calculation to a useEffect with state, or use a CSS-based solution for the varying widths.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/examples/components/ui/sidebar.tsx, line 369:

<comment>Using `Math.random()` in `useMemo` will cause hydration mismatches because the value generated on the server differs from the client. Consider using `useId()` to generate a deterministic seed, or move the random calculation to a `useEffect` with state, or use a CSS-based solution for the varying widths.</comment>

<file context>
@@ -0,0 +1,475 @@
+  showIcon?: boolean;
+}) {
+  // Random width between 50 to 90%.
+  const width = React.useMemo(() =&gt; {
+    return `${Math.floor(Math.random() * 40) + 50}%`;
+  }, []);
</file context>
Fix with Cubic

alt="Luke Tracy"
src="https://pbs.twimg.com/profile_images/1994776674391457792/7utKOMi6_400x400.jpg"
/>
<AvatarFallback>CC</AvatarFallback>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 15, 2025

Choose a reason for hiding this comment

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

P2: Avatar fallback initials "CC" don't match the alt text "Luke Tracy". Consider using "LT" for consistency, or update the alt text to match the intended user.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/examples/components/header-actions.tsx, line 31:

<comment>Avatar fallback initials &quot;CC&quot; don&#39;t match the alt text &quot;Luke Tracy&quot;. Consider using &quot;LT&quot; for consistency, or update the alt text to match the intended user.</comment>

<file context>
@@ -0,0 +1,39 @@
+                alt=&quot;Luke Tracy&quot;
+                src=&quot;https://pbs.twimg.com/profile_images/1994776674391457792/7utKOMi6_400x400.jpg&quot;
+              /&gt;
+              &lt;AvatarFallback&gt;CC&lt;/AvatarFallback&gt;
+            &lt;/Avatar&gt;
+          &lt;/Link&gt;
</file context>
Fix with Cubic

className="font-medium text-sidebar-foreground"
isActive={item.isActive}
render={
<a href={item.url}>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 15, 2025

Choose a reason for hiding this comment

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

P2: Use Next.js Link instead of plain <a> tag for consistent client-side navigation behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/examples/components/nav-main.tsx, line 179:

<comment>Use Next.js `Link` instead of plain `&lt;a&gt;` tag for consistent client-side navigation behavior.</comment>

<file context>
@@ -0,0 +1,209 @@
+        className=&quot;font-medium text-sidebar-foreground&quot;
+        isActive={item.isActive}
+        render={
+          &lt;a href={item.url}&gt;
+            &lt;item.icon /&gt;
+            &lt;span className=&quot;md:max-lg:hidden lg:inline&quot;&gt;{item.title}&lt;/span&gt;
</file context>
Fix with Cubic

<SidebarMenuSubButton
className="from-secondary to-secondary/64 ps-8.5 hover:bg-transparent active:bg-transparent data-[active=true]:bg-linear-to-tr"
render={
<a href={subItem.url}>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 15, 2025

Choose a reason for hiding this comment

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

P2: Inconsistent use of Next.js Link vs plain <a> tags. The MenuPopup uses <Link> for client-side navigation, but this SidebarMenuSubButton uses a plain <a> tag which causes a full page reload. Use <Link> for consistent SPA navigation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/examples/components/nav-main.tsx, line 156:

<comment>Inconsistent use of Next.js `Link` vs plain `&lt;a&gt;` tags. The MenuPopup uses `&lt;Link&gt;` for client-side navigation, but this SidebarMenuSubButton uses a plain `&lt;a&gt;` tag which causes a full page reload. Use `&lt;Link&gt;` for consistent SPA navigation.</comment>

<file context>
@@ -0,0 +1,209 @@
+                &lt;SidebarMenuSubButton
+                  className=&quot;from-secondary to-secondary/64 ps-8.5 hover:bg-transparent active:bg-transparent data-[active=true]:bg-linear-to-tr&quot;
+                  render={
+                    &lt;a href={subItem.url}&gt;
+                      &lt;span&gt;{subItem.title}&lt;/span&gt;
+                    &lt;/a&gt;
</file context>
Fix with Cubic

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.

2 participants