Repository navigation
[codex] Improve homepage and dashboard overview #1197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
08eca7c
Improve homepage and dashboard overview
Asherlc d3b910e
Fix CI checks
Asherlc 88cb94d
Address homepage PR review comments
Asherlc f306a73
Add mobile app homepage callout
Asherlc 5b6f96d
Tighten homepage copy
Asherlc 4b5b0b2
Fix web E2E assertions
Asherlc 8141507
Address dashboard and landing review comments
Asherlc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Roadmap | ||
|
|
||
| Product-level roadmap notes for planned Dofek improvements. This file should stay focused on user-facing outcomes, not implementation details. | ||
|
|
||
| ## Near-Term Product Opportunities | ||
|
|
||
| ### Getting Started Flow | ||
|
|
||
| Create a polished first-run flow that helps a new user reach a useful dashboard quickly. | ||
|
|
||
| - Explain what Dofek can help them see: correlations, trends, and comparisons across their health data. | ||
| - Guide them through connecting supported sources without exposing implementation mechanics. | ||
| - Include iOS app setup as a first-class path for Apple Health and mobile tracking. | ||
| - Call out Slack food logging as an easy way to start capturing nutrition context. | ||
| - Show a short progress path from "connect sources" to "first useful insight" so the app feels directed before enough data exists for deeper analysis. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import type { Meta, StoryObj } from "@storybook/react-vite"; | ||
| import { | ||
| createMemoryHistory, | ||
| createRootRoute, | ||
| createRoute, | ||
| createRouter, | ||
| Outlet, | ||
| RouterProvider, | ||
| } from "@tanstack/react-router"; | ||
| import type { ComponentType } from "react"; | ||
| import { AppHeader } from "./AppHeader"; | ||
|
|
||
| function withRouter(Story: ComponentType) { | ||
| const rootRoute = createRootRoute({ | ||
| component: Outlet, | ||
| }); | ||
| const dashboardRoute = createRoute({ | ||
| getParentRoute: () => rootRoute, | ||
| path: "/dashboard", | ||
| component: () => <Story />, | ||
| }); | ||
| const routeTree = rootRoute.addChildren([dashboardRoute]); | ||
| const router = createRouter({ | ||
| routeTree, | ||
| history: createMemoryHistory({ initialEntries: ["/dashboard"] }), | ||
| }); | ||
|
|
||
| return ( | ||
| <div className="min-h-screen bg-page"> | ||
| <RouterProvider router={router} /> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| const meta = { | ||
| title: "Layout/AppHeader", | ||
| component: AppHeader, | ||
| tags: ["autodocs"], | ||
| decorators: [withRouter], | ||
| parameters: { | ||
| layout: "fullscreen", | ||
| }, | ||
| } satisfies Meta<typeof AppHeader>; | ||
|
|
||
| export default meta; | ||
|
|
||
| type Story = StoryObj<typeof meta>; | ||
|
|
||
| export const Default: Story = {}; | ||
|
|
||
| export const WithHeaderAction: Story = { | ||
| args: { | ||
| children: ( | ||
| <button | ||
| type="button" | ||
| className="rounded-md border border-border bg-surface-solid px-3 py-1.5 text-xs font-semibold text-foreground" | ||
| > | ||
| 30 days | ||
| </button> | ||
| ), | ||
| }, | ||
| }; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| // @vitest-environment jsdom | ||
| import { render, screen } from "@testing-library/react"; | ||
| import type { ReactNode } from "react"; | ||
| import { describe, expect, it, vi } from "vitest"; | ||
| import { AppHeader } from "./AppHeader.tsx"; | ||
|
|
||
| vi.mock("../lib/auth-context.tsx", () => ({ | ||
| useAuth: () => ({ | ||
| user: { name: "Ada Lovelace", email: "ada@example.com", isAdmin: false }, | ||
| isLoading: false, | ||
| logout: vi.fn(), | ||
| }), | ||
| })); | ||
|
|
||
| vi.mock("@tanstack/react-router", () => ({ | ||
| Link: ({ children, className, to }: { children: ReactNode; className?: string; to: string }) => ( | ||
| <a href={to} className={className}> | ||
| {children} | ||
| </a> | ||
| ), | ||
| })); | ||
|
|
||
| describe("AppHeader", () => { | ||
| it("renders desktop navigation as a sidebar evidence desk", () => { | ||
| render(<AppHeader />); | ||
|
|
||
| const sidebar = screen.getByLabelText("Primary navigation"); | ||
| expect(sidebar.tagName).toBe("ASIDE"); | ||
| expect(sidebar.className).toContain("lg:sticky"); | ||
| expect(sidebar.className).toContain("lg:w-[13.5rem]"); | ||
| expect(sidebar.className).toContain("border-border-strong"); | ||
| }); | ||
|
|
||
| it("keeps a compact mobile header for small screens", () => { | ||
| render(<AppHeader />); | ||
|
|
||
| const mobileHeader = screen.getByRole("banner"); | ||
| expect(mobileHeader.className).toContain("lg:hidden"); | ||
| expect(screen.getByLabelText("Toggle navigation menu")).toBeTruthy(); | ||
| }); | ||
|
|
||
| it("renders primary app destinations and the signed-in user", () => { | ||
| render(<AppHeader />); | ||
|
|
||
| expect(screen.getAllByText("Overview").length).toBeGreaterThan(0); | ||
| expect(screen.getAllByText("Nutrition").length).toBeGreaterThan(0); | ||
| expect(screen.getByText("Ada Lovelace")).toBeTruthy(); | ||
| }); | ||
| }); |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.