Skip to content

Key Factors Redesign 2nd iteration#4470

Open
ncarazon wants to merge 4 commits intofeat/key-factors-new-iterationfrom
feat/key-factors-2nd-iteration
Open

Key Factors Redesign 2nd iteration#4470
ncarazon wants to merge 4 commits intofeat/key-factors-new-iterationfrom
feat/key-factors-2nd-iteration

Conversation

@ncarazon
Copy link
Contributor

This PR implements the 1st iteration of the Key Factors Redesign

Iteration 2: Expanded Overlay

  • Clicking a key factor opens an overlay showing the key factor + source comment side-by-side
  • Mobile: full-screen overlay with swipe navigation between key factors
image image image image

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 97abce81-f5eb-4d61-bc78-30a828e534c7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/key-factors-2nd-iteration
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4470-feat-key-factors-2nd-iteration-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:feat-key-factors-2nd-iteration-a0511e6
🗄️ PostgreSQL NeonDB branch preview/pr-4470-feat-key-factors-2nd-iteration
Redis Fly Redis mtc-redis-pr-4470-feat-key-factors-2nd-iteration

Details

  • Commit: a0511e6284947137959cd52d7fc7fc0929bb71a0
  • Branch: feat/key-factors-2nd-iteration
  • Fly App: metaculus-pr-4470-feat-key-factors-2nd-iteration

ℹ️ Preview Environment Info

Isolation:

  • PostgreSQL and Redis are fully isolated from production
  • Each PR gets its own database branch and Redis instance
  • Changes pushed to this PR will trigger a new deployment

Limitations:

  • Background workers and cron jobs are not deployed in preview environments
  • If you need to test background jobs, use Heroku staging environments

Cleanup:

  • This preview will be automatically destroyed when the PR is closed

Comment on lines +63 to +67
useEffect(() => {
if (keyFactor && !comment) {
ensureCommentLoaded(keyFactor.comment_id);
}
}, [keyFactor, comment, ensureCommentLoaded]);
Copy link
Contributor

Choose a reason for hiding this comment

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

this feels like if comment is null, this can run on every re-render as ensureCommentLoaded function is also not wrapped in useCallback. Are we sure this line only sends api request once?

@ncarazon ncarazon force-pushed the feat/key-factors-new-iteration branch from 890b7c6 to c20a690 Compare March 16, 2026 08:09
@ncarazon ncarazon force-pushed the feat/key-factors-2nd-iteration branch from f46cb8c to e7aa882 Compare March 16, 2026 08:09
@ncarazon ncarazon force-pushed the feat/key-factors-new-iteration branch from c20a690 to b46d152 Compare March 19, 2026 14:33
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