Skip to content

Question Page Redesign – Binary + continuous body#4695

Open
ncarazon wants to merge 7 commits into
feat/question-page-redesign-1st-iterationfrom
feat/question-page-redesign-2nd-iteration
Open

Question Page Redesign – Binary + continuous body#4695
ncarazon wants to merge 7 commits into
feat/question-page-redesign-1st-iterationfrom
feat/question-page-redesign-2nd-iteration

Conversation

@ncarazon
Copy link
Copy Markdown
Contributor

@ncarazon ncarazon commented May 7, 2026

Closes #4642

Summary

This PR delivers the second iteration of the Question Page redesign by completing side-by-side prediction layouts for Consumer question views, refining hidden-CP and empty-state handling, and adding live cursor interactions for continuous charts.

Implemented in Iteration 2

  • Completed side-by-side prediction layouts for Consumer binary and continuous detailed chart views
  • Mounted QuestionHeaderCPStatus alongside detailed chart cards to match Forecaster layout parity
  • Consumer binary:
    • Replaced large centered radial with compact CP status panel containing small radial + weekly delta
    • Added Timeline / Histogram toggle to detailed chart cards
  • Consumer continuous:
    • Confirmed side-by-side layout support through existing detailed chart card architecture
  • Preserved existing Forecaster binary and continuous layouts unchanged

UI / Interaction updates

  • Added live cursor updates for Consumer continuous charts:
    • Hovering timeline updates left-panel value, confidence interval, and mini distribution chart in real time
    • State resets to latest aggregate when cursor leaves
  • Updated Consumer mobile continuous mini chart to sync with timeline cursor state
  • Replaced floating tooltip workflow in Consumer continuous charts with left-panel live updates
  • Added cursor dot indicator on continuous timelines
  • Improved mobile tooltip touch tracking and cursor reset behavior

Hidden CP / empty state handling

  • Standardized hidden-CP, pre-reveal, and empty states across new side-by-side layouts
  • Continuous left panel now supports dedicated states for:
    • empty forecast
    • upcoming reveal countdown
    • hidden CP reveal action
  • Binary left panel now properly handles hidden CP state on desktop and mobile
  • Consumer shell now centrally handles hidden/reveal states for binary layouts
  • Disabled timeline hover cursor when CP is hidden or pending reveal
  • Removed duplicate reveal actions from histogram mode

Layout fixes & polish

  • Fixed Consumer binary radial clipping at small/medium breakpoints
  • Fixed long or URL-heavy titles overflowing into the CP status panel
  • Improved chart header flexibility for custom chart titles and toggle controls

Functional improvements

  • Added cursor-driven override support for continuous CP displays
  • Added shared cursor state context for Consumer continuous layouts and mobile mini charts
  • Added lazy loading of full aggregation history on cursor interaction for Consumer continuous charts, keeping the initial posts payload lightweight

Summary by CodeRabbit

Release Notes

  • New Features

    • Added histogram view option for continuous questions
    • Introduced interactive cursor for chart navigation and value inspection
    • Added community prediction reveal controls with visibility management
  • Improvements

    • Enhanced empty forecast state handling and display logic
    • Improved chart tooltip and container interactions
    • Refined responsive layout for prediction displays
  • Localization

    • Added "no histogram data available" message translations across supported languages

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 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: 79a04475-a685-41cc-acf9-e39a94c669ef

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
📝 Walkthrough

Walkthrough

This PR implements the "Question Page Redesign – Binary + continuous body" feature by reorganizing consumer and forecaster question layouts to support side-by-side rendering for binary questions with a histogram view toggle, introducing continuous-chart cursor state management for cursor-driven CP display overlays, adding full-aggregation fetching for enriched cursor forecasts, and refining CP reveal/hide logic throughout the component tree with consistent cursor-suppression patterns across chart containers.

Changes

Main feature: Question page shell and layout redesign

