Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ This project uses a multi-tool testing strategy. Note that **Jest is not used**
> reference — when to use Vitest vs. node:test vs. Playwright, a map of every
> `package.json` test script, the `tests/` layout, coverage and gate expectations, and a
> "how to add a test" recipe per runner.
> For React component testing conventions (render helpers, accessible queries, mocking
> hooks and context, a11y assertions), see [docs/COMPONENT_TESTING.md](docs/COMPONENT_TESTING.md).

#### Running Tests

Expand Down
2 changes: 2 additions & 0 deletions app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { WhatsNewProvider } from "@/lib/context/WhatsNewContext";
import WhatsNewPanel from "@/components/Dashboard/WhatsNewPanel";
import DashboardHeader from "@/components/Dashboard/DashboardHeader";
import PrimaryNav from "@/components/Nav/PrimaryNav";
import SubNav from "@/components/Nav/SubNav";

Expand All @@ -13,6 +14,7 @@ export default function DashboardLayout({
<div className="min-h-screen overflow-x-hidden bg-bg3">
<PrimaryNav />
<SubNav />
<DashboardHeader />
{/*
pt-20 for PrimaryNav (80px)
+ pt-16 for SubNav (64px) = 144px
Expand Down
7 changes: 7 additions & 0 deletions components/Dashboard/DashboardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import { ArrowLeft, Star, Activity, Settings, Sparkles } from "lucide-react";
import { useWhatsNew } from "@/lib/context/WhatsNewContext";
import WhatsNewBadge from "@/components/Dashboard/WhatsNewBadge";
import { usePrefersReducedMotion } from "@/lib/hooks/usePrefersReducedMotion";
import { useTitle } from "@/lib/hooks/useTitle";
import QuickRefreshButton from "@/components/QuickRefreshButton";

const DashboardHeader = () => {
useTitle("Financial Dashboard", { depth: 0 });

const { toggle } = useWhatsNew();
const prefersReducedMotion = usePrefersReducedMotion();

Expand Down Expand Up @@ -54,6 +58,9 @@ const DashboardHeader = () => {
<span className="text-sm font-medium text-brand-red relative z-10">Insights</span>
</Link>

{/* Quick Refresh — refetches all active widgets without resetting filters */}
<QuickRefreshButton />

{/* What's New Button */}
<button
id="whats-new-btn"
Expand Down
1 change: 1 addition & 0 deletions components/QuickRefreshButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function QuickRefreshButton() {

return (
<button
type="button"
onClick={handleRefresh}
aria-label={t("quickRefresh.label") || "Quick Refresh"}
className="inline-flex items-center justify-center gap-2 rounded-md bg-white/[0.02] px-3 py-2 text-sm font-medium text-white hover:bg-white/[0.04] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-red/50 transition-colors"
Expand Down
Loading