Skip to content

[codex] Improve homepage and dashboard overview - #1197

Merged
Asherlc merged 7 commits into
mainfrom
Asherlc/improve-homepage-design
May 28, 2026
Merged

Asherlc merged 7 commits into
mainfrom
Asherlc/improve-homepage-design

Conversation

@Asherlc

@Asherlc Asherlc commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Redesigns the homepage around a truthful product mock that matches the live overview panel.
Reworks the app shell and dashboard so /dashboard is a single evidence overview with daily rings, evidence cards, and Health Monitor.
Adds focused tests and Storybook stories for the new header, daily summary embedding, and dashboard evidence overview.
Adds roadmap documentation for a future getting-started flow and makes the web dev proxy target configurable.

Validation

  • pnpm lint
  • pnpm test:changed
  • pnpm tsc --noEmit
  • cd packages/server && pnpm tsc --noEmit
  • cd packages/web && pnpm tsc --noEmit
  • pnpm --filter dofek-web build

Summary by cubic

Redesigned the homepage and /dashboard around a focused evidence overview with a new “evidence desk” sidebar shell. The landing page mirrors the live overview with simpler copy, inclusive date ranges, and a clear mobile app path.

  • New Features

    • Unified /dashboard with DashboardEvidenceOverview (daily rings, evidence cards, Health Monitor) plus plain trend/correlation labels and an inclusive date range.
    • Evidence-desk shell: sidebar AppHeader (nav label now “Overview”) and updated PageLayout; DailyOverview adds embedded mode, hero styling, and ARIA “Daily health summary”.
    • Landing page mirrors the overview, removes broad/technical/hosted claims, and highlights the mobile app; values are unit-aware.
    • Added stories/tests for header, layout, overview helpers, and landing copy; updated web E2E to match new copy and ARIA nav semantics (Steps health metric and training sub-tabs).
  • Migration

    • Optional: set DOFEK_API_PROXY_TARGET for packages/web dev proxy if your API is not on http://localhost:3000.

Written for commit 8141507. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

Release Notes

  • New Features

    • Redesigned dashboard with evidence-based insights showing data correlations and health trends
    • Completely reimagined landing page with updated product messaging and demo preview
    • Improved mobile and desktop navigation layouts
  • Documentation

    • Added product roadmap with near-term onboarding goals and feature opportunities
  • Refactors

    • Restructured dashboard components for better organization and performance

Review Change Stack

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @Asherlc, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR restructures the web dashboard UI by moving navigation into a sticky sidebar, replacing the multi-section collapsible dashboard with an evidence-focused overview component, and redesigning the landing page around product narrative. It consolidates scattered dashboard sections into DashboardEvidenceOverview with reusable helper functions, updates layout and styling to support the sidebar navigation model, and refactors supporting tests and documentation.

Changes

Dashboard Evidence Redesign with Navigation Restructuring

