Skip to content

Rebrand authenticated dashboard#51

Merged
afnanaghai4 merged 2 commits into
masterfrom
feature/dashboard-rebrand
May 24, 2026
Merged

Rebrand authenticated dashboard#51
afnanaghai4 merged 2 commits into
masterfrom
feature/dashboard-rebrand

Conversation

@afnanaghai4

@afnanaghai4 afnanaghai4 commented May 24, 2026

Copy link
Copy Markdown
Owner

Issue

Closes #50

Summary

  • Rebrands the authenticated dashboard with a clearer welcome section, quick action cards, profile readiness CTA, recent jobs panel, and workflow guidance.
  • Uses existing Tailwind styling patterns, existing authenticated page shell, and existing getJobs / getProfile API clients.
  • Adds loading, empty, and error states for dashboard data without changing backend APIs or auth/navigation flow.

Files Changed

  • frontend/components/dashboard/dashboard-content.tsx — updated dashboard intro copy and spacing.
  • frontend/components/dashboard/dashboard-widgets.tsx — rebuilt dashboard widgets with profile completion, recent jobs, quick actions, and workflow sections.
  • frontend/components/dashboard/dashboard-widgets.test.tsx — added component coverage for loaded, empty, and error states.

Tests Added

  • Dashboard renders main CTAs and recent jobs from mocked API data.
  • Dashboard renders empty recent-jobs state.
  • Dashboard renders data-load error state.

Commands Run

  • npm run lint
  • npm run type-check
  • npm run test
  • npm run build

Production Code Changes

Frontend-only dashboard UI changes. No backend changes and no API contract changes.

Known Limitations

  • No screenshot attached from this environment.
  • The initial sandboxed npm run type-check, npm run test, and npm run build attempts hit local permission/network restrictions; reruns completed successfully with the required permissions.

Release Notes

  • Dashboard Redesign: Authenticated dashboard has been redesigned for a more polished and user-friendly experience

    • Improved welcome section with clearer messaging about selecting target jobs
    • Responsive layout with adjusted spacing and padding improvements
  • Enhanced Dashboard Features:

    • Quick action cards for common workflows
    • Profile readiness card showing completion status with progress indicator
    • Recent jobs panel displaying saved jobs with proper empty and error states
    • Workspace summary showing saved jobs count and recent analyses
    • Recommended workflow guidance section
  • Data Fetching & State Management:

    • Dashboard now fetches user profile and recent jobs data on load
    • Proper loading states while data is being retrieved
    • Empty state messaging when no jobs have been saved
    • Error state handling for failed data requests
  • Improved Test Coverage:

    • Comprehensive test suite added for dashboard widget rendering
    • Tests verify successful data loading with API mocks
    • Empty state behavior validated
    • Error handling scenarios covered
  • No Breaking Changes:

    • Frontend-only UI updates with no backend API changes
    • Uses existing getJobs and getProfile API clients
    • Existing authenticated page shell and Tailwind patterns maintained
    • All existing routes remain intact

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@afnanaghai4, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 47 minutes and 39 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a4ca200a-8792-40f9-b20f-d83330ee4a5c

📥 Commits

Reviewing files that changed from the base of the PR and between 83b3b9a and 9a74a47.

📒 Files selected for processing (3)
  • frontend/components/dashboard/dashboard-widgets.test.tsx
  • frontend/components/dashboard/dashboard-widgets.tsx
  • frontend/components/job/job-card.tsx
📝 Walkthrough

Walkthrough

The authenticated dashboard was redesigned from a static server-rendered layout to a client-side component that fetches and displays user job data and profile completion progress. The page layout was updated with adjusted spacing and messaging, the main DashboardWidgets component now fetches jobs and profile data on mount, renders conditional loading/error/success states, and a new test suite validates all three scenarios.

Changes

Dashboard Redesign and Data Integration

