Skip to content

Suppress the empty User setup wizard header when nothing to do#722

Merged
dcellison merged 2 commits into
mainfrom
fix/wizard-empty-user-setup-header
Jun 22, 2026
Merged

Suppress the empty User setup wizard header when nothing to do#722
dcellison merged 2 commits into
mainfrom
fix/wizard-empty-user-setup-header

Conversation

@dcellison

@dcellison dcellison commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to the wizard reminder cleanup (#721). Removing the users.yaml already configured / edit it directly... reminder left the user-setup section printing noise on a re-run when the canonical users.yaml already exists. This makes the whole section stay silent when there is nothing to do.

Two parts:

  1. Empty header: the -- User setup -- header was still printed unconditionally, so it showed with no content under it.
  2. Orphaned blank line: the trailing print() separator after the section still fired, leaving a blank line between the Telegram bot token and Telegram transport prompts.

Both are now gated on the same "is there anything to show" condition. The section emits output only when:

  • First-time install (no canonical users.yaml yet): header + admin prompts + trailing separator, as before.
  • A stray PROJECT_ROOT/users.yaml leftover: header + the "no longer used, move/remove it" note.
  • Canonical file already present, no stray (the common re-run case): completely silent. No header, no blank line.

The stray-leftover warning is preserved in both the first-time and existing-config paths.

Tests

make check clean; full suite passes (4600 passed, 1 skipped). The existing-users wizard test asserts -- User setup -- is absent when the canonical file exists; the header and the separator share one condition, so that assertion locks in both.

Removing the existing-config reminder left a bare '-- User setup --' header printing with no content when the canonical users.yaml already exists. Gate the header (and the stray-leftover note) so the section emits output only on a first-time install or when a stray PROJECT_ROOT/users.yaml needs a warning; otherwise it stays silent.
When the canonical users.yaml exists, the user-setup section prints nothing, but the trailing print() separator still fired, leaving a blank line between the bot-token and transport prompts. Gate that separator on the same condition as the section header so it only appears when the section actually printed something.
@dcellison dcellison merged commit 663bf01 into main Jun 22, 2026
1 check passed
@dcellison dcellison deleted the fix/wizard-empty-user-setup-header branch June 22, 2026 23:53
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