Skip to content

Refresh item page price statistics when the graph range changes - #1566

Merged
Ekwav merged 2 commits into
Coflnet:mainfrom
ekwav-agent:ekwav-agent/task_sybzwnhiqp2k22qzj2ea
Nov 1, 2026
Merged

Ekwav merged 2 commits into
Coflnet:mainfrom
ekwav-agent:ekwav-agent/task_sybzwnhiqp2k22qzj2ea

Conversation

@ekwav-agent

Copy link
Copy Markdown
Contributor

Summary

Behaviour: Graph statistics refresh across ranges, stale year summaries clear, and leaving a failed year request restores the chart.

More detail

Change: Create fresh chart options, reset range-specific state, and discard outdated responses using per-instance refs.

Test: Cypress regressions fail on base and pass patched:

  • Range refresh: late annotations restore an incorrect average on base.
  • Year reload: old statistics remain visible on base.
  • Year-error recovery: chart remains hidden on base.

Open:

  • Report B remains unreproduced without a trace or failing response. Candidate: /api/item/price/JUDGEMENT_CORE/history/year, backend PricesService.GetDetailedHistory checked sums.
  • Graph has no median; FAQ statistics describe 24 hours and Market Analysis selects its own period.
  • Populated visual inspection was blocked by webcheck’s external-request restrictions.

What is the worst that could happen?

Incorrect chart values or loading states; reverting restores prior behaviour without persistent data changes.

Test repair prerequisite

This change builds on the test repair in PR #1564 at commit 28b5805b97a29144cb5182326923710799b52d37. Merge that PR first, then merge this one. This PR targets main in the upstream repository; GitHub does not use the prerequisite fork branch as its base.

Validation: 50/50 checks passed · reviewed in a separate claude session · dependencies unchanged.

Checks and provenance
  • node_26
  • npm_ci
  • production_build
  • test_server_ready
  • regression_base_fail_patch_pass
  • cypress_account-active-subscription_cy_ts
  • cypress_auction-start_cy_ts
  • cypress_auction_cy_ts
  • cypress_bazaar-plan_cy_ts
  • cypress_bazaar-snapshot-recovery_cy_ts
  • cypress_color-filter_cy_ts
  • cypress_copy-button_cy_ts
  • cypress_crafting-utils_cy_ts
  • cypress_crafts-multi-step_cy_ts
  • cypress_crafts_cy_ts
  • cypress_dom-translation_cy_ts
  • cypress_error-reporting_cy_ts
  • cypress_filter-result-id-utils_cy_ts
  • cypress_filter_cy_ts
  • cypress_flip-tracking-recovery_cy_ts
  • cypress_flipper-recovery_cy_ts
  • cypress_forge_cy_ts
  • cypress_generated-api-client_cy_ts
  • cypress_generated-api-response-utils_cy_ts
  • cypress_goal-utils_cy_ts
  • cypress_google-user-changed_cy_ts
  • cypress_hydration-safe-dates_cy_ts
  • cypress_in-game-command-utils_cy_ts
  • cypress_item-category-check_cy_ts
  • cypress_item-category-utils_cy_ts
  • cypress_item-filter-params-utils_cy_ts
  • cypress_item-redirect-utils_cy_ts
  • cypress_market-analysis_cy_ts
  • cypress_navigation-accessibility_cy_ts
  • cypress_node-toolchain_cy_ts
  • cypress_notification-targets_cy_ts
  • cypress_page-search-utils_cy_ts
  • cypress_player_cy_ts
  • cypress_rat-checker_cy_ts
  • cypress_recent-auctions-recovery_cy_ts
  • cypress_reduced-motion_cy_ts
  • cypress_rsc-cache-poisoning_cy_ts
  • cypress_search-rows-utils_cy_ts
  • cypress_search-shortcut_cy_ts
  • cypress_search_cy_ts
  • cypress_stale-chunk-recovery_cy_ts
  • cypress_startpage-favorites_cy_ts
  • cypress_terms-acceptance_cy_ts
  • cypress_year-view_cy_ts
  • authenticated_year_view_personas

Review notes:

  • Round 1: Re-entering the year range after a failed year request reuses the cached query error, so the error box can show again right away even if the background refetch then succeeds; on the base commit this case stayed stuck loading instead, so it is not a regression.
  • Round 1: loadPriceHistory builds its new options from the chartOptions captured when the request started, so a range change from a stale filter callback could briefly lose newer legend state; legend toggles never updated React state on the base commit either.
  • Round 1: The item graph has no median; the FAQ statistics and the Market Analysis block (its own days state, default 7) don't follow the chart's range buttons, and the response says so.
  • Round 1: Report B stays unreproduced; the most likely source is the backend endpoint /api/item/price/<tag>/history/year (checked sums in PricesService.GetDetailedHistory), and the frontend has no change for it.
  • Round 1: The price graph has no median statistic, and the Market Analysis block still keeps its own period rather than following the chart range; neither was changed, as the task allowed.
  • Round 1: Chart options built during a range change still copy legend selection from component state, which is not updated when the user toggles the legend, so toggles made since page load may be reset on reload; the base commit behaves the same because the chart remounts there too.
  • Round 1: The year error test stubs the response body as {message:'overflow'}, but only the generic server-error text is checked, so the test does not confirm how report B's message would be displayed.

Task: task_sybzwnhiqp2k22qzj2ea

Base: main at 28b5805b97a29144cb5182326923710799b52d37

@ekwav-agent
ekwav-agent requested a review from Ekwav November 1, 2026 19:05
@Ekwav
Ekwav merged commit de9a350 into Coflnet:main Nov 1, 2026
4 checks passed
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