refactor: rename stopOrDelete parameter for better readability#5692
refactor: rename stopOrDelete parameter for better readability#5692shubhtrek wants to merge 1 commit into
Conversation
|
|
|
Welcome @shubhtrek! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shubhtrek 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 |
There was a problem hiding this comment.
Pull request overview
This PR improves readability around the frontend port-forward stop/delete API by renaming the local boolean parameter from stopOrDelete to justStop while preserving the backend request payload.
Changes:
- Renamed the
stopOrDeletePortForwardparameter tojustStop. - Updated JSDoc and call-site inline parameter comments.
- Kept the serialized API field as
stopOrDelete, matching the backend contract.
CI status and PR commit history were not available in this review context; please confirm checks are passing and the PR history is linear.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
frontend/src/lib/k8s/api/v1/portForward.ts |
Renames the function parameter and updates documentation while keeping the request body compatible. |
frontend/src/components/portforward/index.tsx |
Adds inline comments at stop/delete call sites to clarify the boolean argument. |
frontend/src/components/common/Resource/PortForward.tsx |
Adds inline comments at resource-level stop/delete call sites to clarify the boolean argument. |
illume
left a comment
There was a problem hiding this comment.
Thanks for this.
How about adding a "stop" and a "remove" parameter? Combining the two things is quite confusing.
Probably the name change should be passed all the way through to the backend service.
This PR improves readability in the port forwarding API by renaming the confusing stopOrDelete parameter to justStop.
Changes Made
Renamed stopOrDelete → justStop
Updated all related call sites and references
Kept existing functionality unchanged
Testing
Verified the project builds successfully
Confirmed port forwarding behavior works as expected
#5691