Layer / File(s) Summary
Navigation and Layout Restructuring
packages/web/src/components/AppHeader.tsx, packages/web/src/components/AppHeader.test.tsx, packages/web/src/components/AppHeader.stories.tsx, packages/web/src/components/PageLayout.tsx, packages/web/src/components/PageLayout.test.tsx
AppHeader reorganized into desktop sticky sidebar and mobile collapsible header. Navigation link styling centralized into desktop/mobile class constants with separate active states. PageLayout updated to responsive flex layout and no longer forwards header children. Comprehensive test and Storybook coverage added.
Dashboard Evidence Component Foundation
packages/web/src/components/DailyOverview.tsx, packages/web/src/components/DailyOverview.test.tsx, packages/web/src/components/DashboardEvidenceOverview.tsx, packages/web/src/components/DashboardEvidenceOverview.test.tsx, packages/web/src/components/DashboardEvidenceOverview.stories.tsx
New DashboardEvidenceOverview component renders evidence cards for correlation, trend, sources, and daily summary. Exports helpers: formatDashboardRange(), correlationStrengthLabel(), trendPositionLabel(), and DashboardTrendSnapshot interface. DailyOverview enhanced with optional embedded prop for card-style rendering. Includes Storybook stories (Default, Loading, Empty) and tests for helpers and rendering.
Dashboard Page Simplification
packages/web/src/pages/Dashboard.tsx, packages/web/src/pages/Dashboard.test.ts
Dashboard refactored from multi-section grid to single DashboardEvidenceOverview. Queries reduced to readiness/workload/strain/sleep/trends/insights; derives single topInsight after filtering insufficient insights by effect size. Removed grid pair constants, secondary query delay, and related schemas. Tests updated to remove grid/layout validation.
Landing Page Evidence-Focused Redesign
packages/web/src/pages/LandingPage.tsx, packages/web/src/pages/LandingPage.test.tsx
Landing page completely redesigned with evidence-focused narrative. New content constants drive section rendering (hero proof points, analysis cards, pillars, inspection, trust, pricing). Integrations grid replaced with ProviderStrip filtered to usable providers. Dashboard preview mock rebuilt with DailySummaryPreview and evidence card panels. New inline SVG icons (CheckCircleIcon, NetworkIcon, BarIcon, ArchiveIcon) and chart helpers (ScatterPlot, LineChart). Tests updated for new copy and UI patterns.
Styling, Configuration, and Documentation
packages/web/src/index.css, .codex/config.toml, docs/README.md, docs/roadmap.md
card border-radius reduced to 0.5rem; new .dashboard-hero class added with gradient background. --color-danger theme variable added. Codex MCP config updated: GitHub server replaced with Axiom server. Documentation: roadmap.md added with "Getting Started Flow" onboarding section; README.md navigation reorganized to include roadmap under both "Start Here" and "Architecture And Product Flows" sections.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Asherlc/dofek#1123: Modifies AppHeader navigation to add /activities route alongside existing navigation items.

Suggested labels

area/web, type/feature, type/refactor, breaking-change

Suggested reviewers

  • cubic-dev-ai
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title uses imperative mood, stays well under 70 characters (47 chars), includes the relevant area prefix [codex], and has no trailing punctuation.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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.

@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Storybook previews for a745d93a are ready:

This comment updates automatically on each PR push.

@Asherlc
Asherlc marked this pull request as ready for review May 28, 2026 02:09
Copilot AI review requested due to automatic review settings May 28, 2026 02:09
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@surmado-code-review

surmado-code-review Bot commented May 28, 2026

Copy link
Copy Markdown

Automated Checks (advisory, non-blocking)

  • ⚠️ Missing dependency@storybook/react-vite used in src/components/AppHeader.stories.tsx b/packages/web/src/components/AppHeader.stories.tsx exists on npm but is not in package.json. Run npm install @storybook/react-vite and add it to your manifest.
  • ⚠️ Missing dependencyreact used in src/components/AppHeader.stories.tsx b/packages/web/src/components/AppHeader.stories.tsx exists on npm but is not in package.json. Run npm install react and add it to your manifest.
  • Hallucinated package@dofek/format used in src/pages/LandingPage.tsx b/packages/web/src/pages/LandingPage.tsx does not exist on npm. This package appears to be invented by AI.
  • Hallucinated package@dofek/scoring used in src/pages/LandingPage.tsx b/packages/web/src/pages/LandingPage.tsx does not exist on npm. This package appears to be invented by AI.
    ✅ No other issues detected.

Surmado Code Review — Free tier limit reached

You've used all 10 free reviews this month. Deterministic checks (secrets, model strings) still ran above.

Upgrade to the Paid plan for 100 reviews/month + $15 per additional 100: https://app.surmado.com/checkout?plan=pr_review_starter

Or wait until your next monthly window for 10 more free reviews.


