Skip to content

[AI Test Toolkit] Refresh Run History when changing View By#8440

Draft
onbuyuka wants to merge 1 commit into
mainfrom
bugs/622420-ait-run-history-viewby
Draft

[AI Test Toolkit] Refresh Run History when changing View By#8440
onbuyuka wants to merge 1 commit into
mainfrom
bugs/622420-ait-run-history-viewby

Conversation

@onbuyuka
Copy link
Copy Markdown
Contributor

@onbuyuka onbuyuka commented Jun 3, 2026

Summary

On the AI Eval Suite Run History page (page 149032 "AIT Run History"), changing the View By control (Version/Tag) — or toggling Apply Filter — did not update the displayed data.

Root cause

Two compounding defects in the refresh path:

  1. Repaint. UpdateRunHistory() rebuilds the temporary source table (DeleteAll + re-Insert inside codeunit 149036 "AIT Run History".GetHistory) and then calls the parameterless CurrPage.Update(), which defaults to Update(true). That tries to save the (just-deleted) current record rather than redraw. The canonical pattern after repopulating a temporary page source is CurrPage.Update(false).

  2. Stale FlowFilter. GetHistory set the "Line No. Filter" FlowFilter only when LineNo <> 0 and never cleared it. Since DeleteAll does not clear filters, unchecking Apply Filter (LineNo -> 0) left the previous line filter on the FlowFields, so the columns recomputed against the wrong line and showed zeros/old data.

Fix

  • AITRunHistory.Page.alCurrPage.Update(false) after rebuilding the temp records.
  • AITRunHistory.Codeunit.al — clear the "Line No. Filter" FlowFilter when LineNo = 0 (add an else SetRange("Line No. Filter")).

Impact / risk

Low — internal AI Test Toolkit tooling page, read-only temporary source. Both changes are the standard idioms for this scenario.

Verification

  • Statically traced: View By OnValidate → UpdateRunHistoryGetHistory (sole data builder) → CurrPage.Update. FlowField columns key on "Line No. Filter".
  • ⚠️ Not runtime-verified on an NST (AL does not run locally here) — relying on PR CI for compile + tests; manual repro on the Run History page recommended before merge.

Linked work item: AB#622420

🤖 Generated with Claude Code

@github-actions github-actions Bot modified the milestone: Version 29.0 Jun 3, 2026
…w By

On page 149032 "AIT Run History" (AI Eval Suite Run History), changing the
"View By" control (or toggling "Apply Filter") did not update the displayed
data.

Two causes:
1. UpdateRunHistory() rebuilt the temporary source table (DeleteAll +
   re-Insert in codeunit 149036 "AIT Run History".GetHistory) but then
   called the parameterless CurrPage.Update(), which defaults to
   Update(true) and attempts to save the (now-deleted) current record
   instead of redrawing. After repopulating a temporary page source the
   correct call is CurrPage.Update(false).
2. GetHistory only set the "Line No. Filter" FlowFilter when LineNo <> 0 and
   never cleared it, so unchecking "Apply Filter" (LineNo -> 0) left the
   stale line filter on the FlowFields, showing zeros/old data.

Fix: call CurrPage.Update(false) after rebuilding the temp records, and
clear the "Line No. Filter" FlowFilter when LineNo = 0.

Fixes AB#622420

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@onbuyuka onbuyuka force-pushed the bugs/622420-ait-run-history-viewby branch from 2ab4796 to e058a94 Compare June 3, 2026 19:07
@onbuyuka
Copy link
Copy Markdown
Contributor Author

onbuyuka commented Jun 4, 2026

CI note: the Clean build failure is a known BCApps incremental-build infra issue — not this change

The ... (Clean) build failure is not caused by this PR. The incremental Clean build compiles the modified AI Test Toolkit app against the System Application bundled in the BC platform artifact (sandbox/29.0.51094.0) instead of the freshly-built System Application. That artifact predates #8381, which added Agent Task.OpenAgentTaskLogEntries / GetStepsDoneCount (called by AITAgentLogEntryPart.Page.al), so the compiler reports AL0132 ... does not contain a definition for ....

Evidence it is infrastructure, not this change:

No code change is appropriate (a #if not CLEAN29 guard on non-obsolete methods would be wrong). This goes green once the platform-artifact pin advances past #8381. Holding for that.

@onbuyuka onbuyuka closed this Jun 4, 2026
@onbuyuka onbuyuka reopened this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant