A task with no transfer data shows no progress text - #1748
Merged
Merged
Conversation
The Active Tasks grid's column 8 render always built "timeElapsed / timeRemaining dataCopied of dataTotal (bpm/min)" plus a progress bar, whatever the task's state. A queued task, a snapin task, or any other non-imaging task never populates the transfer fields, so the cell read literally "/ of (/min)" with an empty bar instead of nothing. Reported on the forum with a screenshot of two queued "All Snapins" tasks. Guard the render on row.dataTotal: when it is empty/falsy there is no transfer to describe, so the cell returns '' instead of assembling the string and the bar. A census of packages/web/management/js for the same ' of ' + '/min)' shape found only this one copy. Bump FOG_BCACHE_VER for the JS change, and add a gate test that pins the guard running before the ' of ' string is built. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8UmmbQHjihkSkd3r94Jgw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / why
The Active Tasks grid's column 8 render (
fog.task.list.js) always builttimeElapsed / timeRemaining dataCopied of dataTotal (bpm/min)plus aprogress bar, whatever the task's state. A queued task, a snapin task, or
any other non-imaging task never populates the transfer fields, so the
cell rendered literally
/ of (/min)with an empty bar instead ofnothing. A forum reporter's screenshot showed this on two queued "All
Snapins" tasks.
The render now guards on
row.dataTotal: when it is empty/falsy there isno transfer to describe, so the cell returns
''instead of assemblingthe string and the bar. Otherwise the output is unchanged.
Census
Grepped
packages/web/management/jsfor the same' of '+'/min)'renderer shape and for the field names it depends on
(
dataCopied/dataTotal/timeElapsed/timeRemaining). Only one copyexists:
fog.task.list.jscolumn 8. No other file (host Tasks tab,dashboard, etc.) needed the same guard.
Gate test
Added
tests/task-progress-cell-empty-without-data.test.php, modeled ontests/module-state-select-is-legible.test.php. It pins that therow.dataTotalguard runs before the' of 'string is assembled.Proved it's a gate by temporarily removing the guard and re-running:
Restored the guard and re-ran:
Other
FOG_BCACHE_VERbumped 365 -> 366 (JS changed).phpstanpasses clean, unscoped.🤖 Generated with Claude Code
https://claude.ai/code/session_01F8UmmbQHjihkSkd3r94Jgw