diff --git a/.Jules/palette.md b/.Jules/palette.md index 05d4366..0c7c249 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -33,3 +33,7 @@ ## 2024-04-24 - Avoiding Trailing Artifacts in CLI Applications **Learning:** When dynamically updating terminal lines using carriage return (`\r`), relying on hardcoded padding spaces to overwrite old text is brittle and leads to trailing text artifacts when new lines are shorter than previous ones. **Action:** Always use the ANSI escape sequence `\033[K` (Erase in Line) immediately after the carriage return (`\r`) to cleanly clear the line before writing new content, rather than manually managing padding spaces. + +## 2026-08-20 - Encouraging Empty States in CLI +**Learning:** Hiding UI elements when data is empty leaves users guessing about system state, especially first-time users. Explicit, encouraging empty states clarify what goes there and improve onboarding. +**Action:** Always provide explicit, encouraging empty states for data or achievements rather than hiding the UI element when empty. diff --git a/src/main.cpp b/src/main.cpp index b9144b7..926a59f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,6 +80,8 @@ int main() { if (highscore > 0) { std::cout << " Personal Best: " << CLR_SCORE << formatWithCommas(highscore) << CLR_RESET << "\n\n"; + } else { + std::cout << " Personal Best: " << CLR_SCORE << "None yet! Time to set a record!" << CLR_RESET << "\n\n"; } std::cout << "Controls:\n " << CLR_CTRL << "[h]" << CLR_RESET << " Toggle Hard Mode (10x Speed!)\n "