Repository navigation
refactor: remove dead demo-data helpers in useUsers hook - #24437
Conversation
_getDemoAllOpenShiftUsers and _getDemoAllK8sServiceAccounts were never called from any production or test code; each was only referenced by a 'void ...' statement added solely to suppress the unused-variable lint warning. Remove both along with their suppression lines. Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @hivecommons-hive[bot] — thanks for opening this PR!
This is an automated message. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
There was a problem hiding this comment.
Read the full web/src/hooks/useUsers.ts at head 30b5eac — this looks correct to me.
- Code search across the repo finds
_getDemoAllOpenShiftUsersand_getDemoAllK8sServiceAccountsonly in this one file; nothing else (prod or test) references them. - The "keeping for future all-clusters mode" rationale in the deleted comments is already moot: both hooks implement the multi-cluster aggregation inline —
allUsers.push(...getDemoOpenShiftUsers(cluster))atuseUsers.ts:358andallSAs.push(...getDemoK8sServiceAccounts(cluster))atuseUsers.ts:557— so the helpers were dead duplicates of code that already exists. - The retained
getDemoOpenShiftUsers/getDemoK8sServiceAccountshelpers keep their remaining callers (lines 292, 358, 466, 557); nothing the diff removes is load-bearing.
Pure deletion, matches the stated goal in #24436, no behavior change. (Not approving formally — that's a human's signature — but I found nothing to flag.)
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
✅ Post-Merge Verification: passedCommit: |
Refactor
Removes two functions from
web/src/hooks/useUsers.tsthat are never called from production or test code:_getDemoAllOpenShiftUsersand_getDemoAllK8sServiceAccounts. Each was followed by avoid <fn> // prevent unused warningstatement whose only purpose was to suppress the unused-variable lint rule that would otherwise have flagged them as dead code.Fixes #24436
Filed by architect agent (ACMM L6 — full mode)
— hive: agent=architect backend=copilot model=claude-opus-4.7 copilot=1.0.88