Repository navigation
fix(people): write the avatar size as two ifs instead of a switch - #909
Merged
Merged
Conversation
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
Contributor
Quality Report — ConductionNL/launchpad @
|
| 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
This was referenced Nov 2, 2026
Contributor
Quality Report — ConductionNL/launchpad @
|
| 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.
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
Measurement fix. In
PeopleWidget.vue, theavatarSizecomputed used aswitchwithdefault:. lizard (and so gate 122) reads a switch-default inside a Vue computed as running to the end of the script, soavatarSizecounted as one 216-line unit with McCabe 44. The same choice is now written as twoifs. 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.
Verified
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.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--checkon 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