fix: drop redundant tag-row text from /memory dashboard#352
Conversation
The dashboard rendered each tag's count in two places: the text bar-chart block and the inline buttons immediately below. Operator feedback on real data (#351) confirmed the bars duplicated what the buttons telegraph through the parenthesized counts on each label, doubling the dashboard height for no information gain. Drop the per-tag text rows. Keep the summary header, the confidence footer, and the inline keyboard exactly as before. The dashboard text now stops at the summary + footer, with all per-tag data delegated to the buttons (which is the intended tap target anyway). Cleanup follows: _bar(), _BAR_CHAR, and _BAR_WIDTH are removed since nothing else uses them. _build_stats() has its own per-tag rendering that does not call _bar(), so the stats screen is unchanged. Tests for the bar function are removed; the dashboard test is reworked to assert that tag counts live on the buttons (not in the text) and that the bar character is gone, guarding the regression. This intentionally diverges from spec 310 §6.1's bar-chart mock-up. All other §6.1 elements (summary header, confidence footer, dashboard / stats asymmetry around zero-count tags) are preserved.
Review by KaiThe PR looks clean. Here is what I checked: Logic (no issues) The removal of The blank line between summary and footer is preserved: the Security (no issues) Purely a UI text change. No user input processing, auth, or data exposure changes. Tests (well-done) The comment in the updated test explaining why the assertion uses Style (no issues) The in-code comment block explaining the spec drift from §6.1 is long but justified - intentional spec divergence with a documented rationale is exactly the scenario that warrants the explanation. One minor note (suggestion) The comment added to No blockers. Approve. |
Closes #351.
Summary
The
/memorydashboard renders each tag's count in two places: a text bar-chart block and the inline keyboard buttons below. The text rows duplicate what the buttons already show, so the dashboard is roughly twice as tall as needed. Operator feedback on real data confirmed the bars added no value the button labels weren't already carrying through their(N)suffixes.Changes
src/kai/memory_command.py:_build_dashboardno longer emits the per-tag rows. The text now stops at the summary header (Memories: N facts across M tags.) and the confidence footer (Tap a tag to browse. Confidence: median X, min Y.)._bar,_BAR_CHAR,_BAR_WIDTHremoved - unused after the rows are gone._build_statsis unchanged; it has its own per-tag rendering that never called_bar.tests/test_memory_command.py:TestBar(3 tests) deleted along with_bar.test_renders_summary_and_tagsreworked: asserts the bar character (▓) is gone, the per-tag row prefixes are gone, and the buttons carry the counts in descending order (preference (5),fact (3),decision (2)).Net diff: +23 / -56 (-33 lines).
Before / after
Before:
After:
Spec drift
This intentionally diverges from spec 310 §6.1's bar-chart mock-up. All other §6.1 elements (summary header, confidence footer, asymmetry between dashboard and stats around zero-count tags) are preserved. Issue #351 documents the rationale.
Test plan
make checkpasses (ruff check + ruff format).pytest tests/test_memory_command.py- 83 passed./memoryand confirm the dashboard renders without the per-tag rows but with summary + footer + tag buttons + Search/Stats./memory statsstill renders its full per-tag table (not affected by this change).Related