Skip to content

fix(ui): seven task icons render blank after the Font Awesome 7 migration - #1338

Merged
mastacontrola merged 2 commits into
working-1.6from
fix-fa7-database-icon-names
Aug 24, 2026
Merged

fix(ui): seven task icons render blank after the Font Awesome 7 migration#1338
mastacontrola merged 2 commits into
working-1.6from
fix-fa7-database-icon-names

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Follow-up to #1336, which I shipped with this gap.

The bug

The FA7 migration renamed every icon class in PHP and JS. It missed the icons FOG stores as data: taskTypes.ttIcon and taskStates.tsIcon hold a bare icon name with no prefix, seeded by commons/schema.php and rendered as fa fa-<stored name> by fog.task.list.js and the host and group task menus.

Seven are FA4 outline names FA7 dropped outright, so they resolve to nothing and render blank:

table id name stored fixed to
taskTypes 4 Memtest86+ plus-square-o square-plus
taskTypes 5 Test Disk hdd-o hard-drive
taskTypes 15 Deploy - Debug arrow-circle-o-down circle-arrow-down
taskTypes 16 Capture - Debug arrow-circle-o-up circle-arrow-up
taskTypes 18 Fast Wipe hourglass-o hourglass-start
taskTypes 22 Virus Scan - Quarantine flag-o flag
taskStates 1 Queued bookmark-o bookmark

Visible in Task Management, the task list, and both task menus, on every upgraded and every fresh install. The prefix was never the problem — fa is still the solid alias in FA7.

Why the suite could not see it

tests/fontawesome7-icon-names.test.php scans source for a literal fas fa-name. A name that only ever exists as a row in the database is invisible to it. That blind spot is what let #1336 through.

The fix

Appended schema steps, not edits to steps 2907-2987. An install that has already run those never replays them, so an in-place edit fixes a fresh install and leaves every existing one broken. Each step is guarded on the old value, so an administrator who already picked their own icon keeps it. FOG_SCHEMA 360 → 367.

Fast/Normal/Full Wipe are read as a set, so Fast takes hourglass-start rather than any surviving hourglass: Normal holds hourglass-2 (an FA7 alias of hourglass-half) and Full holds hourglass.

The renderers are also moved off the bare fa prefix — the last core call sites still on it. They evaded the existing check because the name is concatenated on, so the literal ends at the quote and matched nothing.

Verification

Three new gates, both behavioural ones mutation-verified:

  • seeded names extracted from schema.php (last-write-wins) and checked against the shipped stylesheet — removing one correction fails it, naming the row
  • no renderer may concatenate onto fa fa- — reverting one renderer fails it, naming the file

The seed extraction folds away PHP string concatenation first. Without that it sees only the steps that fit on one line — every historical step and none of the corrections — and reports the bug as still present.

Against the lab database in a rolled-back transaction:

  total rows changed: 7
  dead icons remaining after the steps: 0
  rows changed on a second run (must be 0): 0
  rolled back -- lab DB unchanged

Full suite: 143 passed, 0 failed.

FOG_BCACHE_VER 313 → 314 for the two changed JS files.

Related

fog-plugins carries the same shape in tasktypeedit/js/fog.tasktypeedit.list.js, which composes fa fa- + a stored value. Its prefix wants the same move; the stored values it renders are the taskTypes rows this PR repairs, so no data change is needed there.

…tion

The FA7 migration renamed every icon class in PHP and JS. It missed the icons
FOG stores as DATA: taskTypes.ttIcon and taskStates.tsIcon hold a bare icon
name with no prefix, seeded by commons/schema.php and rendered as
`fa fa-<stored name>` by fog.task.list.js and the host and group task menus.

Seven of those values are FA4 outline names FA7 dropped outright, so they now
resolve to nothing and render blank:

  taskTypes  4  Memtest86+               plus-square-o        square-plus
  taskTypes  5  Test Disk                hdd-o                hard-drive
  taskTypes 15  Deploy - Debug           arrow-circle-o-down  circle-arrow-down
  taskTypes 16  Capture - Debug          arrow-circle-o-up    circle-arrow-up
  taskTypes 18  Fast Wipe                hourglass-o          hourglass-start
  taskTypes 22  Virus Scan - Quarantine  flag-o               flag
  taskStates 1  Queued                   bookmark-o           bookmark

Visible in Task Management, the task list, and both task menus, on every
upgraded and every fresh install.

Corrected by appended schema steps rather than by editing steps 2907-2987 in
place: an install that has already run those never replays them, so an in-place
edit would fix a fresh install and leave every existing one broken. Each step
is guarded on the old value, so an administrator who has already chosen their
own icon for one of these keeps it. FOG_SCHEMA 360 -> 367.

Fast/Normal/Full Wipe are read as a set, so Fast takes hourglass-start rather
than any surviving hourglass: Normal already holds hourglass-2, which FA7
resolves as an alias of hourglass-half, and Full holds hourglass.

The renderers that compose these values are moved off the bare `fa` prefix at
the same time. They are the last call sites still on it, and they evaded the
existing check because the name is concatenated on, so the literal ends at the
quote and matched nothing.

tests/fontawesome7-icon-names.test.php gains three gates: the seeded names are
extracted from schema.php with last-write-wins and checked against the shipped
stylesheet, and no renderer may concatenate onto `fa fa-`. Both were verified
by mutation. The seed extraction folds away PHP string concatenation first --
without that it sees only the steps that fit on one line, which is every
historical step and none of the corrections, and reads as the bug persisting.

Verified against the lab database in a rolled-back transaction: 7 rows
changed, 0 unresolvable icons remaining, 0 rows changed on replay.

FOG_BCACHE_VER 313 -> 314 for the two changed JS files.

Co-Authored-By: Claude <noreply@anthropic.com>
Carries FOGProject/fog-plugins#26, which moves the tasktypeedit icon renderer
off the bare `fa` prefix -- the plugin half of the same cleanup this PR makes
in core.

Verified by fetching the release into the tree: stamp reads v1.6.16 and the
renderer in the installed copy emits `fas fa-`.

Co-Authored-By: Claude <noreply@anthropic.com>
@mastacontrola
mastacontrola merged commit e8461ce into working-1.6 Aug 24, 2026
7 checks passed
@mastacontrola
mastacontrola deleted the fix-fa7-database-icon-names branch August 24, 2026 02:24
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.

1 participant