Skip to content

feat(web): add config settings with save and restart#182

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

feat(web): add config settings with save and restart#182
RussellLuo merged 2 commits into
OpenCSGs:mainfrom
wanghaojie124:dev

Conversation

@wanghaojie124

Copy link
Copy Markdown
Collaborator
  • Expose common config.toml fields in the Web UI settings modal, add structured config API endpoints with bootstrap validation before save, and restart the daemon or prompt for manual restart after saving.

@RussellLuo

RussellLuo commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

I think the API shape here would be clearer if we group these endpoints under server and keep the responsibilities explicit.

A cleaner split would be:

  • GET /api/v1/server/config
  • PUT /api/v1/server/config
  • POST /api/v1/server/restart
  • GET /api/v1/server/restart/status

The reason is that PUT /server/config is about persisting configuration, while restart is a separate lifecycle action on the running service. Keeping restart outside the config resource makes that boundary easier to understand.

Also, I think the current apply naming is a bit misleading. In the current flow, PUT already saves the config, and the extra step is really restarting the service so the saved config takes effect. Naming that operation as restart would match the actual behavior more closely.

So if the goal is a complete and consistent server-facing API surface for this feature, server/config + server/restart + server/restart/status seems like the cleanest option.

wanghj added 2 commits June 8, 2026 21:59
Expose common config.toml fields in the Web UI settings modal, add
structured config API endpoints with bootstrap validation before save,
and restart the daemon or prompt for manual restart after saving.
Replace /config/settings, /config/apply, and /config/restart/status with
/server/config, /server/restart, and /server/restart/status. Remove the
raw config file API and align frontend handlers with the new routes.
Bump embedded picoclaw image tag to 2026.6.8.
@RussellLuo RussellLuo merged commit caa3994 into OpenCSGs:main Jun 9, 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