Skip to content

fix(people): write the avatar size as two ifs instead of a switch - #909

Merged
rubenvdlinde merged 2 commits into
developmentfrom
fix/sig-people-avatar-size-measurement
Nov 2, 2026
Merged

rubenvdlinde merged 2 commits into
developmentfrom
fix/sig-people-avatar-size-measurement

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

Measurement fix. In PeopleWidget.vue, the avatarSize computed used a switch with default:. lizard (and so gate 122) reads a switch-default inside a Vue computed as running to the end of the script, so avatarSize counted as one 216-line unit with McCabe 44. The same choice is now written as two ifs. No template or CSS change. Sigrid's parser may not have this artifact, so this is a measurement fix rather than a complexity reduction.

SIG (gate 122, lizard 1.24.3)

Flips vue CCN >10 at 4 stars and vue CCN >25 at 4 and 5 stars. Vue size >30 and size >60 now also meet 5 stars.

vue development branch 4-star 5-star
CCN >10 8.81% 5.06% 7.3% 3.7%
CCN >25 3.75% 0.00% 1.1% 0.55%
size >30 13.72% 9.97% 23.1% 11.6%
size >60 4.91% 1.16% 8.3% 4.2%
params >=3 1.39% 1.39% 15% 7.5%

Verified

  • Golden test PeopleWidgetAvatarSize.golden.spec.js: the computed value for 8 layouts (card, list, grid, unknown, empty, undefined, null, CARD) plus the rendered markup of the mounted widget in four layouts. Recorded on the old code and re-run in plain mode on old and new: pass.
  • Mutants (timeout 120, --maxWorkers=2, 1.5 GB heap): 5 of 5 killed on the old code and 5 of 5 on the new (each layout key and each size). A comment-only control survives on both.
  • npx vitest run: 126 files, 1000 tests pass. eslint and prettier --check on the changed files: exit 0.

AI disclosure: prepared with Claude Code (claude-opus-5-5) and reviewed by the lane before opening.

🤖 Generated with Claude Code

Measurement fix. lizard reads a switch with `default:` inside a Vue
computed as running to the end of the script, so avatarSize() counted as
one 216-line unit with McCabe 44. The same choice as two ifs is measured
as what it is. The value per layout and the rendered markup are unchanged,
pinned by a golden test.

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 5569bb4

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ❌
stylelint ✅
build ✅
check-manifest ✅
format ❌
check-schema-l10n ✅
composer ✅ ✅ 107/107
npm ❌ ✅ 636/636
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅ 1962/1962
Newman ✅ 224/224
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-01 22:57 UTC

Download the full PDF report from the workflow artifacts.

JSON keys may not be empty (json/no-empty-keys), so the empty-string
layout is recorded under "(empty string)". The recorded values are
unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 85504c2

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
format ❌
check-schema-l10n ✅
composer ✅ ✅ 107/107
npm ❌ ✅ 636/636
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅ 1962/1962
Newman ✅ 224/224
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-02 06:32 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit e4fa300 into development Nov 2, 2026
39 of 43 checks passed
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