Skip to content

fix(RHOAIENG-85746): print Feature summary and Model evaluation in Fi… - #9445

Open
jkyaw wants to merge 3 commits into
opendatahub-io:mainfrom
jkyaw:85746DownloadFF_85746
Open

fix(RHOAIENG-85746): print Feature summary and Model evaluation in Fi…#9445
jkyaw wants to merge 3 commits into
opendatahub-io:mainfrom
jkyaw:85746DownloadFF_85746

Conversation

@jkyaw

@jkyaw jkyaw commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

https://issues.redhat.com/browse/RHOAIENG-85746

Description

Firefox print-to-PDF from AutoML Model details → Download left Feature summary and Model evaluation blank (section title only). PatternFly tables default to a CSS-grid layout (pf-m-grid-md) that Firefox cannot print.

This matches confusion matrix: gridBreakPoint="" for a native table layout, plus print CSS that forces display: table. Feature search is omitted in the print document.

Before After
Before1 After1
Before After
Before2 After2

How Has This Been Tested?

Lint, type-check, and unit tests passed in packages/automl/frontend.

  1. Open an AutoML run → Model details.
  2. In Firefox, click Download.
  3. Confirm Feature summary and Model evaluation show table rows in print preview (not a blank page).

Test Impact

Updated Jest tests for Feature summary, Model evaluation, and the model details print portal to assert table content and that pf-m-grid-md is not applied.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)
  • The code follows our Best Practices (React coding standards, PatternFly usage, performance considerations)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Summary by CodeRabbit

  • Bug Fixes

    • Improved print and download layouts for model details, feature summaries, and evaluation metrics.
    • Preserved readable native table formatting across printed reports.
    • Hid the feature search toolbar when printing.
    • Improved printed report headers, table sizing, and page width.
  • Tests

    • Added coverage verifying printed content, layout, table formatting, and feature search visibility.

…refox

Disable PatternFly's CSS-grid table layout for those tabs so Firefox
print-to-PDF can render the rows instead of a blank page.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign daodaonocode for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ca701fdc-d206-49ea-8f43-037ccc911f8b

📥 Commits

Reviewing files that changed from the base of the PR and between b294715 and 081e596.

📒 Files selected for processing (1)
  • packages/automl/frontend/src/app/components/run-results/AutomlModelDetailsModal/AutomlModelDetailsModal.scss
💤 Files with no reviewable changes (1)
  • packages/automl/frontend/src/app/components/run-results/AutomlModelDetailsModal/AutomlModelDetailsModal.scss

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (9)
  • GitHub Check: Sidecar Build: automl
  • GitHub Check: Phase 0: Hermetic Build Preflight
  • GitHub Check: Red Hat Konflux / odh-mod-arch-automl-on-pull-request
  • GitHub Check: Red Hat Konflux / odh-dashboard-on-pull-request
  • GitHub Check: Red Hat Konflux / odh-core-bff-on-pull-request
  • GitHub Check: Red Hat Konflux / odh-mod-arch-notebooks-on-pull-request
  • GitHub Check: check / check
  • GitHub Check: AutoML BFF Tests
  • GitHub Check: Setup

📝 Walkthrough

Walkthrough

Print styles force PatternFly tables to use native table display modes. Feature summary and model evaluation tables disable responsive grid layouts. Print mode hides the feature search toolbar while retaining feature data. Tests verify printed content and confirm that grid classes are absent.

Merge Risk: ⚪ Minimal · up to 081e5

This localized change fixes missing Feature summary and Model evaluation tables in Firefox print-to-PDF and includes related tests; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Firefox print fix for the Feature summary and Model evaluation sections.
Description check ✅ Passed The description includes the issue, implementation details, screenshots, testing steps, test impact, and issue reference; some checklist items remain unchecked.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Contribution Quality And Spam Detection ✅ Passed PASS: The six-file diff addresses a linked Jira issue, adds focused tests, matches existing PatternFly table usage, and the author has prior repository commits; no security-theater or code-quality...
No Hardcoded Secrets ✅ Passed PR changes only SCSS/TSX and tests; scans found no credential assignments, private keys, embedded credentials, or long base64 strings (CWE-798).
No Weak Cryptography ✅ Passed The PR changes only print/layout and Jest test code; the added diff contains no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto APIs, custom crypto, or secret comparisons (CWE-327/CWE-208).
No Injection Vectors ✅ Passed Changed production code only adds print CSS/table props and a trusted print guard; searches found no CWE-78, CWE-79, CWE-89, CWE-94, or CWE-502 injection sink.
No Privileged Containers ✅ Passed The PR delta contains only six AutoML SCSS/TSX test and component files; it changes no Kubernetes/OpenShift manifest, Helm template, or Dockerfile, and adds no prohibited token.
No Sensitive Data In Logs ✅ Passed The PR adds print CSS, table props, and test assertions only; AST and text searches found no logging calls or sensitive data emitted to logs. No CWE/CVE applies.

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.

@odh-dashboard-agent odh-dashboard-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Preflight Agent Report

Verdict: ⚠️ READY WITH WARNINGS
Commit: b294715

Checks
Check Status Details
Conflicts ⚠️ Mergeable, but branch is behind main — rebase before merge
Application Quality Gate (automl) ⏭️ PASS — lint, type-check, unit tests for changed package
Unit Tests ⏭️ PASS
Lint (main) ⚠️ Still running
Type Check (main) ⚠️ Still running
Contract Tests ⚠️ Still running
Cypress Tests ⚠️ Still running
Builds ⚠️ Still running (Konflux, Sidecar, Docker)
Jira RHOAIENG-85746
Test Coverage 3 test files updated — print mode, native layout, portal content
PR Body Jira URL, description, testing steps, before/after screenshots
Human Reviews ⚠️ REVIEW_REQUIRED — no approvals yet
Style No violations — gridBreakPoint="" (PF prop, priority 1) and !important inside @media print both justified
RBAC N/A — frontend-only styling change
Jira Eval No acceptance criteria in issue (bug report with screenshots only)
Claude Review 🧹 1 nit See nits below
🧹 Nitpick comments (1)
packages/automl/frontend/src/app/components/run-results/AutomlModelDetailsModal/AutomlModelDetailsModal.scss (1)

510: 🧹 Nit · Claude review

The .odh-autox-print-hide-element CSS class is defined here but no longer referenced anywhere in the codebase — className="odh-autox-print-hide-element" was removed from SearchInput in this PR (replaced with the cleaner !print conditional render). The rule is now dead code and can be removed.


Automated by ODH Dashboard Agent

The search toolbar is already omitted in print via a !print render
guard, so .odh-autox-print-hide-element was unused.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.98%. Comparing base (9be1208) to head (081e596).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9445      +/-   ##
==========================================
+ Coverage   59.97%   59.98%   +0.01%     
==========================================
  Files        3128     3128              
  Lines       97606    97606              
  Branches    25707    25707              
==========================================
+ Hits        58538    58553      +15     
+ Misses      39068    39053      -15     
Flag Coverage Δ
cypress-mock 69.43% <ø> (+0.02%) ⬆️
unit 30.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 16 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9be1208...081e596. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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