fix: actionable diagnostics for empty feed/inbox results#5
Merged
1a35e1 merged 1 commit into1a35e1:mainfrom Feb 23, 2026
Merged
Conversation
The root problem: 'No tweets found in this window.' and 'Inbox is empty.'
give no guidance on why the result is empty or what to do next. For agents
consuming --json output there is also no signal that the empty result might
indicate a configuration or data-pipeline problem vs. a genuine quiet period.
Changes:
src/commands/feed.tsx
- Terminal (non-json) empty state now renders a yellow header + numbered
checklist tailored to the --kind flag:
bookmarks → remind to run 'sonar ingest bookmarks'
default / followers / following → widen window, check interests,
trigger ingest, run matching, check account
- JSON mode: when result is empty, a structured diagnostic is written to
stderr (stdout still receives the valid empty JSON array []). This lets
piped agents distinguish an empty result from an error while still
giving a human operator reading stderr actionable next steps.
src/commands/inbox/index.tsx
- Terminal empty state renders a yellow header + numbered checklist that
adapts to the active --status filter:
• If a specific status is set, first step is 'try --all'
• Then: check interests, ingest, match, monitor, account
- JSON mode: same stderr-diagnostic pattern as feed — empty array on
stdout, structured hint on stderr with status label, causes, and
remediation commands.
1a35e1
approved these changes
Feb 23, 2026
Contributor
Author
|
@1a35e1 PR is approved and ready to merge. |
1a35e1
approved these changes
Feb 23, 2026
Merged
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.
Bug
When
sonar feedorsonar inboxreturns zero results, the CLI outputs a single dim line:Neither message explains why the result is empty or what the operator should do next. Common root causes include: no interests configured, ingest hasn't run, time window too narrow, all inbox items already actioned, or an auth/quota issue — none of which are surfaced.
For agents consuming
--jsonoutput the situation is worse: an empty array[]on stdout is indistinguishable from a genuinely quiet period versus a broken data pipeline.Fix
Terminal (non-JSON) path
sonar feed— context-aware numbered checklist tailored to--kind:bookmarkskind → directs tosonar ingest bookmarks+ monitorsonar inbox— adapts to the active--statusfilter:sonar inbox --all(maybe items exist under a different status)Both render with a yellow header so empty is visually distinct from a normal (populated) result.
JSON path
When result is empty in
--jsonmode, a structured diagnostic is written to stderr (stdout still receives the valid empty JSON array[]). This means:0— empty is not an errorExample output (terminal)
Example output (JSON stderr)