Skip to content

feat(servers): allow custom display names for NNTP providers#239

Merged
javi11 merged 1 commit into
mainfrom
session/hopeful-curran-c1c262
Jul 4, 2026
Merged

feat(servers): allow custom display names for NNTP providers#239
javi11 merged 1 commit into
mainfrom
session/hopeful-curran-c1c262

Conversation

@javi11

@javi11 javi11 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds an optional Name field 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.
  • Verified against the current nntppool library (pinned v4.11.1, checked up through the latest v4.13.0/main): it has no Name field on Provider and only auto-derives an internal name from host+username for 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.
  • Falls back to the existing "Provider N"/host-based display exactly as before when no name is set, so existing configs are unaffected.

Closes #220

Changes

  • Backend: ServerConfig.Name (internal/config/config.go), ServerData.Name (internal/backend/app.go), NntpProviderMetrics.Name; wired through SetupWizardComplete and GetNntpPoolMetrics's host→config lookup.
  • Frontend: new "Name" input + header fallback in NntpServerManager.svelte (shared by setup wizard and settings); Wails bindings (models.ts); dashboard/metrics display now shows provider.name || provider.host; translations added for en/es/fr/tr.
  • Bug fix found during testing: ServerSection.svelte (Settings page) and ServerSetupStep.svelte (setup wizard) both rebuild server objects through explicit field whitelists that silently dropped any field not listed. Added name to each of these whitelists — otherwise a typed name would render once but be stripped on the next save.
  • Minor docs touch: config-example.yaml, docs/docs/configuration.md.

Test plan

  • go build ./internal/... and go vet ./internal/...
  • go test ./internal/config/... (existing suite, no regressions)
  • bun run check (svelte-check) — 0 errors/warnings
  • Manually verified end-to-end in a sandboxed environment (isolated $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 /metrics page's provider table in place of the raw host.
  • Manual smoke test in the packaged Wails desktop app (not run in this environment)

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
@javi11 javi11 merged commit 3e3d949 into main Jul 4, 2026
3 checks passed
@javi11 javi11 deleted the session/hopeful-curran-c1c262 branch July 4, 2026 13:44
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.

[Feature Request] Rename providers

1 participant