Skip to content

fix: sidebar load more#3833

Merged
ogzhanolguncu merged 6 commits intomainfrom
fix-sidebar-load
Aug 29, 2025
Merged

fix: sidebar load more#3833
ogzhanolguncu merged 6 commits intomainfrom
fix-sidebar-load

Conversation

@ogzhanolguncu
Copy link
Contributor

@ogzhanolguncu ogzhanolguncu commented Aug 22, 2025

What does this PR do?

This PR

  • Adds project list to sidebar with load more button
  • Fixes broken load more logic that was only working for API route.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Go to /projects
  • Create at least 15 projects
  • See if you can load more from sidebar and when that happens UI should also update projects own load more section. They should match
    -Do these for both APIs and Ratelimits make sure their load mores work properly.

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • New Features
    • Sidebar now lists Projects with active highlighting and “Load more” to fetch more items.
    • Unified “Load more” handling across APIs, Ratelimits, and Projects (handlers receive the triggered item).
  • Style
    • Sidebar items consistently show icons.
    • Ratelimits “More” label is now underlined/styled for clarity.
    • Labels can be richer content (not just plain text).
  • Bug Fixes
    • Pagination only reports a next page when more results exist, improving “More” accuracy.
  • Refactor
    • Navigation props and callbacks standardized for consistent behavior.

@changeset-bot
Copy link

changeset-bot bot commented Aug 22, 2025

⚠️ No Changeset found

Latest commit: 67e4218

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Aug 22, 2025

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

Project Deployment Preview Comments Updated (UTC)
dashboard Ready Ready Preview Comment Aug 22, 2025 0:21am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
engineering Ignored Ignored Preview Aug 22, 2025 0:21am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

📝 Walkthrough

Walkthrough

Consolidates nav props into a new exported NavProps, migrates Flat/Nested/NavItems to use it and changes onLoadMore to receive the item. Adds useProjectNavigation (paginated TRPC), wires projects into the sidebar with load-more handling, widens NavItem.label to accept React nodes, and refines project-list pagination cursor behavior.

Changes

