feat(servers): allow custom display names for NNTP providers#239
Merged
Conversation
Adds an optional Name field to server configs so users can label providers (e.g. "Astraweb Primary") instead of seeing the auto-numbered "Provider 1, 2, 3..." in the setup wizard, settings page, and the dashboard/metrics provider list. The name is purely a Postie-side config/UI concern — nntppool has no such field, so it's never sent to the connection pool. Closes #220
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
Namefield to server/provider configuration so users can label each NNTP provider (e.g. "Astraweb Primary") instead of the auto-numbered "Provider 1, 2, 3..." shown in the setup wizard, settings page, and dashboard/metrics.nntppoollibrary (pinned v4.11.1, checked up through the latest v4.13.0/main): it has noNamefield onProviderand only auto-derives an internal name fromhost+usernamefor its own logs/stats. This is therefore a Postie-side config/UI feature only — no dependency bump, and the custom name is never sent to the connection pool.Closes #220
Changes
ServerConfig.Name(internal/config/config.go),ServerData.Name(internal/backend/app.go),NntpProviderMetrics.Name; wired throughSetupWizardCompleteandGetNntpPoolMetrics's host→config lookup.NntpServerManager.svelte(shared by setup wizard and settings); Wails bindings (models.ts); dashboard/metrics display now showsprovider.name || provider.host; translations added for en/es/fr/tr.ServerSection.svelte(Settings page) andServerSetupStep.svelte(setup wizard) both rebuild server objects through explicit field whitelists that silently dropped any field not listed. Addednameto each of these whitelists — otherwise a typed name would render once but be stripped on the next save.config-example.yaml,docs/docs/configuration.md.Test plan
go build ./internal/...andgo vet ./internal/...go test ./internal/config/...(existing suite, no regressions)bun run check(svelte-check) — 0 errors/warnings$HOME, real Go web server + Vite dev): typed a name in the setup wizard with live header update, confirmed round-trip through YAML → JSON config API, persisted through a Settings-page save, and confirmed it renders on the/metricspage's provider table in place of the raw host.