Skip to content

[LAND-03] Label landing relationship as illustrative - #2409

Merged
Asherlc merged 3 commits into
mainfrom
Asherlc/issue-2094-land-03
Aug 2, 2026
Merged

Asherlc merged 3 commits into
mainfrom
Asherlc/issue-2094-land-03

Conversation

@Asherlc

@Asherlc Asherlc commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the unsupported landing r = 0.72 demo with clearly illustrative, non-statistical copy.
  • Expose the absence of sample size and confidence interval, source types, and association caveats in visible and accessible text.
  • Add regression and Storybook coverage for the new copy and chart name.

Evidence and scope

The landing preview is static illustrative UI and does not consume the server-owned correlation evidence contract. This keeps the fix from inventing a sample size, uncertainty, direction, or confounder claim that is not backed by current landing data.

Validation

  • pnpm exec vitest run --project unit packages/web/src/pages/LandingPage.test.tsx packages/web/src/components/LandingPreviewCharts.test.tsx — passed (22 tests)
  • pnpm test — passed (1,038 files; 15,774 passed, 21 skipped)
  • pnpm --dir packages/web typecheck — passed
  • pnpm tsc --noEmit — passed
  • pnpm --dir packages/server exec tsc --noEmit — passed
  • pnpm --dir packages/web build — passed
  • pnpm storybook:web:build — passed
  • pnpm lint — static lint/policy stages passed; analytics SQL lint could not connect to ClickHouse at 127.0.0.1:50700. Workspace Compose startup was also blocked by Docker's exhausted address pools.

Fixes #2094

Summary by Sourcery

Clarify that the landing-page relationship chart is an illustrative sample, not a measured statistical result, and update supporting copy and previews accordingly.

New Features:

  • Add explicit illustrative labeling and explanatory copy for the landing-page relationship preview, including absence of correlation, sample size, and confidence interval.
  • Update the scatter plot accessible name to emphasize its demonstrative, non-statistical nature.

Enhancements:

  • Extend Storybook coverage for the landing-page illustrative relationship preview with assertions on the new labels and accessibility text.

Tests:

  • Update landing page unit tests to validate the new illustrative relationship labeling, explanatory text, and chart accessibility name.

Summary by cubic

Marks the landing-page relationship preview as illustrative and removes unsupported statistical claims. Aligns with LAND-03 and improves copy, accessibility, and guidance to connect sources.

  • New Features
    • Replaced demo “r = 0.72” with “Illustrative relationship,” “Illustrative sample,” “Example points,” “No measured correlation,” and a note about missing sample size/CI.
    • Updated chart accessible name to “Illustrative scatter plot for demonstration only” with explicit axis labels.
    • Clarified example source types, added non-causation caveat, and “Next: connect sources to compare your own paired records.”
    • Added Storybook play assertions and updated unit tests for the new labels and accessibility.

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

Review in cubic

Copilot AI review requested due to automatic review settings August 2, 2026 13:47
@Asherlc Asherlc linked an issue Aug 2, 2026 that may be closed by this pull request
@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@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 Aug 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Asherlc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6abdcc2f-fe68-410c-96df-7cbb5fb06b66

📥 Commits

Reviewing files that changed from the base of the PR and between 936b8be and bdb08e4.

📒 Files selected for processing (3)
  • packages/web/src/pages/LandingPage.stories.tsx
  • packages/web/src/pages/LandingPage.test.tsx
  • packages/web/src/pages/LandingPage.tsx

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.

@sourcery-ai

sourcery-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This pull request rewrites the landing page’s correlation preview to be explicitly illustrative (non-statistical), updates accessibility copy for the scatter plot, and adds unit and Storybook regression coverage for the new text and chart labeling.

Sequence diagram for rendering the illustrative relationship preview

sequenceDiagram
  participant TestRunner
  participant LandingPage
  participant CorrelationPanel
  participant LandingPreviewScatterPlot
  participant Screen

  TestRunner->>LandingPage: render(LandingPage)
  LandingPage->>CorrelationPanel: CorrelationPanel()
  CorrelationPanel->>LandingPreviewScatterPlot: render(accessibleName)
  CorrelationPanel-->>LandingPage: illustrative copy rendered
  LandingPage-->>Screen: DOM with illustrative relationship preview

  TestRunner->>Screen: getByRole(img, name="Illustrative scatter plot for demonstration only. X-axis: Sleep consistency (%). Y-axis: Heart rate variability (ms).")
  Screen-->>TestRunner: element found
Loading

File-Level Changes

Change Details Files
Retarget the landing correlation preview UI from a claimed statistical result to an explicitly illustrative, non-measured relationship.
  • Rename the correlation header text from a key correlation label to an illustrative relationship label.
  • Replace the numeric correlation (r = 0.72), strength description, and sample size line with illustrative sample wording, example points, and explicit statements about the absence of measured correlation, sample size, and confidence interval.
  • Update the accessible name on the preview scatter plot to emphasize that it is illustrative and for demonstration only.
  • Rewrite the explanatory footer copy to describe generic example source types, clarify that the data is illustrative only and not a measured product result, and restate that association does not imply causation while prompting users to connect their own sources.
packages/web/src/pages/LandingPage.tsx
Align unit tests for the landing page with the new illustrative labeling and accessibility copy.
  • Update the test that previously asserted presence of the numeric correlation and confidence copy to instead assert all new illustrative relationship texts (headers, body, caveat lines, and next-action language).
  • Adjust expectations for the scatter plot image’s accessible name to match the new illustrative description string.