Surmado Code Review (v1.2-mt)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Redesigns the public landing experience and consolidates /dashboard into a single “evidence overview” panel, while updating the app shell to a sidebar-based layout and adding targeted UI tests/stories.

Changes:

  • Makes the web dev proxy target configurable via DOFEK_API_PROXY_TARGET.
  • Rebuilds the landing page content and demo preview to match the new “evidence” framing (sources, daily summary, correlation/trend panels, health monitor).
  • Refactors the dashboard into DashboardEvidenceOverview, updates PageLayout/AppHeader to an “evidence desk” sidebar shell, and adds Storybook + tests.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/web/vite.config.ts Adds configurable proxy target for dev server routes.
packages/web/src/pages/LandingPage.tsx Reworks landing page layout/content and demo preview to match dashboard overview.
packages/web/src/pages/LandingPage.test.tsx Updates assertions to align with new landing copy and structure.
packages/web/src/pages/Dashboard.tsx Simplifies /dashboard into a single evidence overview composition.
packages/web/src/pages/Dashboard.test.ts Removes tests for deleted section-layout system; keeps helper tests.
packages/web/src/index.css Tweaks card radius and adds .dashboard-hero styling used by overview panels.
packages/web/src/components/PageLayout.tsx Converts layout to sidebar shell + content toolbar (header controls moved into main area).
packages/web/src/components/PageLayout.test.tsx Adds coverage for new shell structure and “render once” header controls behavior.
packages/web/src/components/DashboardEvidenceOverview.tsx Introduces the unified dashboard evidence overview component + helpers.
packages/web/src/components/DashboardEvidenceOverview.test.tsx Adds helper tests and a rendering/ordering smoke test for the new overview.
packages/web/src/components/DashboardEvidenceOverview.stories.tsx Adds Storybook story for the new overview component.
packages/web/src/components/DailyOverview.tsx Adds embedded mode and updates markup/styling for dashboard embedding.
packages/web/src/components/DailyOverview.test.tsx Adds tests for new embedded behavior and evidence-desk styling.
packages/web/src/components/AppHeader.tsx Replaces top header with mobile header + desktop sidebar navigation.
packages/web/src/components/AppHeader.test.tsx Adds tests for sidebar/mobile header rendering.
packages/web/src/components/AppHeader.stories.tsx Adds Storybook stories for the new header layout with router context.
docs/roadmap.md Adds product roadmap notes (esp. getting-started flow).
docs/README.md Links the new roadmap doc in docs index/table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/web/src/components/DashboardEvidenceOverview.tsx

@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: 10

Caution

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

⚠️ Outside diff range comments (1)
packages/web/src/pages/LandingPage.tsx (1)

111-115: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Handle query loading/error explicitly instead of collapsing to empty data.

Line 114 uses usableProviders.data ?? [], which turns fetch failures into a false “no supported sources” empty state. Split loading/error/empty states in the page and only render LandingPageView with resolved data.

Suggested fix
 import { activityMetricColors } from "`@dofek/scoring/colors`";
 import { Link } from "`@tanstack/react-router`";
+import { QueryStatePanel } from "../components/QueryStatePanel.tsx";
 import { trpc } from "../lib/trpc.ts";

 export function LandingPage() {
   const usableProviders = trpc.sync.usableProviders.useQuery();

-  return <LandingPageView usableProviders={usableProviders.data ?? []} />;
+  if (usableProviders.isLoading) {
+    return <QueryStatePanel state="loading" title="Loading supported sources" />;
+  }
+
+  if (usableProviders.error) {
+    return (
+      <QueryStatePanel
+        state="error"
+        title="Unable to load supported sources"
+        message={usableProviders.error.message}
+      />
+    );
+  }
+
+  return <LandingPageView usableProviders={usableProviders.data} />;
 }

