fix(kudos): parse the real wall-of-fame payload and render the leaderboard - #71
Merged
Merged
Conversation
…board
## Summary
`kudos wall-of-fame` showed "Top receiver —" / "Top giver —" and a
meaningless "Leaderboard entries 4" because the renderer misread the
API payload on three counts.
## Change Log
- top_receiver / top_giver: read the name from the nested user.full_name
(the old code looked for a top-level full_name that never exists)
- leaderboard: unwrap the { count, next, previous, results } envelope
(the old code did len() on the dict, counting its 4 keys)
- leaderboard_summary: surface it as "Your position: N of M" instead of
overwriting it with a local count
- Render the ranked leaderboard table and the company-values (kudos DNA)
distribution, both previously dropped on the floor
- Move all rendering into display.py::print_kudos_wall_of_fame (rule 9);
the command callback now only dispatches JSON vs. human output
- Rewrite the wall-of-fame test fixture to mirror the real payload shape
(the old fixture was flat, which is why the bug shipped) + 2 new tests
- Document the response shape in docs/API_REFERENCE.md
## Risks
- None for --json users: the payload passthrough is unchanged
- Human output changes shape (panel + 2 tables instead of a 3-row panel),
which is the point of the fix
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
xergioalex
added a commit
to DailybotHQ/agent-skill
that referenced
this pull request
Jul 14, 2026
…f-fame version note The wall-of-fame rendering fix (DailybotHQ/cli#71) is now published as v3.7.2 on PyPI, so the version note links to the concrete release instead of describing the behavior as a bare version floor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
dailybot kudos wall-of-famerendered an almost-empty panel —Top receiver —,Top giver —, and a meaninglessLeaderboard entries 4— even though the API returns full data. Found during a live end-to-end audit of the read surface.Before:
After: the panel shows top receiver/giver with their counts and the caller's ranking, followed by the company-values (kudos DNA) distribution and the full ranked leaderboard table with a
Showing X of Nfooter.Root cause
The renderer misread the
GET /v1/kudos/wall-of-fame/payload on three counts:top_receiver.user.full_name; the code readtop_receiver.full_name→ alwaysNone→—.{ count, next, previous, results }; the code didlen()on that dict, so "4" was literally the number of keys in the envelope — and the actual entries were never rendered.leaderboard_summaryis the caller's own standing ({ position, total }); the code overwrote that concept with its local count.The test fixture used a flat/invented payload shape, which is why the bug shipped green — the fixture is now a mirror of the real response.
Changes
display.py::print_kudos_wall_of_fameowns all rendering (rule 9); the command callback now only dispatches JSON vs. human output.full_namefallback).--jsonpassthrough unchanged.docs/API_REFERENCE.md: documents the real response shape (both the command section and the endpoint table row, which previously described the response as a plain list envelope).--jsonpassthrough (tests/kudos_read_commands_test.py), full suite at 1037 passed.Verification
Ran against the live API (org Dailybot): panel, DNA table, and 11-entry leaderboard all render correctly;
--jsonoutput unchanged.Out of scope (observed while testing)
?limit=is sent by the client but the server returns the full leaderboard regardless — API-side, tracked separately.Risks
None for
--jsonconsumers. Human output intentionally changes shape (that's the fix).🤖 Generated with Claude Code