packages/web/src/pages/LandingPage.test.tsx
Extend the Storybook story for the illustrative landing preview to document and assert the new non-statistical relationship labeling.
  • Revise the story description to explain that the landing-page relationship is shown as an illustrative sample without statistical result, sample size, or confidence interval.
  • Add a play function that queries the canvas for the new illustrative texts and for the updated accessible scatter plot name to provide visual regression and behavioral coverage in Storybook.
packages/web/src/pages/LandingPage.stories.tsx

Assessment against linked issues

Issue Objective Addressed Explanation
#2094 Replace the unsupported 'strong correlation r = 0.72' landing demo with non-statistical or clearly illustrative copy.
#2094 Provide visible caveats and context about the relationship preview, including that it is illustrative only and lacks sample size, confidence interval, and measured correlation.
#2094 Ensure the illustrative nature and caveats are covered in tests and accessible descriptions so users (including assistive tech users) can understand the non-statistical nature of the preview.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Label landing relationship preview as illustrative (remove unsupported correlation demo)

🐞 Bug fix 🧪 Tests ✨ Enhancement 🕐 20-40 Minutes

Grey Divider

AI Description

• Replace landing preview correlation stats with explicitly illustrative, non-statistical copy.
• Update scatter plot accessible name to emphasize demonstration-only context.
• Add/adjust Storybook and unit tests to lock in the new labeling.
Diagram

graph TD
  U["Landing page"] --> LP["LandingPage.tsx"] --> CP["Relationship panel"] --> SP["LandingPreviewScatterPlot"]
  LP --> UT["LandingPage.test.tsx"]
  LP --> SB["LandingPage.stories.tsx"]

  subgraph Legend
    direction LR
    _ui([UI component]) ~~~ _t([Test])
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Wire landing preview to the real correlation evidence contract
  • ➕ Would allow showing real r/sample size/CI with accurate provenance
  • ➕ Avoids maintaining illustrative copy long-term
  • ➖ Requires backend/data contract plumbing and availability guarantees for anonymous landing
  • ➖ Higher scope/risk and slower to ship than a copy-only fix
2. Remove the relationship preview entirely until real data is available
  • ➕ Eliminates any risk of misleading statistical interpretation
  • ➕ Reduces UI surface area to maintain
  • ➖ Loses a key explanatory/marketing element on the landing page
  • ➖ May reduce perceived product value/clarity for new users
3. Keep synthetic data but add stronger disclaimers + visual styling changes
  • ➕ Retains the panel while further reducing statistical misinterpretation risk
  • ➕ Can be done without backend work
  • ➖ Still risks users inferring meaning from a scatter plot even with disclaimers
  • ➖ More design iteration than needed for the immediate issue

Recommendation: Proceed with the PR’s current approach: treat the landing relationship chart as explicitly illustrative and avoid inventing statistical claims (r, sample size, CI) that the landing page cannot justify. This is the lowest-risk fix that addresses misleading content while preserving the preview’s explanatory value; wiring to real evidence can be a future enhancement once the contract is ready for landing.

Files changed (3) +53 / -19

Bug fix (1) +19 / -9
LandingPage.tsxReplace correlation demo stats with illustrative relationship copy and caveats +19/-9

Replace correlation demo stats with illustrative relationship copy and caveats

• Renames the preview header to 'Illustrative relationship' and replaces r/strength/sample-size text with 'Example points' and explicit statements that no measured correlation, sample size, or confidence interval is provided. Updates the scatter plot accessible name and revises supporting copy to emphasize example source types and association/causation caveats.

packages/web/src/pages/LandingPage.tsx

Tests (2) +34 / -10
LandingPage.stories.tsxAdd Storybook play assertions for illustrative relationship labeling +16/-1

Add Storybook play assertions for illustrative relationship labeling

• Updates the story description to clarify the relationship preview is illustrative. Adds a play function asserting the new labels and the updated accessible chart name are visible.

packages/web/src/pages/LandingPage.stories.tsx

LandingPage.test.tsxUpdate landing page tests to expect illustrative (non-statistical) relationship copy +18/-9

Update landing page tests to expect illustrative (non-statistical) relationship copy

• Renames expectations from 'Key correlation' and r/strength/sample-size claims to the new illustrative labels and caveats. Updates the expected accessible name for the scatter plot to match the demonstration-only wording.

packages/web/src/pages/LandingPage.test.tsx

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Storybook previews for 74c36fb7 are ready:

This comment updates automatically on each PR push.

Asherlc commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Refreshed the branch onto current main after #2405 merged (merge commit 7bae32f17). The implementation remains limited to the landing-page illustrative correlation copy/tests/story; no unsupported sample size or statistical claim was added. Focused validation and the prior full unit/typecheck/build checks were green; fresh required CI is now running against the current base.

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews.

@codereviewbot-ai

Copy link
Copy Markdown

🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews.

@Asherlc
Asherlc merged commit b4ee5a9 into main Aug 2, 2026
99 checks passed
@Asherlc
Asherlc deleted the Asherlc/issue-2094-land-03 branch August 2, 2026 14:45
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.

[LAND-03] Landing strong correlation 0.72 lacks sample size and caveats

2 participants