As per coding guidelines: packages/web/src/pages/**/*.{ts,tsx} — “Treat loading, error, and empty as separate UI states. Do not use query.data ?? [] or similar fallbacks when query.error exists. Use src/components/QueryStatePanel.tsx for explicit error/empty/loading states on pages and sections”.

🤖 Prompt for 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.

In `@packages/web/src/pages/LandingPage.tsx` around lines 111 - 115, The page
currently collapses loading/error into an empty list by passing
usableProviders.data ?? [] to LandingPageView; update LandingPage to branch on
usableProviders.isLoading, usableProviders.isError, and resolved
usableProviders.data: render the app's QueryStatePanel
(src/components/QueryStatePanel.tsx) for loading and error states (passing
usableProviders.error) and render an empty-state via QueryStatePanel if data is
an empty array; only call <LandingPageView usableProviders={...}> with the
actual resolved data when !isLoading && !isError. Ensure you reference the trpc
hook usableProviders and the LandingPageView component when making the
conditional rendering changes.
🤖 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 `@packages/web/src/components/AppHeader.stories.tsx`:
- Around line 49-62: Add two new stories to AppHeader.stories.tsx: a Loading
story and an Empty/NoData story while keeping existing Default and
WithHeaderAction variants. Implement Loading by exporting Loading: Story = {
args: { /* set the component's loading prop to true (e.g., loading: true) and
minimal children if required */ } } and implement Empty/NoData by exporting
Empty: Story = { args: { /* provide props that represent no data (e.g., users:
[], items: [], title: '', or an explicit empty flag) so the header renders the
empty state */ } }. Ensure story names match the pattern (Loading and Empty) and
reuse the same types/imports as Default and WithHeaderAction so the file exports
Default, WithHeaderAction, Loading, and Empty for AppHeader.

In `@packages/web/src/components/AppHeader.tsx`:
- Around line 43-48: The mobile menu toggle button in AppHeader.tsx currently
toggles via setMenuOpen but does not expose its state or the controlled element
to assistive tech; update the button element (the onClick using setMenuOpen) to
include aria-expanded={menuOpen} and aria-controls="mobile-navigation" (or
another stable id) and add that same id ("mobile-navigation") to the <nav>
element rendered later (the nav that wraps the mobile menu at/around Line 81) so
screen readers know the expanded/collapsed state and target; ensure the id is
unique in the component and keep the boolean state variable name menuOpen (or
the existing state) in the aria-expanded binding.

In `@packages/web/src/components/DailyOverview.test.tsx`:
- Around line 145-147: The test in DailyOverview.test.tsx uses a brittle string
match for the "card" class on the DOM element referenced by panel; replace that
assertion to use the DOMTokenList API so it's deterministic — locate the
assertions around the panel variable in the test (the expect lines that inspect
panel.className) and change the negative " card " substring check to an
assertion that panel.classList.contains("card") is false (e.g.,
expect(panel.classList.contains("card")).toBe(false)), leaving the other class
assertions intact.

In `@packages/web/src/components/DashboardEvidenceOverview.stories.tsx`:
- Around line 4-90: Add two new Story exports in this stories file: Loading and
Empty. For Loading, export a Story named Loading (same Story type) that uses the
meta and sets args to simulate the loading state (e.g., include a loading: true
prop or remove data props like trend/topInsight/dailySummary and pass minimal
placeholders so the component renders its skeleton). For Empty, export a Story
named Empty that supplies args representing no-data (e.g., sources: [],
dailySummary: null/undefined, healthMonitor: null/undefined, topInsight:
null/undefined, trend: undefined) so the component shows its empty/no-data UI.
Ensure both exports follow the same pattern as Default and are added alongside
meta and Default in this file.

