Skip to content

fix(cli): include room description in debug config output#375

Merged
sanity merged 1 commit into
mainfrom
fix/debug-config-show-description
Jun 30, 2026
Merged

fix(cli): include room description in debug config output#375
sanity merged 1 commit into
mainfrom
fix/debug-config-show-description

Conversation

@sanity

@sanity sanity commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem

riverctl debug config <OWNER> — the command literally named "Show room configuration" — printed the room name and every limit but silently dropped the description. The only way to see a room's description from the CLI was riverctl room config <OWNER> with no flags, which is non-obvious. Ian hit this gap while fixing the Freenet Official room's description (a broken Dashboard link in the room header).

Approach

Add description: Option<String> to the RoomConfig view and print it in both the human and JSON branches of debug config ("(none)" / null when unset).

The construction is extracted into a small testable RoomConfig::from_configuration constructor (previously an inline struct literal in the handler). The description is rendered lossily and not unsealed for private rooms — this matches the existing no-flags room config display and keeps debug config a pure read-only view.

Scope kept deliberately narrow: only debug config is touched. debug room-state remains a counts summary.

Testing

  • room_config_includes_description — pins that a set description survives both the struct and the JSON projection.
  • room_config_description_none_when_unset — pins that an unset description serializes as null (and renders "(none)" via unwrap_or).
  • cargo test -p riverctl --lib debug:: green (4 passed).
  • cargo clippy -p riverctl clean.
  • Verified end-to-end against a live node: both debug config and debug config -f json now show the description.

[AI-assisted - Claude]

`riverctl debug config` (the command literally named "Show room
configuration") printed the room name and every limit but silently
dropped the description. The only way to see a room's description from
the CLI was `riverctl room config <OWNER>` with no flags, which is
non-obvious. Ian noticed the gap while fixing the Freenet Official room
description.

Add `description: Option<String>` to the `RoomConfig` view, populated via
a new testable `RoomConfig::from_configuration` constructor, and print it
in both the human and JSON branches ("(none)" / `null` when unset). The
description is rendered lossily and not unsealed for private rooms,
matching the existing no-flags `room config` display.

Regression tests pin that the description survives both the struct and
the JSON projection, and that an unset description serializes as null.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmZ2TuM1ofhLTndJ1AUnMH
@sanity sanity force-pushed the fix/debug-config-show-description branch from 518097c to 6e443e9 Compare June 30, 2026 17:16
@sanity sanity merged commit 27038ea into main Jun 30, 2026
5 checks 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.

1 participant