Skip to content

Add WorthlessCounter display to webapp template - #119

Merged
littlebee merged 2 commits into
mainfrom
bee/claude-worthless_counter
Sep 29, 2025
Merged

Add WorthlessCounter display to webapp template#119
littlebee merged 2 commits into
mainfrom
bee/claude-worthless_counter

Conversation

@littlebee

Copy link
Copy Markdown
Owner

Summary

  • Adds real-time display of worthless_counter state in the main content area of webapp template created by bb_create
  • Implements smooth fade-in animation using pure CSS keyframes
  • Includes test coverage for state updates

Changes

  • Added worthless_counter to IHubState interface
  • Created WorthlessCounter component with CSS animation
  • Updated App.tsx to display counter in content area
  • Added integration test for counter state updates
  • Fixed hub_stats to be optional in IHubState
  • Sped up my_service counter interval for better demo (0.01s vs 1s)

Test plan

  • Created project with bb_create test_project
  • Started services with bb_start
  • Started dev server with npm run dev
  • Verified counter displays and updates in real-time with fade animation
  • Verified test passes

Closes #43

🤖 Generated with Claude Code

littlebee and others added 2 commits September 29, 2025 11:08
Resolves #43 by displaying the worthless_counter state value in real-time
in the main content area of the webapp created by bb_create.

Changes:
- Add worthless_counter to IHubState interface
- Create WorthlessCounter component with fade animation
- Update App.tsx to render WorthlessCounter in content area
- Add test for worthless_counter state updates
- Fix hub_stats to be optional in IHubState

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace JavaScript state management with CSS keyframes animation.
Uses React key prop to trigger animation on value changes.
Also speed up my_service counter for better demo (0.01s vs 1s).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@littlebee

Copy link
Copy Markdown
Owner Author

fixes #43

@littlebee

Copy link
Copy Markdown
Owner Author

claude-conv-bb_PR119.txt

hub_monitor.connected_socket, {"worthless_counter": i}
)
await asyncio.sleep(1)
await asyncio.sleep(0.01)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this to demonstrate the low latency of central-hub

hubConnStatus?: string;
// the keys below are shared from central hub. See hub_state.py
hub_stats: {
hub_stats?: {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was an existing error that I noticed and fixed

@littlebee
littlebee merged commit 6de7441 into main Sep 29, 2025
1 check passed
@littlebee
littlebee deleted the bee/claude-worthless_counter branch September 29, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add worthless_counter to display in the main UI display area

1 participant