Profile interface and web components lifecycle improvements#427
Merged
Conversation
Contributor
cubap
approved these changes
Feb 4, 2026
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.
Summary
Fixes #418 - Eliminates the "flash" UI behavior on the
/profilepage caused by multiple redundant API calls and render cycles.Problem
The profile page had a cascade effect where:
TPEN.attachAuthentication(this)which sets thetpen-user-idattributeUser.getProfile()getProfile()dispatchedtpen-user-loadedeventResult: Up to 16 render cycles (4 events × 4 listeners) plus 3 redundant
getUserProjects()API calls.Solution
Created two new utilities following the existing
onProjectReadypattern:utilities/userReady.js- Handles user data readiness with caching and single-fetch guaranteeutilities/userProjectsReady.js- Handles user projects with caching and single-fetch guaranteeRefactored 4 profile components to use these utilities instead of attribute observation:
components/user-profile/index.jscomponents/user-profile/userStats.jscomponents/user-profile/report.jscomponents/user-profile/contributionActivity.jsKey Changes
_isRenderingguards prevent double renders when callbacks fire quicklydisconnectedCallbackobservedAttributesandattributeChangedCallback(internal implementation detail, not a breaking change)Expected Results
tpen-user-loadedeventsgetUserProjects()calls