In `@packages/web/src/components/DashboardEvidenceOverview.tsx`:
- Around line 76-80: In DashboardEvidenceOverview, replace hardcoded unit
strings (e.g., the "days" label and any other hardcoded units like "day" or
"bpm") with formatting from the useUnits hook: import and call useUnits() inside
the DashboardEvidenceOverview component and use its formatting helpers to render
the days label (instead of "{days} days") and to update formatDashboardRange
usage if it currently emits hardcoded units; also update the other occurrences
called out (around the references to lines 101 and 116–117) to use the same
useUnits helpers so all user-facing units are produced via useUnits rather than
literal strings.
- Around line 95-99: DashboardEvidenceOverview currently hardcodes hex color
values in multiple JSX elements (e.g., the correlation value paragraph and the
correlationStrengthLabel output around the correlationValue and effectSize
usage) and in SVG/bar elements; replace those raw hex strings with existing
Tailwind utility classes or semantic theme tokens (e.g., use text-*, bg-*,
stroke-* classes or project theme tokens) so styles respond to dark mode and
theme updates. Locate the JSX elements inside the DashboardEvidenceOverview
component (where correlationValue is rendered, where
correlationStrengthLabel(effectSize) is used, and the SVG/bar elements rendering
strength bars) and swap hex literals for the appropriate Tailwind utilities or
theme token references consistent with the rest of the codebase. Ensure
accessibility and visual parity by testing in both light and dark themes after
change.

In `@packages/web/src/pages/Dashboard.tsx`:
- Around line 175-182: topInsight currently collapses the error/loading path by
using insightsQuery.data ?? [], which hides errors; change the logic so useMemo
reads insightsQuery.data without defaulting to [] and returns undefined when
insightsQuery.isLoading or insightsQuery.error is present, then update the
Dashboard render to show the section’s QueryStatePanel
(src/components/QueryStatePanel.tsx) for loading/error/empty states instead of
relying on an empty array fallback; reference the topInsight selector and
insightsQuery (the same useMemo and query) so the UI explicitly handles
insightsQuery.isLoading, insightsQuery.error, and the empty-data case.
- Around line 177-181: The current code mutates cached query data by calling
.sort on allInsights (from insightsQuery.data), so change the ranking to sort a
shallow copy instead (e.g., use [...allInsights] or Array.from(allInsights])
before .filter and .sort) and then return the first element of that sorted copy;
ensure you reference allInsights/insightsQuery.data and avoid in-place mutation
when computing the top insight.

In `@packages/web/src/pages/LandingPage.tsx`:
- Around line 359-363: The user-facing metric labels in LandingPage.tsx use
unexplained acronyms (e.g., "bpm", "SpO2", "kcal", "C"); update the JSX text
where those strings appear (e.g., the small label divs under the metric values
and any related elements referencing activityMetricColors) to use expanded,
layman-friendly phrasing such as "beats per minute (bpm)", "blood oxygen
(SpO2)", "kilocalories (kcal)", and "°C (Celsius)" and/or add an accessible
tooltip/title or <abbr> wrapper so screen readers and hover users see the full
term.

In `@packages/web/vite.config.ts`:
- Line 41: The review flags that the new env var DOFEK_API_PROXY_TARGET (used to
set apiProxyTarget) must be verified in Infisical before merging; update the PR
description/checklist to show evidence that DOFEK_API_PROXY_TARGET exists in the
relevant Infisical environments (e.g., dev/staging/production) by adding
screenshots or links, the environment names, and who added/confirmed them, and
confirm in the checklist that the default fallback ("http://localhost:3000") is
acceptable if the secret is missing.

---

Outside diff comments:
In `@packages/web/src/pages/LandingPage.tsx`:
- Around line 111-115: The page currently collapses loading/error into an empty
list by passing usableProviders.data ?? [] to LandingPageView; update
LandingPage to branch on usableProviders.isLoading, usableProviders.isError, and
resolved usableProviders.data: render the app's QueryStatePanel
(src/components/QueryStatePanel.tsx) for loading and error states (passing
usableProviders.error) and render an empty-state via QueryStatePanel if data is
an empty array; only call <LandingPageView usableProviders={...}> with the
actual resolved data when !isLoading && !isError. Ensure you reference the trpc
hook usableProviders and the LandingPageView component when making the
conditional rendering changes.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4ca66e56-3f82-47cd-9e68-1b6d7eaee49d

