Repository navigation
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…eton addition The two vendor empty-state tests relied on data: undefined triggering the empty state. Now that undefined renders a skeleton, explicitly set data: [] to reach the empty-state branch.
Contributor
7 of 14 tasks
This was referenced Sep 1, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 TLDR
Add a loading skeleton to
VendorsCardon the dashboard so users don't see a false "No vendors added yet" empty state while vendor data is being fetched.📝 Description
The
VendorsCardcomponent on the planning dashboard fetched vendor data client-side viaapi.vendor.getAll.useQuery({}). Before this fix, the component usedvendors?.length ?? 0to computevendorCount, which evaluated to0whilevendorswas stillundefined(i.e., the initial network request was in-flight). This caused the card to immediately flash the empty-state message ("No vendors added yet") and the "Add your first vendor →" CTA for every user on every page load, even users with many vendors already tracked.This Change
vendors === undefined(data still loading), the card now renders animated skeleton placeholders matching the shape of the populated card — a large number skeleton + label skeleton, and three stat-column skeletons below.?.) and nullish-coalescing fallbacks from the stat calculations (selected,inProgress,inReview) since they now only run after theundefinedguard, where TypeScript narrowsvendorstoVendorWithQuotes[].import { Skeleton } from '~/components/ui/skeleton'— the existing skeleton component used throughout the app.Jira Ticket(s): N/A (daily automated improvement)
Recommendations Reviewed
budgetOverview?.totalBudget ?? 0)--font-serif(Merriweather) and--font-mono(Ubuntu Mono) are declared in CSS but the fonts are never loaded, sofont-serifandfont-monoTailwind classes fall back to browser defaultsTasksCardandMilestonesCardhave no loading state at allSelected Improvement
VendorsCard loading skeleton — preventing the false empty-state flash on the dashboard.
Why This Was Selected
Skeletonfrom~/components/ui/skeletonis already used in dozens of loading states across the app (e.g.,src/app/(authenicated)/vendors/loading.tsx).Changes Made
Added a
vendors === undefinedguard at the top ofVendorsCardthat returns a skeleton card matching the populated card's layout:After the guard, the existing empty-state and populated-state branches run on confirmed loaded data.
Files Changed
src/components/dashboard/planning-overview.tsxSkeletonimport; addedvendors === undefinedloading state toVendorsCard; removed optional chaining from narrowed stat calculations🧪 Testing
Skeletonimport path matches component at~/components/ui/skeletonvendors === undefined→ early return; subsequent code hasvendors: VendorWithQuotes[])🧪 How to test as a user
📚 Documentation
🎨 Style and code quality
planning-overview.tsxbiomeinstalled in this environment — reviewed manually; change is minimal and pattern-matched📦 Dependencies
~/components/ui/skeletonis already in the project.Future Recommendations
BudgetCardhas the samebudgetOverview?.totalBudget ?? 0pattern — it shows$0and "of $0 budget used" while data loads. Same fix applies.--font-serif: Merriweatherand--font-mono: Ubuntu Monoare CSS token declarations but neither font is loaded in the project. Classes usingfont-serifandfont-monosilently fall back to browser defaults. The fix requires either addingnext/fontimports for these fonts or updating the tokens to reference fonts that are actually loaded.GitHub Issues Created or Proposed
No new GitHub issues created. The BudgetCard and font-token issues are noted here as follow-up recommendations for the next daily run.
Generated by Claude Code