Layer / File(s) Summary
Localization: Histogram data availability message
front_end/messages/*
noHistogramData translation key added across Czech, English, Spanish, Portuguese, Traditional Chinese, and Simplified Chinese to display when histogram content is missing.
Continuous chart cursor context and state plumbing
front_end/src/contexts/continuous_chart_cursor_context.tsx
New React client-side context stores the active NumericAggregateForecast for continuous chart cursors, with ContinuousChartCursorProvider managing state and useContinuousChartCursor hook for component access.
Question page shell: Layout reorganization and CP reveal/hide logic
front_end/src/app/(main)/questions/[id]/components/question_page_shell/index.tsx
Consumer and forecaster shell rendering updated to incorporate hideCP state and forecast availability checks; binary single-question layout now includes side-by-side rendering; prediction/timeline area reorganized with conditional RevealCPButton, UpcomingCP, or QuestionHeaderCPStatus based on CP visibility; entire page wrapped in ContinuousChartCursorProvider.
Title row: Forecaster CP reveal and status rendering
front_end/src/app/(main)/questions/[id]/components/question_page_shell/title_row.tsx
TitleRow now reads hideCP and continuous-cursor context; forecaster posts conditionally render RevealCPButton or QuestionHeaderCPStatus based on CP visibility and question type; activeForecast wired for downstream CP-status rendering.
Forecast availability and rendering conditions
front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_consumer_section.tsx, front_end/src/app/(main)/questions/[id]/components/multiple_choices_chart_view/index.tsx
Key-factors section computes forecast availability to control visibility; multiple-choice tooltip rendering gated by !hideCP and !cpRevealsOn conditions.

Cursor-driven forecast display and aggregation enrichment

Layer / File(s) Summary
Full aggregation fetching and active forecast management
front_end/src/components/detailed_question_card/detailed_question_card/hooks/use_full_aggregation.ts, front_end/src/components/detailed_question_card/detailed_question_card/continuous_chart_card.tsx
New useFullAggregation hook fetches enriched aggregation data via TanStack Query; ContinuousChartCard manages activeForecast via effect and useContinuousChartCursor to enable cursor-driven display.
Consumer continuous prediction with cursor-driven chart rendering
front_end/src/app/(main)/questions/[id]/components/question_view/consumer_question_view/prediction/single_question_prediction/continuous_question_prediction.tsx
Retrieves active cursor forecast and hideCP state from context; renders RevealCPButton when CP is hidden; otherwise computes cursorChartData from cursor CDF-to-PMF conversion and passes overrideCenter to tiles for cursor-driven display.
Forecaster CP status header with cursor forecast overlay
front_end/src/app/(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/question_header_cp_status.tsx
Accepts optional cursorForecast prop; computes cursorAreaChartData from cursor values; reorganizes continuous rendering into early-return branches for empty/reveals/hidden states; injects cursor overrides into ContinuousCPBar.
CP bar and tile override props for cursor-driven display
front_end/src/components/post_card/question_tile/continuous_cp_bar.tsx, front_end/src/components/consumer_post_card/consumer_question_tile/consumer_continuous_tile.tsx, front_end/src/components/consumer_post_card/binary_cp_bar.tsx
ContinuousCPBar and ConsumerContinuousTile now accept override props (overrideCenter, overrideBounds) for cursor-driven display; BinaryCPBar renders even without CP center value.

NumericChart cursor infrastructure and touch/continuous consumer enhancements

Layer / File(s) Summary
NumericChart prop contract and cursor/tooltip behavior
front_end/src/components/charts/numeric_chart.tsx
Props expanded with chartTitle as ReactNode, hideCursorValueLabel, and suppressEmptyOverlay; container logic suppresses cursor/tooltip when hideCP/cpRevealsOn/forecasts-empty; touch-coordinate tracking added for dynamic tooltip offset; continuous-consumer-view renders dot marker instead of chip.
NumericTimeline and chart-container prop forwarding
front_end/src/components/charts/numeric_timeline.tsx, front_end/src/components/charts/primitives/chart_container.tsx
NumericTimeline updates title to ReactNode and forwards new cursor/overlay props into NumericChart; ChartContainer updates chartTitle type.
Chart container and cursor point styling updates
front_end/src/components/charts/fan_chart.tsx, front_end/src/components/charts/group_chart.tsx, front_end/src/components/charts/multiple_choice_chart.tsx, front_end/src/components/charts/primitives/line_cursor_points.tsx
Victory chart containers now suppress cursor when hideCP or cpRevealsOn; line_cursor_points removes x-offset and updates marker to filled dot with white stroke.
Tooltip and container utility hook updates
front_end/src/hooks/use_chart_tooltip.ts, front_end/src/hooks/use_container_size.ts
useChartTooltip accepts x/y coordinates for touch-based positioning; useContainerSize calls onResize immediately for synchronous initial dimension population.

Histogram view toggle and detailed card cleanup

Layer / File(s) Summary
Histogram view toggle and rendering infrastructure
front_end/src/components/detailed_question_card/detailed_question_card/continuous_chart_card.tsx
Introduces ChartView state and toggle UI for binary questions; renderHistogram() fetches histogram data, displays "no histogram data" placeholder when empty, and renders dynamically-imported histogram with median/mean; timeline title and pointer-entry updated for continuous mode.
Detailed card simplification: Remove RevealCPButton
front_end/src/components/detailed_question_card/detailed_group_card/index.tsx, front_end/src/components/detailed_question_card/detailed_question_card/index.tsx
Removes RevealCPButton import and conditional rendering; chart tiles/timelines now render directly without reveal-button wrapping.
Histogram chart width prop fallback
front_end/src/components/charts/histogram.tsx
VictoryChart width prop updated to use `width

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Metaculus/metaculus#4694: Implements the same continuous-cursor plumbing with ContinuousChartCursorProvider wrapping and cursor-forecast consumption in prediction/header components via cdfToPmf context logic.
  • Metaculus/metaculus#4647: Extends the same TitleRow component with hideCP/continuous cursor context reading and CP-status/reveal rendering adjustments for forecaster cases.
  • Metaculus/metaculus#4692: Directly related to consumer/continuous binary UI changes in question shell layout, binary detailed chart histogram toggle, and shared chart plumbing like chartTitle as ReactNode.

Suggested reviewers

  • elisescu
  • lsabor
  • hlbmtc
  • cemreinanc

Poem

🐰 A cursor hops through forecasts bright,
Histograms toggle left and right,
Side-by-side, the answers show,
With whispered CP reveals in tow.

🚥 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 PR title 'Question Page Redesign – Binary + continuous body' clearly summarizes the main change: implementing a redesign of the question page layout for binary and continuous views.
Linked Issues check ✅ Passed The PR implements all primary coding objectives from issue #4642: applies side-by-side layouts to binary and continuous consumer views, adds Timeline/Histogram toggle, handles empty/pre-reveal states, maintains forecaster binary layout, and adds cursor interactions.
Out of Scope Changes check ✅ Passed All changes are within scope. Localization updates support the new UI (noHistogramData message). Chart and component updates enable the redesign (cursors, overrides, toggles). Context additions and hooks support the new architecture. No unrelated refactoring or unscoped features detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/question-page-redesign-2nd-iteration

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.

@ncarazon ncarazon changed the title Mount consumer binary + continuous side-by-side with the detailed cha… Question Page Redesign – Binary + continuous body May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4695-feat-question-page-redesign-2n-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:feat-question-page-redesign-2nd-iteration-97b2945
🗄️ PostgreSQL NeonDB branch preview/pr-4695-feat-question-page-redesign-2n
Redis Fly Redis mtc-redis-pr-4695-feat-question-page-redesign-2n

Details

  • Commit: 97b29456b9c74ba108509c31e3d2841842840e34
  • Branch: feat/question-page-redesign-2nd-iteration
  • Fly App: metaculus-pr-4695-feat-question-page-redesign-2n

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

ncarazon and others added 6 commits May 14, 2026 13:46
…rt card & Timeline / Histogram toggle on binary bodies (#4692)

* feat: add QuestionHeaderCPStatus next to timeline for consumer binary questions

* fix: remove extra mt-8 top margin from consumer continuous timeline

* feat: add Timeline/Histogram toggle to binary detailed chart cards and fix consumer binary radial padding

* fix: resolve layout jumping between chart views, fix histogram full-width responsive scaling, and center binary radial charts on mobile

* fix: prevent chart layout snapping with synchronous measurements, enable side-by-side continuous charts on sm breakpoints, and standardize spacing utility classes

* fix: show fallback message when histogram tab has no data
* feat: live cursor updates left-panel value, range, and distribution for continuous consumer view, with dot indicator on timeline and no tooltip/dashed line in consumer mode

* feat: animate consumer mobile mini chart on timeline cursor and fix mobile tooltip position tracking

* fix: always serialize full forecast_values in aggregation history for cursor-time distribution animation

* fix: memoize cursorChartData to skip cdfToPmf recalculation when forecast_values reference is unchanged

* fix: resolve cursor dot color override through resolveToCssColor

* refactor: lazily fetch full aggregation history from aggregation explorer on pointer enter for continuous consumer cursor animation, keeping posts endpoint lightweight

* fix: pass include_bots_in_aggregates to aggregation explorer to match stored aggregation bot semantics, format aggregate_forecasts.py

* fix: use stable setActiveForecast reference in effect deps to prevent infinite re-render loop on hover
* fix: handle hideCP, cpRevealsOn, and isEmpty in the side-by-side left card for binary and continuous questions

* fix: handle isEmpty, cpRevealsOn, and hideCP states in the side-by-side layout left panel and fix title overflow onto the CP block

* fix: refine mobile hidden-CP states for binary and continuous in the forecaster title row and left panel

* fix: prevent CP status from being squeezed off-screen in the mobile title row

* fix: restore "No forecasts yet" overlay in feed cards and suppress it on the question detail page

* fix: wire hideCP, cpRevealsOn, and isEmpty states into all question-type left panels for the side-by-side layout

* fix: replace hardcoded isEmpty:false with suppressEmptyOverlay prop, fix missing useMemo deps, and align binary cpRevealsOn state with continuous

* fix: correct import order in continuous_question_prediction.tsx
@ncarazon ncarazon force-pushed the feat/question-page-redesign-2nd-iteration branch from df30316 to 3c52441 Compare May 14, 2026 10:47
@ncarazon ncarazon marked this pull request as ready for review May 14, 2026 10:53
@ncarazon
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
front_end/src/app/(main)/questions/[id]/components/question_page_shell/index.tsx (1)

276-276: 💤 Low value

Remove redundant boolean literal in prop.

The isConsumerView prop is hardcoded to true, which is redundant. If this prop is always true in this context, consider removing it or making it the default in the component definition.

♻️ Simplify by removing the explicit boolean
-                isConsumerView={true}
+                isConsumerView

Or verify if this prop can be removed entirely from QuestionTimeline.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/index.tsx
at line 276, The prop isConsumerView is being passed explicitly as the boolean
literal true to QuestionTimeline (in QuestionPageShell / index.tsx); remove the
redundant prop from the JSX or make isConsumerView default to true in the
QuestionTimeline component (update its props/defaults or component signature) so
callers don’t need to pass true—ensure any consumed logic inside
QuestionTimeline continues to work when the prop is omitted by relying on the
new default.
front_end/src/contexts/continuous_chart_cursor_context.tsx (2)

44-45: ⚡ Quick win

Enforce provider usage with a runtime guard.

The hook returns CursorContextValue | null, which can silently fail if called outside ContinuousChartCursorProvider. Add a guard to catch misuse early in development.

🛡️ Add provider requirement check
-export const useContinuousChartCursor = () =>
-  useContext(ContinuousChartCursorContext);
+export const useContinuousChartCursor = () => {
+  const context = useContext(ContinuousChartCursorContext);
+  if (!context) {
+    throw new Error(
+      "useContinuousChartCursor must be used within ContinuousChartCursorProvider"
+    );
+  }
+  return context;
+};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@front_end/src/contexts/continuous_chart_cursor_context.tsx` around lines 44 -
45, The hook useContinuousChartCursor currently returns the raw context which
may be null when called outside ContinuousChartCursorProvider; add a runtime
guard inside useContinuousChartCursor to read the context via
useContext(ContinuousChartCursorContext) and throw a clear error (e.g.,
"useContinuousChartCursor must be used within a ContinuousChartCursorProvider")
when the value is null/undefined so callers fail fast; update the hook to return
the non-null CursorContextValue after the check to satisfy callers.

29-32: ⚡ Quick win

Remove redundant useCallback wrapper.

The setActiveForecast setter returned by useState is already stable and doesn't change across renders. Wrapping it in useCallback adds unnecessary overhead without benefit.

♻️ Simplify by removing the wrapper
-  const stableSet = useCallback(
-    (f: NumericAggregateForecast | null) => setActiveForecast(f),
-    []
-  );
   const value = useMemo(
-    () => ({ activeForecast, setActiveForecast: stableSet }),
-    [activeForecast, stableSet]
+    () => ({ activeForecast, setActiveForecast }),
+    [activeForecast]
   );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@front_end/src/contexts/continuous_chart_cursor_context.tsx` around lines 29 -
32, The stableSet wrapper around setActiveForecast is redundant because the
setter from useState (setActiveForecast) is stable; remove the useCallback
wrapper and assign stableSet directly to the state setter (e.g., const stableSet
= setActiveForecast) or export/use setActiveForecast directly wherever stableSet
is used, and then remove the now-unused useCallback import from
continuous_chart_cursor_context.tsx; update any references to stableSet
accordingly.
front_end/src/app/(main)/questions/[id]/components/question_page_shell/title_row.tsx (1)

30-32: 💤 Low value

Simplify redundant nullish coalescing.

The expression cursorCtx?.activeForecast ?? null is redundant—optional chaining already returns undefined when cursorCtx is null/undefined, and activeForecast itself can be null. The ?? null adds no value.

♻️ Simplify the expression
-  const cursorForecast = cursorCtx?.activeForecast ?? null;
+  const cursorForecast = cursorCtx?.activeForecast ?? undefined;

Or accept null | undefined downstream and avoid the coalescing entirely:

-  const cursorForecast = cursorCtx?.activeForecast ?? null;
+  const cursorForecast = cursorCtx?.activeForecast;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/title_row.tsx
around lines 30 - 32, The expression cursorCtx?.activeForecast ?? null is
redundant; change the assignment in title_row.tsx to use
cursorCtx?.activeForecast directly (e.g., const cursorForecast =
cursorCtx?.activeForecast) and update any downstream code that assumes strictly
null (in functions/components referencing cursorForecast or props) to accept
null | undefined instead so types remain correct; references:
useContinuousChartCursor, cursorCtx, cursorForecast, and any consumers of
cursorForecast.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@front_end/messages/zh-TW.json`:
- Line 2169: The translation value for the key "noHistogramData" uses the
Mainland Chinese term "數據" rather than the zh-TW-preferred "資料"; update the
string value for "noHistogramData" from "沒有可用的直方圖數據" to "沒有可用的直方圖資料" so it
matches the rest of the locale's wording conventions.

In
`@front_end/src/components/detailed_question_card/detailed_question_card/continuous_chart_card.tsx`:
- Around line 98-104: The rendered chart views are still reading from
question.aggregations and ignore the enrichedAggregation returned by
useFullAggregation, and the extra fetch is disabled for binary mode; update the
rendering logic to prefer enrichedAggregation when present: use
enrichedAggregation (or enrichedAggregation.aggregations/histogram fields)
instead of question.aggregations when isContinuous || isBinary and
shouldFetchFull is true (or enrichedAggregation !== null), ensure activeForecast
continues to use enrichedAggregation if available, and enable the
useFullAggregation call for binary mode by passing the appropriate condition
(replace isContinuous && shouldFetchFull with (isContinuous || isBinary) &&
shouldFetchFull or check enrichedAggregation nullity); adjust components that
read question.aggregations[...] (including histogram and timeline render paths
around activeForecast and noHistogramData) to fall back to question.aggregations
only if enrichedAggregation is null.

---

Nitpick comments:
In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/index.tsx:
- Line 276: The prop isConsumerView is being passed explicitly as the boolean
literal true to QuestionTimeline (in QuestionPageShell / index.tsx); remove the
redundant prop from the JSX or make isConsumerView default to true in the
QuestionTimeline component (update its props/defaults or component signature) so
callers don’t need to pass true—ensure any consumed logic inside
QuestionTimeline continues to work when the prop is omitted by relying on the
new default.

In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/title_row.tsx:
- Around line 30-32: The expression cursorCtx?.activeForecast ?? null is
redundant; change the assignment in title_row.tsx to use
cursorCtx?.activeForecast directly (e.g., const cursorForecast =
cursorCtx?.activeForecast) and update any downstream code that assumes strictly
null (in functions/components referencing cursorForecast or props) to accept
null | undefined instead so types remain correct; references:
useContinuousChartCursor, cursorCtx, cursorForecast, and any consumers of
cursorForecast.

In `@front_end/src/contexts/continuous_chart_cursor_context.tsx`:
- Around line 44-45: The hook useContinuousChartCursor currently returns the raw
context which may be null when called outside ContinuousChartCursorProvider; add
a runtime guard inside useContinuousChartCursor to read the context via
useContext(ContinuousChartCursorContext) and throw a clear error (e.g.,
"useContinuousChartCursor must be used within a ContinuousChartCursorProvider")
when the value is null/undefined so callers fail fast; update the hook to return
the non-null CursorContextValue after the check to satisfy callers.
- Around line 29-32: The stableSet wrapper around setActiveForecast is redundant
because the setter from useState (setActiveForecast) is stable; remove the
useCallback wrapper and assign stableSet directly to the state setter (e.g.,
const stableSet = setActiveForecast) or export/use setActiveForecast directly
wherever stableSet is used, and then remove the now-unused useCallback import
from continuous_chart_cursor_context.tsx; update any references to stableSet
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2373a095-5037-4217-9198-6b8132f59382

📥 Commits

Reviewing files that changed from the base of the PR and between ec7bbe1 and 3c52441.

📒 Files selected for processing (30)
  • front_end/messages/cs.json
  • front_end/messages/en.json
  • front_end/messages/es.json
  • front_end/messages/pt.json
  • front_end/messages/zh-TW.json
  • front_end/messages/zh.json
  • front_end/src/app/(main)/questions/[id]/components/key_factors/key_factors_question_consumer_section.tsx
  • front_end/src/app/(main)/questions/[id]/components/multiple_choices_chart_view/index.tsx
  • front_end/src/app/(main)/questions/[id]/components/question_page_shell/index.tsx
  • front_end/src/app/(main)/questions/[id]/components/question_page_shell/title_row.tsx
  • front_end/src/app/(main)/questions/[id]/components/question_view/consumer_question_view/prediction/single_question_prediction/continuous_question_prediction.tsx
  • front_end/src/app/(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/question_header_cp_status.tsx
  • front_end/src/components/charts/fan_chart.tsx
  • front_end/src/components/charts/group_chart.tsx
  • front_end/src/components/charts/histogram.tsx
  • front_end/src/components/charts/multiple_choice_chart.tsx
  • front_end/src/components/charts/numeric_chart.tsx
  • front_end/src/components/charts/numeric_timeline.tsx
  • front_end/src/components/charts/primitives/chart_container.tsx
  • front_end/src/components/charts/primitives/line_cursor_points.tsx
  • front_end/src/components/consumer_post_card/binary_cp_bar.tsx
  • front_end/src/components/consumer_post_card/consumer_question_tile/consumer_continuous_tile.tsx
  • front_end/src/components/detailed_question_card/detailed_group_card/index.tsx
  • front_end/src/components/detailed_question_card/detailed_question_card/continuous_chart_card.tsx
  • front_end/src/components/detailed_question_card/detailed_question_card/hooks/use_full_aggregation.ts
  • front_end/src/components/detailed_question_card/detailed_question_card/index.tsx
  • front_end/src/components/post_card/question_tile/continuous_cp_bar.tsx
  • front_end/src/contexts/continuous_chart_cursor_context.tsx
  • front_end/src/hooks/use_chart_tooltip.ts
  • front_end/src/hooks/use_container_size.ts
💤 Files with no reviewable changes (1)
  • front_end/src/components/detailed_question_card/detailed_question_card/index.tsx

Comment thread front_end/messages/zh-TW.json Outdated
…rs; fix zh-TW locale wording for histogram empty state
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.

1 participant