📥 Commits

Reviewing files that changed from the base of the PR and between be17350 and 08eca7c.

📒 Files selected for processing (18)
  • docs/README.md
  • docs/roadmap.md
  • packages/web/src/components/AppHeader.stories.tsx
  • packages/web/src/components/AppHeader.test.tsx
  • packages/web/src/components/AppHeader.tsx
  • packages/web/src/components/DailyOverview.test.tsx
  • packages/web/src/components/DailyOverview.tsx
  • packages/web/src/components/DashboardEvidenceOverview.stories.tsx
  • packages/web/src/components/DashboardEvidenceOverview.test.tsx
  • packages/web/src/components/DashboardEvidenceOverview.tsx
  • packages/web/src/components/PageLayout.test.tsx
  • packages/web/src/components/PageLayout.tsx
  • packages/web/src/index.css
  • packages/web/src/pages/Dashboard.test.ts
  • packages/web/src/pages/Dashboard.tsx
  • packages/web/src/pages/LandingPage.test.tsx
  • packages/web/src/pages/LandingPage.tsx
  • packages/web/vite.config.ts
💤 Files with no reviewable changes (1)
  • packages/web/src/pages/Dashboard.test.ts

Comment thread packages/web/src/components/AppHeader.stories.tsx
Comment thread packages/web/src/components/AppHeader.tsx
Comment thread packages/web/src/components/DailyOverview.test.tsx
Comment thread packages/web/src/components/DashboardEvidenceOverview.stories.tsx
Comment thread packages/web/src/components/DashboardEvidenceOverview.tsx
Comment thread packages/web/src/components/DashboardEvidenceOverview.tsx Outdated
Comment thread packages/web/src/pages/Dashboard.tsx
Comment thread packages/web/src/pages/Dashboard.tsx
Comment thread packages/web/src/pages/LandingPage.tsx
Comment thread packages/web/vite.config.ts Outdated

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 2 files (changes from recent commits).

Requires human review: This PR is a major refactor of the dashboard and landing page, replacing the entire dashboard UI with a new evidence overview, removing multiple existing components (e.g., NutritionChart), and restructuring the app shell layout, which carries high risk of breaking core user-facing functionality and

Re-trigger cubic

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 18 files

Confidence score: 3/5

  • There is a concrete user-impact risk in packages/web/src/pages/Dashboard.tsx: using insightsQuery.data ?? [] can mask query failures, so users may see an empty/placeholder state instead of an error state, which conflicts with the query-state handling guideline.
  • packages/web/src/components/DashboardEvidenceOverview.tsx computes strength from index (92 - index * 7) rather than real source data, which can misrepresent evidence quality on the live dashboard.
  • Given both findings are medium severity (6/10) with high confidence (8/10) and affect real dashboard behavior, this carries some merge risk and is worth addressing before release.
  • Pay close attention to packages/web/src/pages/Dashboard.tsx and packages/web/src/components/DashboardEvidenceOverview.tsx - query errors are being hidden and displayed strength values may be inaccurate.

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Fix all with cubic | Re-trigger cubic

Comment thread packages/web/src/pages/Dashboard.tsx Outdated
Comment thread packages/web/src/components/DashboardEvidenceOverview.tsx Outdated
@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review app deployment was skipped for PR #1197.

Hetzner could not allocate the configured review app server type in the configured location. This is provider capacity/placement availability, not a code failure in this PR.

@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

Caution

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

⚠️ Outside diff range comments (3)
packages/web/src/components/AppHeader.stories.tsx (1)

1-1: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix missing dependencies flagged by pipeline.

The pipeline reports that @storybook/react-vite and react are used but not listed in package.json. Add both to your dependencies manifest.

