Repository navigation
fix(offering): preserve isHidden state during headless offering update - #109
Open
shriyashsoni wants to merge 1 commit into
Open
shriyashsoni wants to merge 1 commit into
shriyashsoni wants to merge 1 commit into
Conversation
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 #78. Prevents
acp offering updatefrom unintentionally resettingisHiddentofalsewhen updating an offering non-interactively via flags.🔍 Problem & Root Cause
When executing an update command in headless / non-interactive mode:
opts.hiddenisundefined.updateswithout anisHiddenkey.PUT /agents/:agentId/offerings/:offeringIdrequest is sent with the partial payload.PUTsemantics, omitted boolean fields default tofalseon the server.🛠️ Solution
--offering-id), explicitly carry overselected.isHiddeninto the update body when neither--hiddennor--no-hiddenis supplied.🧪 Verification
isHidden: truevalue when--hiddenflag is omitted.--no-hiddencorrectly unhides as expected (isHidden: false).rlprompt) retains Enter-to-keep behavior.npm run typecheck(tsc --noEmit)npm run buildNote
Low Risk
Small CLI fix that preserves existing visibility on partial updates; reduces accidental public exposure rather than changing auth or core API behavior.
Overview
Fixes headless
acp offering update(with--offering-id) unintentionally clearing hidden visibility when--hidden/--no-hiddenare omitted.When
opts.hiddenis unset and the command runs non-interactively, the update payload now setsisHiddento the offering’s current value (selected.isHidden) instead of leaving the field out. That avoids server-side PUT behavior that treated a missing boolean asfalseand could expose previously hidden offerings during scripted edits.Interactive updates are unchanged: users still only change hidden status when they answer the prompt with
yorn.Reviewed by Cursor Bugbot for commit 7f8dd64. Bugbot is set up for automated code reviews on this repo. Configure here.