Layer / File(s) Summary
Page layout styling updates
frontend/components/dashboard/dashboard-content.tsx
main container padding updated to include md:py-10, vertical spacing between sections reduced from space-y-8 to space-y-6, and descriptive paragraph text replaced with messaging about turning job gaps into practical project work.
Data helpers and type definitions
frontend/components/dashboard/dashboard-widgets.tsx (lines 1–71)
Added "use client" directive, imported React hooks, lucide icons, and API functions (getJobs, getProfile), defined DashboardDataState type, and implemented helper functions getProfileCompletion (with defensive checks for missing/optional fields) and formatDate for job timestamps.
Main dashboard component and data fetching
frontend/components/dashboard/dashboard-widgets.tsx (lines 73–211)
Implemented stateful DashboardWidgets component that fetches jobs (limit 3) and profile via Promise.all on mount, normalizes jobs response into array, derives profileCompletion summary and analyzedJobs count, and renders sections conditionally based on loading/error/success states.
Presentational UI components
frontend/components/dashboard/dashboard-widgets.tsx (lines 241–473)
Added SummaryMetric component for displaying metrics with icons, ActionCard for quick-action navigation links, ProfileCompletionCard for rendering profile progress bar with ARIA attributes and completion label, RecentJobsCard for rendering job list with analysis badges and saved dates (or empty/error state messaging), and WorkflowStep component for workflow guidance cards.
Test suite for DashboardWidgets
frontend/components/dashboard/dashboard-widgets.test.tsx
Configured test module with mocked getJobs and getProfile APIs, fixture data including analyzed and non-analyzed jobs, and helper function mockProfileResponse. Added three test cases: successful load validates rendered job headings, action links, profile progress bar, and API call arguments; empty jobs state checks "No jobs saved yet" message and create link; error state checks error messaging for both jobs and profile-progress.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • afnanaghai4/desperate.io#20: The rewritten DashboardWidgets now client-fetches jobs using getJobs(...), which depends on the paginated API shape ({ jobs, hasMore }) introduced by the jobs page and pagination changes.
  • afnanaghai4/desperate.io#18: Prior PR modified dashboard-widgets.tsx quick actions routing; this PR's complete rewrite supersedes those changes within the same component.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Rebrand authenticated dashboard' directly and clearly describes the main objective of this PR, which is to update the dashboard UI with new sections, styling, and layout.
Linked Issues check ✅ Passed The PR successfully implements all key requirements from issue #50: welcome/hero section, quick action cards, profile completion card, recent jobs panel, loading/empty/error states, and maintains existing routes with no backend changes. All tests pass and styling uses existing Tailwind patterns.
Out of Scope Changes check ✅ Passed All changes are within allowed scope: files modified are dashboard components and tests. No backend files, API contracts, unrelated pages, or new dependencies were altered.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/components/dashboard/dashboard-widgets.tsx`:
- Around line 90-113: The dashboard fetch uses Promise.all so a single rejection
causes both getJobs and getProfile to fail; change to Promise.allSettled (or
fetch each with its own try/catch) so you can handle results individually: call
Promise.allSettled([getJobs(0,3), getProfile()]), check isMounted, then for each
result check status === "fulfilled" to pull jobsResponse (from getJobs) and
profileResponse (from getProfile") and update setData with available pieces
(defaulting jobs: [] and totalCount: 0 and profile: null or previous values)
while only calling setError if both calls failed (or attach per-call errors into
state). Keep references to getJobs, getProfile, jobsResponse/profileResponse,
setData, setError and isMounted when implementing.
- Line 276: Replace the deprecated Tailwind utility "flex-shrink-0" with
"shrink-0" in the affected JSX className strings: update the className in
dashboard-widgets.tsx (the element with className containing "mt-1 h-4 w-4
flex-shrink-0 ...", and the similar occurrence later in the same file around the
other widget) and in job-card.tsx (the element using "flex-shrink-0"). Search
for the literal "flex-shrink-0" and change each to "shrink-0" so Tailwind
v4-compatible classes are used without altering other class tokens.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2083b980-e96b-4676-bd11-bc0e3efd233e

📥 Commits

Reviewing files that changed from the base of the PR and between 1941452 and 83b3b9a.

📒 Files selected for processing (3)
  • frontend/components/dashboard/dashboard-content.tsx
  • frontend/components/dashboard/dashboard-widgets.test.tsx
  • frontend/components/dashboard/dashboard-widgets.tsx

Comment thread frontend/components/dashboard/dashboard-widgets.tsx Outdated
Comment thread frontend/components/dashboard/dashboard-widgets.tsx Outdated
@afnanaghai4

Copy link
Copy Markdown
Owner Author

Addressed the approved CodeRabbitAI review comments.

CodeRabbitAI comments addressed:

  • Replaced all-or-nothing dashboard data loading with independent Promise.allSettled handling so jobs and profile data can render partially when one request fails.
  • Replaced deprecated Tailwind flex-shrink-0 utilities with shrink-0 in the reviewed dashboard file and the explicitly mentioned job card usage.

Files changed:

  • frontend/components/dashboard/dashboard-widgets.tsx
  • frontend/components/dashboard/dashboard-widgets.test.tsx
  • frontend/components/job/job-card.tsx

Commands run from frontend/:

  • npm run lint
  • npm run type-check
  • npm run test
  • npm run build

Known limitations:

  • Initial sandboxed type-check, test, and build attempts hit local cache write or Google Fonts network restrictions; reruns completed successfully with the required permissions.

@afnanaghai4

Copy link
Copy Markdown
Owner Author

@copilot review

Copilot AI commented May 24, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Reviewed. The latest changes in 9a74a47 look good: partial dashboard loading with Promise.allSettled works, tests pass, lint/type-check pass, and no additional fixes are needed from my side.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/desperate.io/desperate.io/frontend/node_modules/.bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@afnanaghai4 afnanaghai4 merged commit a5d8183 into master May 24, 2026
5 checks passed
@afnanaghai4 afnanaghai4 deleted the feature/dashboard-rebrand branch May 24, 2026 14:28
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.

remaking dashboard page.

2 participants