Skip to content

chore: remove logged_out_key_factors_variant feature flag - #5120

Open
SylvainChevalier wants to merge 2 commits into
mainfrom
claude/issue-4439-remove-the-loggedoutkeyfactorsvariant-feature-flag
Open

chore: remove logged_out_key_factors_variant feature flag#5120
SylvainChevalier wants to merge 2 commits into
mainfrom
claude/issue-4439-remove-the-loggedoutkeyfactorsvariant-feature-flag

Conversation

@SylvainChevalier

@SylvainChevalier SylvainChevalier commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Removes the PostHog logged_out_key_factors_variant flag and the useShouldHideKeyFactors hook that consumed it. Key factors are now always shown regardless of auth state (the default branch of the removed check).

Follow-up: archive the flag in the PostHog dashboard.

Closes #4439

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Key factors are now displayed consistently instead of being conditionally hidden.
    • Key factor comments, carousels, and tiles remain visible when relevant content is available.
    • Existing visibility rules for resolved posts and empty content are preserved.

claude Bot and others added 2 commits August 7, 2026 13:27
Drops the PostHog A/B flag and the hook that consumed it, so key
factors are always shown regardless of auth state.

Co-authored-by: Sylvain <74110469+SylvainChevalier@users.noreply.github.com>
Co-authored-by: Sylvain <74110469+SylvainChevalier@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 351ab3bf-2760-407b-90a2-bb8d33361008

📥 Commits

Reviewing files that changed from the base of the PR and between 6c507f0 and 16937b1.

📒 Files selected for processing (5)
  • front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_comment_section.tsx
  • front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_consumer_section.tsx
  • front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_section.tsx
  • front_end/src/app/(main)/questions/[id]/components/key_factors/questions_feed_view/key_factors_tile_view.tsx
  • front_end/src/app/(main)/questions/[id]/components/key_factors/use_should_hide_key_factors.ts
💤 Files with no reviewable changes (4)
  • front_end/src/app/(main)/questions/[id]/components/key_factors/questions_feed_view/key_factors_tile_view.tsx
  • front_end/src/app/(main)/questions/[id]/components/key_factors/use_should_hide_key_factors.ts
  • front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_section.tsx
  • front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_consumer_section.tsx

📝 Walkthrough

Walkthrough

The PR removes the useShouldHideKeyFactors hook and its feature-flag logic. Key-factor components now render without that gate while retaining existing checks for empty content and resolved or closed posts.

Changes

Key-factor visibility

Layer / File(s) Summary
Remove feature-flag visibility hook
front_end/src/app/(main)/questions/[id]/components/key_factors/use_should_hide_key_factors.ts, front_end/src/app/(main)/questions/[id]/components/key_factors/*
The useShouldHideKeyFactors hook, imports, and invocations are removed.
Preserve component rendering guards
front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_comment_section.tsx, front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_consumer_section.tsx, front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_section.tsx, front_end/src/app/(main)/questions/[id]/components/key_factors/questions_feed_view/key_factors_tile_view.tsx
Components no longer use the feature-flag gate. Existing empty-content, closed-status, and resolved-post checks remain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: hlbmtc, ncarazon, cemreinanc

Poem

A rabbit hops through factors bright,
No flag can hide them from the light.
Empty lists still fade away,
Resolved posts keep their quiet stay.
The carousel now springs to play.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the removal of the logged_out_key_factors_variant feature flag.
Linked Issues check ✅ Passed The PR removes the feature flag consumer hook and all identified usages, meeting issue #4439.
Out of Scope Changes check ✅ Passed All code changes directly support removing the feature flag and its hiding behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-4439-remove-the-loggedoutkeyfactorsvariant-feature-flag

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.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-5120-claude-issue-4439-remove-the-l-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-4439-remove-the-loggedoutkeyfactorsvariant-feature-flag-16937b1
🗄️ PostgreSQL NeonDB branch preview/pr-5120-claude-issue-4439-remove-the-l
Redis Fly Redis mtc-redis-pr-5120-claude-issue-4439-remove-the-l

Details

  • Commit: 16937b1b33eda4a7b4338de4fa13e3b5005426bc
  • Branch: claude/issue-4439-remove-the-loggedoutkeyfactorsvariant-feature-flag
  • Fly App: metaculus-pr-5120-claude-issue-4439-remove-the-l

ℹ️ 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

@SylvainChevalier

Copy link
Copy Markdown
Contributor Author

Looks ok on preview site.

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.

Remove the logged_out_key_factors_variant feature flag

1 participant