-
Notifications
You must be signed in to change notification settings - Fork 365
NAS-139093 / 26.04 / feat: add auto-expand to jobs page and improve details for error modals #13059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… cell state button * add a URL parameter and handling to the jobs list page. tihs allows us to navigate to the jobs page and have it immediately expand one of the rows if we want to highlight something. * add logic to the job state button we use in `ix-tables` to show a `Download Logs` button and a `View Details` button when those details are available.
…obs list component
|
Claude finished @mattwyatt-ix's task —— View job Code Review Complete! ✅Great work on improving the jobs page UX and error handling! The implementation is solid with comprehensive tests. Here are my findings: 🎯 Positive AspectsNice implementation of the auto-expand feature with clean URL parameter handling and the synchronization between expanded state and URL is elegant. The bug fix for rsync task mutation is well-spotted and properly resolved with the spread operators. 🔍 Issues FoundCritical Issue in jobs-list.component.ts:157 The combineLatest([jobsTrigger$.pipe(take(1)), queryTrigger$])Problem: Impact: URL navigation to jobs might work only once. Subsequent navigations via URL parameter changes won't trigger auto-expansion. Fix: Use combineLatest([
jobsTrigger$.pipe(take(1)),
queryTrigger$,
]).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(...)Actually, looking more carefully, the current implementation might work for the initial load + all query param changes since 🐛 Minor Issues1. Missing i18n in error-parser.service.ts:203-206 The action labels are wrapped in 2. Test coverage gaps According to Codecov, it('does not include logs property when logs_excerpt is empty', () => {
const jobWithoutLogs = { ...failedJob, logs_excerpt: null };
const result = spectator.service.parseError(new FailedJobError(jobWithoutLogs));
expect(result.logs).toBeUndefined();
});3. Component coupling in ix-cell-state-button.component.ts:146 Direct construction of 💡 Suggestionsjobs-list.component.ts:171-177 - The protected onRowExpanded(job: Job): void {
const currentJobId = this.route.snapshot.queryParams.jobId;
if (currentJobId === String(job.id)) return;
this.router.navigate([], {
relativeTo: this.route,
queryParams: { jobId: job.id },
queryParamsHandling: 'merge',
});
}This prevents unnecessary URL updates when clicking the same expanded row. 📊 Test QualityTests are well-structured using harnesses (excellent!). The auto-expand test cases in ✨ Overall AssessmentSolid feature implementation with good UX improvements and mostly excellent test coverage - just needs the race condition investigation and minor test coverage improvements. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #13059 +/- ##
==========================================
+ Coverage 86.71% 86.77% +0.06%
==========================================
Files 1847 1847
Lines 69415 69475 +60
Branches 8585 8601 +16
==========================================
+ Hits 60193 60287 +94
+ Misses 9222 9188 -34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* expanding rows now sets the URL parameter for easy copying and for page refresh consistency. * due to this new behavior, we don't have to hide the `View Details` button on error modals anymore, since we can be consistent no matter what. * clean up implementation of the `ix-cell-state-button`'s error showing functionality.
* deep-copy rsync task mutation fix. * fix a typo in a comment. * add unit test to verify that the jobs list page sets URL parameters correctly. * fix a possible observable re-emission issue in the jobs list that would have randomly expanded a row without user interaction.
… list this resolves a potential memory leak.
Changes:
the error dialog we pop up when clicking on a failed job's state button didn't provide any information beyond the error message we got from middleware. specifically, in the case for a failed rsync task, the message we displayed from middleware directed the user to
Check logs for further information, but our popup didn't show any indication of how to get there. this PR improves that experience a little bit.showErrorModalfunction used throughout the codebase to show aView Detailsand aDownload Logsbutton when logs are available.Testing:
there are a few different test cases to work through here. otherwise, just click around on the jobs page and anywhere you can see a failed job. try to make sure the whole UX is consistent and behaves as one would expect.
case 1:
FAILEDbutton on the job's table row and observe the two new buttons.View Detailsbutton takes you to the jobs page and automatically expands the proper job's row.case 2:
case 3:
Screenshots and screen recordings:
Screencast_20260105_094426.webm
Downstream