Skip to content

fix(config): migrate legacy official hub URL#250

Merged
RussellLuo merged 2 commits into
OpenCSGs:mainfrom
wanghaojie124:dev
Jun 26, 2026
Merged

fix(config): migrate legacy official hub URL#250
RussellLuo merged 2 commits into
OpenCSGs:mainfrom
wanghaojie124:dev

Conversation

@wanghaojie124

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread internal/config/config.go
@@ -132,10 +132,18 @@ func normalizeHubRegistry(registry HubRegistryConfig) HubRegistryConfig {
registry.Kind = strings.TrimSpace(registry.Kind)
registry.Path = strings.TrimSpace(registry.Path)
registry.URL = strings.TrimSpace(strings.TrimRight(registry.URL, "/"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now rewrites every kind = "remote" registry to DefaultOfficialHubRegistryURL, not just the legacy official endpoint. That means custom remotes like the existing team registry and ${HUB_URL}-backed configs get overwritten on load/save, and csgclaw serve will persist that change because NeedsMigrationRewrite() becomes true. Please scope the migration to the official registry or the legacy official URL only, and keep arbitrary remote registries intact.

@RussellLuo RussellLuo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One follow-up: config.toml already supports the local hub path and remote hub url, but those fields are still not exposed in the UI settings. It would be better to show and allow editing them there as well, so the UI stays aligned with the actual config surface instead of leaving part of the hub setup as file-only configuration.

@RussellLuo RussellLuo merged commit 0ee5585 into OpenCSGs:main Jun 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants