Skip to content

Default test history to the latest three months - #612

Draft
okt-limonikas wants to merge 1 commit into
ts-factory:mainfrom
okt-limonikas:history-adjust-dates
Draft

Default test history to the latest three months#612
okt-limonikas wants to merge 1 commit into
ts-factory:mainfrom
okt-limonikas:history-adjust-dates

Conversation

@okt-limonikas

Copy link
Copy Markdown
Collaborator

Summary

This PR changes the default test history date range to the latest three calendar months ending today.

Previously, history links were anchored to the source run. Recent runs produced a range ending at the run finish date, while older runs could produce a six-month range that still ended in the past. This prevented users from seeing executions that happened after the selected run.

After this change, the source run is used only to build the test filters. Its date no longer controls the history period.

Before

If today is July 24:

  • A history link opened from a July 20 run ended on July 20 and excluded newer executions.
  • A history link opened from an old January run showed data around or before January and excluded current results.
  • Different history initialization paths used inconsistent defaults such as 31 days, 93 days, or no backend date range.

After

If today is July 24, automatically generated history searches use:

startDate=April 24
finishDate=July 24
This applies regardless of whether the source run is recent or several years old.
Explicitly selected dates are preserved and are not replaced by the default range.

Implementation details:

  • Added a shared getDefaultHistoryDateRange helper that calculates a three-calendar-month range ending at the current date.
  • Updated the history search builder to use this current range.
  • Removed source-run date anchoring and the old three-month/six-month branching logic.
  • Updated all direct and prefilled result history shortcuts through the shared link builder.
  • Updated run-table history links to use the same range.
  • Removed the run-details request that was previously needed only to obtain the run finish date for a run-table history link.
  • Aligned history form defaults and legacy form initialization with the shared range.
  • Added missing default dates when converting frontend history queries to backend queries.
  • Preserved explicit startDate and finishDate values.
  • Kept existing test-name, parameter, tag, verdict, result, run-ID, and mode filtering behavior unchanged.

Fixes #611

@okt-limonikas
okt-limonikas force-pushed the history-adjust-dates branch from 89367e5 to 22e0666 Compare July 24, 2026 00:25
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.

Show the latest three months by default in test history

1 participant