Repository navigation
fix(config): persist dev server configuration - #1029
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
pcbeingused333
requested review from
tiffanylphan
and removed request for
a team
November 16, 2026 18:54
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.
The
config --setcommand reports success forport,cors-enabled,cors-origin, andsync-once, but discards their values.The configuration structure omits these fields, and its update method does not assign them.
This also removes manually saved values when another configuration field changes.
Add the missing fields and update cases. Use boolean pointers to preserve an explicit
false, as the existing boolean fields do.Keep the port as a string to match the dev server flag.
Reject invalid boolean values with the same errors as the existing boolean configuration fields.
Testing and validation
go test ./internal/config ./cmd/configRegression tests cover both boolean values, YAML and JSON output, reloads, and updates to another configuration field.
They also cover invalid boolean values. The new tests fail before the fix.
This change was prepared with AI assistance.
Note
Overview
Fixes
config --setso dev server options (port,cors-enabled,cors-origin,sync-once) are actually stored onConfigand survive YAML/JSON marshal, reload, and updates to other keys—previously these keys validated as valid but had no struct fields orUpdatecases, so values were dropped.Adds the four fields (booleans as
*boolso explicitfalseis preserved;portas string) with the same boolean parsing and error messages as existing config flags. New tests cover round-trips fortrue/false, YAML and JSON output, reload, and invalid boolean rejection.Reviewed by Cursor Bugbot for commit 46f04aa. Bugbot is set up for automated code reviews on this repo. Configure here.