feat(user): present the User panel with a hero() header, marked attribute sections, and counted RBAC sections; match textual statuses by label and word the guest state for any framework. - #76
Conversation
…ribute sections, and counted RBAC sections; match textual statuses by label and word the guest state for any framework.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 2392 2411 +19
===========================================
Files 173 173
Lines 8726 8804 +78
===========================================
+ Hits 8726 8804 +78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (23)
🧰 Additional context used🪛 PHPMD (2.15.0)tests/Theme/CssTest.php[error] 56-56: Avoid using static access to class '\PHPForge\Debug\Theme\Css' in method 'testHeroMapsEveryToneToItsAccentClasses'. (undefined) (StaticAccess) src/Panel/PanelRenderer.php[warning] 66-873: The class PanelRenderer has an overall complexity of 65 which is very high. The configured complexity threshold is 50. (undefined) (ExcessiveClassComplexity) [error] 66-873: The class PanelRenderer has a coupling between objects value of 65. Consider to reduce the number of dependencies under 13. (undefined) (CouplingBetweenObjects) [error] 439-439: Avoid using static access to class '\PHPForge\Debug\Helper\Badge' in method 'hero'. (undefined) (StaticAccess) [error] 469-469: Avoid using static access to class '\PHPForge\Debug\Theme\Css' in method 'hero'. (undefined) (StaticAccess) tests/Panel/PanelRendererTest.php[warning] 23-902: The class PanelRendererTest has 29 non-getter- and setter-methods. Consider refactoring PanelRendererTest to keep number of methods under 25. (undefined) (TooManyMethods) [warning] 23-902: The class PanelRendererTest has 29 public methods. Consider refactoring PanelRendererTest to keep number of public methods under 10. (undefined) (TooManyPublicMethods) [error] 448-458: Avoid using static access to class '\PHPForge\Debug\Panel\PanelRenderer' in method 'testHeroRendersTheSubjectStatusAndMetricRow'. (undefined) (StaticAccess) [error] 454-454: Avoid using static access to class '\PHPForge\Debug\PanelView' in method 'testHeroRendersTheSubjectStatusAndMetricRow'. (undefined) (StaticAccess) [error] 455-455: Avoid using static access to class '\PHPForge\Debug\PanelView' in method 'testHeroRendersTheSubjectStatusAndMetricRow'. (undefined) (StaticAccess) [error] 456-456: Avoid using static access to class '\PHPForge\Debug\PanelView' in method 'testHeroRendersTheSubjectStatusAndMetricRow'. (undefined) (StaticAccess) [error] 479-479: Avoid using static access to class '\PHPForge\Debug\Panel\PanelRenderer' in method 'testHeroWithoutOptionalPartsStaysNeutral'. (undefined) (StaticAccess) tests/Panel/User/UserDataNormalizerTest.php[warning] 21-548: The class UserDataNormalizerTest has 19 public methods. Consider refactoring UserDataNormalizerTest to keep number of public methods under 10. (undefined) (TooManyPublicMethods) [error] 338-341: Avoid using static access to class '\PHPForge\Debug\Panel\User\UserDataNormalizer' in method 'testFromIdentityMapsATextualStatusByItsLabel'. (undefined) (StaticAccess) [error] 461-471: Avoid using static access to class '\PHPForge\Debug\Panel\User\UserDataNormalizer' in method 'testFromIdentityResolvesAttributeLabelsFromTheLabelMap'. (undefined) (StaticAccess) tests/Panel/User/UserPanelTest.php[warning] 33-157: The method testAuthenticatedIdentityDescribesItsHeroAndAttributeSections() has 125 lines of code. Current threshold is set to 100. Avoid really long methods. (undefined) (ExcessiveMethodLength) src/Panel/User/UserPanel.php[error] 127-130: Avoid using static access to class '\PHPForge\Debug\PanelView' in method 'identity'. (undefined) (StaticAccess) [error] 131-131: Avoid using static access to class '\PHPForge\Debug\PanelView' in method 'identity'. (undefined) (StaticAccess) [error] 132-135: Avoid using static access to class '\PHPForge\Debug\PanelView' in method 'identity'. (undefined) (StaticAccess) [error] 260-260: Avoid using static access to class 'PHPForge\Debug\Panel\User\UserRbacRow' in method 'rbacRows'. (undefined) (StaticAccess) 🔇 Additional comments (13)
📝 SummarySummary by CodeRabbit
WalkthroughThe user panel now presents identity details in a hero and groups attributes, roles, and permissions into sections. Hero rendering supports optional status and metrics with tone-based styling. Status normalization recognizes configured textual labels without regard to case. ChangesUser identity panel
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The new user-panel presentation and its styles are ready to merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changes primarily affect debugger presentation. No security issue introduced by the PR was established, but the available evidence does not fully establish who can receive the panel or how all supplied text is encoded. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 11 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. This rabbit sees a hero glow, Comment |
Pull Request