Cohort / File(s) Summary
Nav props unification
apps/.../nav-items/index.tsx, apps/.../nav-items/flat-nav-item.tsx, apps/.../nav-items/nested-nav-item.tsx
Add/export NavProps; migrate NavItems, FlatNavItem, NestedNavItem to use NavProps; change onLoadMore to (item: NavItem) => void; FlatNavItem extracts and renders item.icon; guard pathname logic by typeof item.label === "string"; normalize keys via toString().
Sidebar integration & load-more routing
apps/.../app-sidebar/index.tsx
Wire useProjectNavigation; introduce loadMoreProjects; centralize handleLoadMore to route #load-more-projects, #load-more-apis, #load-more-ratelimits; pass unified onLoadMore={handleLoadMore}; add console.error for unknown hrefs.
Navigation hooks
apps/.../hooks/use-projects-navigation.tsx, apps/.../hooks/use-api-navigation.tsx, apps/.../hooks/use-ratelimit-navigation.tsx
Add useProjectNavigation using TRPC infinite query, derive active project via layout segments, expose enhancedNavItems, isLoading, loadMore; change API load-more href to #load-more-apis; change ratelimits load-more label from string to JSX element.
NavItem type update
apps/.../workspace-navigations.tsx
Expand exported NavItem.label type from string to `string
Projects pagination behavior
apps/dashboard/lib/trpc/routers/deploy/project/list.ts
Enhance cursor predicate to consider updatedAt vs createdAt and nulls; compute nextCursor from updatedAt or createdAt only when hasMore and results exist; adjust hostnames ordering and add null-aware helpers.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Sidebar as Sidebar (App)
  participant NavItems
  participant Hook as useProjectNavigation
  participant TRPC as TRPC (projects.list)
  participant Router as Projects Router

  User->>Sidebar: Open sidebar
  Sidebar->>Hook: useProjectNavigation(baseNavItems)
  Hook->>TRPC: useInfiniteQuery(fetch page, cursor?)
  TRPC->>Router: fetch page
  Router-->>TRPC: { projects, hasMore, nextCursor|null }
  TRPC-->>Hook: pages
  Hook-->>Sidebar: enhancedNavItems + loadMore
  Sidebar->>NavItems: render with NavProps (items include Projects and "More")
  User->>NavItems: Click "More" under Projects
  NavItems->>Sidebar: onLoadMore(item with href "#load-more-projects")
  Sidebar->>Hook: loadMore()
  Hook->>TRPC: fetchNextPage(cursor)
  TRPC->>Router: fetch next page
  Router-->>TRPC: next page data
  TRPC-->>Hook: append page
  Hook-->>Sidebar: updated enhancedNavItems
  Sidebar-->>User: Updated project list
Loading
sequenceDiagram
  autonumber
  participant NavItems
  participant Sidebar as handleLoadMore
  participant APIs as useApiNavigation.loadMore
  participant Proj as useProjectNavigation.loadMore
  participant Rate as useRatelimitNavigation.loadMore

  NavItems->>Sidebar: onLoadMore(item)
  alt item.href == "#load-more-projects"
    Sidebar->>Proj: loadMore()
  else item.href == "#load-more-apis"
    Sidebar->>APIs: loadMore()
  else item.href == "#load-more-ratelimits"
    Sidebar->>Rate: loadMore()
  else
    Sidebar->>Sidebar: console.error("unknown load-more href", item.href)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

Bug, Dashboard, UI

Suggested reviewers

  • mcstepp
  • chronark
  • perkinsjr

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-sidebar-load

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ogzhanolguncu ogzhanolguncu changed the title Fix sidebar load fix: sidebar load Aug 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 22, 2025

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/nested-nav-item.tsx (3)

101-111: Use stable keys: prefer subItem.href over label.toString()

toString() on ReactNode produces "[object Object]" and leads to duplicate keys. href is unique and stable.

-        <SidebarMenuSubItem key={subItem.label?.toString() ?? index}>
+        <SidebarMenuSubItem key={subItem.href ?? String(index)}>

113-141: Fix pending state map: label can be ReactNode; key by href

Current code uses subItem.label as object keys, which breaks when label is not a string and can cause stuck spinners. Key by subItem.href instead.

-    const handleSubItemClick = () => {
+    const handleSubItemClick = () => {
       if (isLoadMoreButton && onLoadMore) {
         onLoadMore(subItem);
         return;
       }
 
       if (!subItem.external && subItem.href) {
         // Track loading state for this specific sub-item
-        const updatedPending = { ...subPending };
-        updatedPending[subItem.label as string] = true;
-        setSubPending(updatedPending);
+        const key = subItem.href;
+        const updatedPending = { ...subPending };
+        if (key) {
+          updatedPending[key] = true;
+          setSubPending(updatedPending);
+        }
 
         // Use a separate transition for sub-items
         // This prevents parent from showing loader
         const subItemTransition = () => {
           router.push(subItem.href);
           // Reset loading state after transition
           setTimeout(() => {
-            const resetPending = { ...subPending };
-            resetPending[subItem.label as string] = false;
-            setSubPending(resetPending);
+            if (key) {
+              const resetPending = { ...updatedPending };
+              resetPending[key] = false;
+              setSubPending(resetPending);
+            }
           }, 300);
         };
 
         // Execute transition without affecting parent's isPending state
         subItemTransition();
       }
     };

And propagate this key usage where pending state is read (see next comment).


144-167: Align keys and pending lookups with href

Finish the refactor by using href for React keys and pending state access.

-      <SidebarMenuSubItem key={subItem.label?.toString() ?? index}>
+      <SidebarMenuSubItem key={subItem.href ?? String(index)}>
         <NavLink
           href={subItem.href}
           external={subItem.external}
           onClick={handleSubItemClick}
           isLoadMoreButton={isLoadMoreButton}
         >
           <SidebarMenuButton
             isActive={subItem.active}
-            className={getButtonStyles(subItem.active, subPending[subItem.label as string])}
+            className={getButtonStyles(subItem.active, subPending[subItem.href ?? ""])}
           >
             {SubIcon ? (
-              subPending[subItem.label as string] ? (
+              subPending[subItem.href ?? ""] ? (
                 <AnimatedLoadingSpinner />
               ) : (
                 <SubIcon size="xl-medium" />
               )
             ) : null}
             <span className="truncate">{subItem.label}</span>
             {subItem.tag && <div className="ml-auto">{subItem.tag}</div>}
           </SidebarMenuButton>
         </NavLink>
       </SidebarMenuSubItem>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1cc6af7 and 002a3d7.

📒 Files selected for processing (9)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/flat-nav-item.tsx (2 hunks)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx (1 hunks)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/nested-nav-item.tsx (6 hunks)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-api-navigation.tsx (1 hunks)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx (1 hunks)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-ratelimit-navigation.tsx (1 hunks)
  • apps/dashboard/components/navigation/sidebar/app-sidebar/index.tsx (3 hunks)
  • apps/dashboard/components/navigation/sidebar/workspace-navigations.tsx (1 hunks)
  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{js,jsx,ts,tsx}: Use Biome for formatting and linting in TypeScript/JavaScript projects
Prefer named exports over default exports in TypeScript/JavaScript, except for Next.js pages

Files:

  • apps/dashboard/components/navigation/sidebar/workspace-navigations.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-ratelimit-navigation.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx
  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-api-navigation.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/index.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/nested-nav-item.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/flat-nav-item.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow strict TypeScript configuration
Use Zod for runtime validation in TypeScript projects

Files:

  • apps/dashboard/components/navigation/sidebar/workspace-navigations.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-ratelimit-navigation.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx
  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-api-navigation.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/index.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/nested-nav-item.tsx
  • apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/flat-nav-item.tsx
**/*.{env,js,ts,go}

📄 CodeRabbit inference engine (CLAUDE.md)

All environment variables must follow the format: UNKEY_<SERVICE_NAME>_VARNAME

Files:

  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
🧠 Learnings (2)
📚 Learning: 2025-08-18T10:28:47.391Z
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#3797
File: apps/dashboard/app/(app)/projects/[projectId]/deployments/components/control-cloud/index.tsx:1-4
Timestamp: 2025-08-18T10:28:47.391Z
Learning: In Next.js App Router, components that use React hooks don't need their own "use client" directive if they are rendered within a client component that already has the directive. The client boundary propagates to child components.

Applied to files:

  • apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx
📚 Learning: 2025-07-25T19:09:43.284Z
Learnt from: mcstepp
PR: unkeyed/unkey#3662
File: apps/dashboard/lib/trpc/routers/deployment/list.ts:11-11
Timestamp: 2025-07-25T19:09:43.284Z
Learning: In apps/dashboard/lib/trpc/routers/deployment/list.ts, the listDeployments procedure intentionally queries the versions table rather than a deployments table. The user mcstepp indicated that renaming the table would require a database migration, which was deferred for the current PR focused on UI features.

Applied to files:

  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
🧬 Code graph analysis (5)
apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx (1)
apps/dashboard/components/navigation/sidebar/workspace-navigations.tsx (1)
  • NavItem (16-29)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx (1)
apps/dashboard/components/navigation/sidebar/workspace-navigations.tsx (1)
  • NavItem (16-29)
apps/dashboard/components/navigation/sidebar/app-sidebar/index.tsx (3)
apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx (1)
  • useProjectNavigation (7-74)
apps/dashboard/components/navigation/sidebar/workspace-navigations.tsx (1)
  • NavItem (16-29)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx (1)
  • NavItems (12-17)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/nested-nav-item.tsx (1)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx (1)
  • NavProps (5-11)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/flat-nav-item.tsx (1)
apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx (1)
  • NavProps (5-11)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test Go API Local / Test
  • GitHub Check: Test API / API Test Local
  • GitHub Check: Build / Build
🔇 Additional comments (6)
apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-api-navigation.tsx (1)

95-95: Correct anchor for API load-more

Switching to "#load-more-apis" aligns with the sidebar dispatcher and prevents cross-wiring with other “More” actions.

Smoke test the three load-more anchors are handled:

  • apis: "#load-more-apis"
  • ratelimits: "#load-more-ratelimits"
  • projects: "#load-more-projects"
apps/dashboard/components/navigation/sidebar/app-sidebar/hooks/use-projects-navigation.tsx (1)

38-61: Projects injection under /projects looks correct

Cloning, enabling sub-items on the /projects parent, appending project items, and adding a single "More" action when hasNextPage is true all look solid and side-effect free with respect to baseNavItems.

apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/index.tsx (1)

12-17: LGTM: Delegation to Flat/Nested is clean

Public API now centralizes the onLoadMore(item) shape and keeps rendering logic minimal.

apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/flat-nav-item.tsx (2)

44-45: Icon rendering path is fine

The loader/icon fallback is correct. With the hook change to icon: null for load-more, this avoids calling a no-op icon component.


18-23: No need to call preventDefault for load-more items
The NavLink component renders a <button type="button"> when isLoadMoreButton is true, so there’s no default anchor navigation or scrolling to intercept. You can safely ignore the suggested e.preventDefault() here.

Likely an incorrect or invalid review comment.

apps/dashboard/components/navigation/sidebar/app-sidebar/components/nav-items/nested-nav-item.tsx (1)

115-117: LGTM: onLoadMore now receives the subItem

Passing the triggering item up enables centralized handling for APIs, Ratelimits, and Projects load-more flows.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/dashboard/lib/trpc/routers/deploy/project/list.ts (2)

38-43: Unify Zod integer-ness for timestamps and cursor (minor type hygiene)

nextCursor is z.number().int().nullish() while createdAt/updatedAt are z.number() (updatedAt nullable). If these are epoch millis, keep them consistently int; otherwise, drop .int() from nextCursor to avoid validation mismatches.

Two options (pick one):

  • Make timestamps and cursor all int:
-  createdAt: z.number(),
-  updatedAt: z.number().nullable(),
+  createdAt: z.number().int(),
+  updatedAt: z.number().int().nullable(),
  • Or allow non-int cursor (most lenient):
-  nextCursor: z.number().int().nullish(),
+  nextCursor: z.number().nullish(),

Also applies to: 26-35


81-128: Search block is safe and performant enough; consider indexes to keep it fast at scale

The EXISTS subquery over routes is correct and scoped by workspace. To avoid full scans as data grows, add/confirm indexes aligned to the filters:

  • projects: (workspaceId, updatedAt DESC) to support the main sort/filter.
  • routes: (workspaceId, projectId, hostname) for the EXISTS and the hostnames lookup.
  • Optional: projects (workspaceId, name), projects (workspaceId, defaultBranch) if search on these becomes frequent.
♻️ Duplicate comments (1)
apps/dashboard/lib/trpc/routers/deploy/project/list.ts (1)

214-217: LGTM: nextCursor falls back to createdAt when updatedAt is null

This aligns pagination with nullable updatedAt and prevents early termination. Nice.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 002a3d7 and 67e4218.

📒 Files selected for processing (1)
  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{js,jsx,ts,tsx}: Use Biome for formatting and linting in TypeScript/JavaScript projects
Prefer named exports over default exports in TypeScript/JavaScript, except for Next.js pages

Files:

  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow strict TypeScript configuration
Use Zod for runtime validation in TypeScript projects

Files:

  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
**/*.{env,js,ts,go}

📄 CodeRabbit inference engine (CLAUDE.md)

All environment variables must follow the format: UNKEY_<SERVICE_NAME>_VARNAME

Files:

  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
🧠 Learnings (1)
📚 Learning: 2025-07-25T19:09:43.284Z
Learnt from: mcstepp
PR: unkeyed/unkey#3662
File: apps/dashboard/lib/trpc/routers/deployment/list.ts:11-11
Timestamp: 2025-07-25T19:09:43.284Z
Learning: In apps/dashboard/lib/trpc/routers/deployment/list.ts, the listDeployments procedure intentionally queries the versions table rather than a deployments table. The user mcstepp indicated that renaming the table would require a database migration, which was deferred for the current PR focused on UI features.

Applied to files:

  • apps/dashboard/lib/trpc/routers/deploy/project/list.ts
🧬 Code graph analysis (1)
apps/dashboard/lib/trpc/routers/deploy/project/list.ts (1)
internal/db/src/schema/projects.ts (1)
  • projects (9-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Test Go API Local / Test
  • GitHub Check: Test API / API Test Local
  • GitHub Check: Build / Build
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
apps/dashboard/lib/trpc/routers/deploy/project/list.ts (1)

2-16: Good: imported null-aware predicates for pagination correctness

Adding isNotNull/isNull (and related db helpers) is the right move to handle nullable updatedAt safely and to keep the keyset pagination logic expressible.

@ogzhanolguncu
Copy link
Contributor Author

@perkinsjr could you review that one?

@graphite-app
Copy link

graphite-app bot commented Aug 28, 2025

Sports gif. A WWE official avatar swings a rubbery arm around and gives an elongated thumbs up. (Added via Giphy)

@graphite-app
Copy link

graphite-app bot commented Aug 28, 2025

Graphite Automations

"Post a GIF when PR approved" took an action on this PR • (08/28/25)

1 gif was posted to this PR based on Andreas Thomas's automation.

@chronark chronark added this pull request to the merge queue Aug 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 28, 2025
@ogzhanolguncu
Copy link
Contributor Author

@chronark @perkinsjr force merge pls

@ogzhanolguncu ogzhanolguncu added this pull request to the merge queue Aug 29, 2025
@chronark
Copy link
Collaborator

why do you want to force merge?

Merged via the queue into main with commit 45e6e76 Aug 29, 2025
18 checks passed
@ogzhanolguncu ogzhanolguncu deleted the fix-sidebar-load branch August 29, 2025 13:58
chronark pushed a commit that referenced this pull request Sep 1, 2025
* feat: add sidebar more and listing for project

This commit also fixes broken load more logic

* fix: query invalidation

* chore: remove comment

* chore: fmt

* fix: coderabbit reviews

* feat: add solo sidebar routes

* fix: allow collapsing when back to menu triggered

* chore: remove unused prop
@coderabbitai coderabbitai bot mentioned this pull request Sep 7, 2025
18 tasks
@coderabbitai coderabbitai bot mentioned this pull request Sep 16, 2025
18 tasks
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.

3 participants