Skip to content

Commit 8e404b0

Browse files
Add loading to init
1 parent 9580b4d commit 8e404b0

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
echo "Extracting changelog for version $VERSION"
6363
6464
# Extract the changelog section for this version
65-
awk -v ver="## [$VERSION]" '
65+
awk -v ver="## \\[$VERSION\\]" '
6666
BEGIN { found=0 }
6767
$0 ~ ver { found=1; next }
6868
found && /^## \[/ { exit }

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.0.17] - 2025-06-23
4+
5+
### Added
6+
- Loading screen that displays immediately on startup to eliminate "black screen" experience
7+
- Visual feedback with header and "Fetching Claude usage data..." message during initial data load
8+
39
## [1.0.16] - 2025-06-23
410

511
### Fixed
@@ -68,6 +74,7 @@
6874
- Proper Ctrl+C handling with cursor restoration
6975
- Terminal settings restoration on exit
7076

77+
[1.0.17]: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases/tag/v1.0.17
7178
[1.0.16]: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases/tag/v1.0.16
7279
[1.0.11]: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases/tag/v1.0.11
7380
[1.0.8]: https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases/tag/v1.0.8

claude_monitor.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,27 @@ def print_header():
128128
]
129129

130130

131+
def show_loading_screen():
132+
"""Display a loading screen while fetching data."""
133+
cyan = "\033[96m"
134+
yellow = "\033[93m"
135+
gray = "\033[90m"
136+
reset = "\033[0m"
137+
138+
screen_buffer = []
139+
screen_buffer.append("\033[H") # Home position
140+
screen_buffer.extend(print_header())
141+
screen_buffer.append("")
142+
screen_buffer.append(f"{cyan}⏳ Loading...{reset}")
143+
screen_buffer.append("")
144+
screen_buffer.append(f"{yellow}Fetching Claude usage data...{reset}")
145+
screen_buffer.append("")
146+
screen_buffer.append(f"{gray}This may take a few seconds{reset}")
147+
148+
# Clear screen and print buffer
149+
print("\033[2J" + "\n".join(screen_buffer) + "\033[J", end="", flush=True)
150+
151+
131152
def get_velocity_indicator(burn_rate):
132153
"""Get velocity emoji based on burn rate."""
133154
if burn_rate < 50:
@@ -443,6 +464,9 @@ def main():
443464
# Enter alternate screen buffer, clear and hide cursor
444465
print("\033[?1049h\033[2J\033[H\033[?25l", end="", flush=True)
445466

467+
# Show loading screen immediately
468+
show_loading_screen()
469+
446470
while True:
447471
# Flush any pending input to prevent display corruption
448472
flush_input()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "claude-monitor"
7-
version = "1.0.16"
7+
version = "1.0.17"
88
description = "A real-time terminal monitoring tool for Claude AI token usage"
99
readme = "README.md"
1010
license = {text = "MIT"}

0 commit comments

Comments
 (0)