Per the guideline: "When a required precondition is missing (env file, config, dependency), fail immediately with a clear error — never log a warning and silently continue with broken state."

🤖 Prompt for 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.

In `@packages/web/src/components/AppHeader.stories.tsx` at line 1, The build fails
because imports in AppHeader.stories.tsx reference packages not listed in
package.json; add "`@storybook/react-vite`" and "react" to the project's
package.json (appropriate dependencies or devDependencies as per your repo
policy) and run the package manager install so the imports (e.g., the import
line in AppHeader.stories.tsx) resolve; ensure package.json versions match the
repo's Storybook/React versions and commit the updated manifest.
packages/web/src/index.css (1)

35-40: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider aligning border-radius across card-like components.

The .card utility now uses 0.5rem, but .query-state-panel and .query-error-panel (lines 199, 212) still use 0.75rem. If these panels are conceptually card variants, unifying the border-radius would improve visual consistency.

♻️ Optional alignment
 .query-state-panel,
 .query-error-panel {
   display: flex;
   align-items: center;
   justify-content: center;
-  border-radius: 0.75rem;
+  border-radius: 0.5rem;
   padding: 1.25rem 1rem;
🤖 Prompt for 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.

In `@packages/web/src/index.css` around lines 35 - 40, The border-radius for the
card-like components is inconsistent: the `@utility` card uses border-radius:
0.5rem while .query-state-panel and .query-error-panel use 0.75rem; update the
border-radius on .query-state-panel and .query-error-panel to match `@utility`
card (use 0.5rem) so all card variants share the same radius, or alternatively
change `@utility` card to 0.75rem if you prefer that radius—ensure the final value
is applied consistently across `@utility` card, .query-state-panel, and
.query-error-panel.
packages/web/src/pages/LandingPage.tsx (1)

119-119: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Remove the View suffix from component name.

LandingPageView violates the naming guideline. Rename to a domain-specific name like LandingPageContent, LandingPageRoot, or LandingPageBody.

As per coding guidelines: "Do not name React components with a View suffix; use domain-specific names such as Content, Panel, Body, Card, or the concrete concept the component renders"

📝 Suggested rename
-export function LandingPageView({ usableProviders }: { usableProviders: LandingPageProvider[] }) {
+export function LandingPageContent({ usableProviders }: { usableProviders: LandingPageProvider[] }) {

And update the usage in LandingPage:

 export function LandingPage() {
   const usableProviders = trpc.sync.usableProviders.useQuery();
-  return <LandingPageView usableProviders={usableProviders.data ?? []} />;
+  return <LandingPageContent usableProviders={usableProviders.data ?? []} />;
 }

Also update the test imports and usage.

🤖 Prompt for 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.

In `@packages/web/src/pages/LandingPage.tsx` at line 119, Rename the React
component exported as LandingPageView to a domain-specific name (e.g.,
LandingPageContent or LandingPageRoot) across the codebase: update the function
declaration/export in the file containing LandingPageView, replace all
imports/usages in LandingPage (the parent that renders it) and any tests that
import LandingPageView to the new name, and ensure any type annotations
(usableProviders: LandingPageProvider[]) remain identical; run the test suite/TS
compiler to catch remaining references and fix any lingering import paths or
named-export mismatches.
🤖 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 `@packages/web/src/pages/Dashboard.tsx`:
- Around line 198-200: The insightError prop currently only surfaces
insightsQuery.error; update the Dashboard rendering around insightsQuery to
treat loading, error, and empty as distinct states by using QueryStatePanel for
each: show QueryStatePanel with isLoading while insightsQuery.isLoading, show
QueryStatePanel with error when insightsQuery.error exists, and show an explicit
empty QueryStatePanel when insightsQuery.data is present but empty instead of
falling back to correlation content; locate usages of insightsQuery and the
insightError prop in the Dashboard component and replace the single error-only
branch with explicit checks for insightsQuery.isLoading, insightsQuery.error,
and empty data to pass the appropriate QueryStatePanel instance into
insightError.

In `@packages/web/src/pages/LandingPage.tsx`:
- Line 354: Replace the three hardcoded unit strings in LandingPage.tsx
("beats/min average", "calories", "Celsius") with the app's unit formatter from
the useUnits hook: import and call useUnits() at the top of the component (e.g.,
const { formatUnit } = useUnits() or the hook's provided formatter) and replace
the inline strings in the JSX (the element rendering "beats/min average" and the
two elements rendering "calories" and "Celsius") with calls to the hook (e.g.,
{formatUnit('beats/min average')}, {formatUnit('calories')},
{formatUnit('Celsius')}) so units go through the UnitProvider/i18n pipeline.

---

Outside diff comments:
In `@packages/web/src/components/AppHeader.stories.tsx`:
- Line 1: The build fails because imports in AppHeader.stories.tsx reference
packages not listed in package.json; add "`@storybook/react-vite`" and "react" to
the project's package.json (appropriate dependencies or devDependencies as per
your repo policy) and run the package manager install so the imports (e.g., the
import line in AppHeader.stories.tsx) resolve; ensure package.json versions
match the repo's Storybook/React versions and commit the updated manifest.

In `@packages/web/src/index.css`:
- Around line 35-40: The border-radius for the card-like components is
inconsistent: the `@utility` card uses border-radius: 0.5rem while
.query-state-panel and .query-error-panel use 0.75rem; update the border-radius
on .query-state-panel and .query-error-panel to match `@utility` card (use 0.5rem)
so all card variants share the same radius, or alternatively change `@utility`
card to 0.75rem if you prefer that radius—ensure the final value is applied
consistently across `@utility` card, .query-state-panel, and .query-error-panel.

In `@packages/web/src/pages/LandingPage.tsx`:
- Line 119: Rename the React component exported as LandingPageView to a
domain-specific name (e.g., LandingPageContent or LandingPageRoot) across the
codebase: update the function declaration/export in the file containing
LandingPageView, replace all imports/usages in LandingPage (the parent that
renders it) and any tests that import LandingPageView to the new name, and
ensure any type annotations (usableProviders: LandingPageProvider[]) remain
identical; run the test suite/TS compiler to catch remaining references and fix
any lingering import paths or named-export mismatches.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 008aec5e-f5e4-42d2-afb2-854f4cd30e82

📥 Commits

Reviewing files that changed from the base of the PR and between 08eca7c and 5b6f96d.

📒 Files selected for processing (13)
  • .codex/config.toml
  • packages/web/src/components/AppHeader.stories.tsx
  • packages/web/src/components/AppHeader.test.tsx
  • packages/web/src/components/AppHeader.tsx
  • packages/web/src/components/DailyOverview.test.tsx
  • packages/web/src/components/DashboardEvidenceOverview.stories.tsx
  • packages/web/src/components/DashboardEvidenceOverview.test.tsx
  • packages/web/src/components/DashboardEvidenceOverview.tsx
  • packages/web/src/components/NutritionChart.tsx
  • packages/web/src/index.css
  • packages/web/src/pages/Dashboard.tsx
  • packages/web/src/pages/LandingPage.test.tsx
  • packages/web/src/pages/LandingPage.tsx
💤 Files with no reviewable changes (2)
  • packages/web/src/components/NutritionChart.tsx
  • .codex/config.toml

Comment thread packages/web/src/pages/Dashboard.tsx Outdated
Comment thread packages/web/src/pages/LandingPage.tsx Outdated
@Asherlc
Asherlc merged commit 761a932 into main May 28, 2026
69 of 70 checks passed
@Asherlc
Asherlc deleted the Asherlc/improve-homepage-design branch May 28, 2026 16:01
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.

2 participants