ReadEnvGroups returned a nil slice (out := groups[:0]) whenever no group ended up with fields, which marshals to JSON null instead of []. The admin UI's EnvSection calls groups.reduce()/iterates unconditionally, so that null crashed the Server Settings page. Also switch the source of the panel structure from .env.example to .env once .env exists, falling back to .env.example only pre-setup: .env already carries the same group headers and comments after any save (WriteEnvValues always rewrites it from .env.example's exact text), so it's the more current source of what's actually configured. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| web | ||
| addserverlink.go | ||
| adminauth.go | ||
| adminauth_test.go | ||
| adminusers.go | ||
| adminusers_api.go | ||
| adminusers_guard_integration_test.go | ||
| botverification.go | ||
| botverification_test.go | ||
| buildinfo.go | ||
| filter_bots_test.go | ||
| main.go | ||
| publicbranding.go | ||
| readstore.go | ||
| readstore_accounts_integration_test.go | ||
| readstore_botverification_integration_test.go | ||
| readstore_shared_devices_integration_test.go | ||
| readstore_verification_integration_test.go | ||
| routescope_test.go | ||
| security.go | ||
| server.go | ||
| serversettings.go | ||
| serversettings_test.go | ||
| session.go | ||
| session_test.go | ||
| verification.go | ||
| verification_test.go | ||