Skip to content

feat(now): add --hours option and name the window in the empty state - #27

Open
KunnnnnQ wants to merge 1 commit into
bee-computer:mainfrom
KunnnnnQ:feat/now-hours-window
Open

KunnnnnQ wants to merge 1 commit into
bee-computer:mainfrom
KunnnnnQ:feat/now-hours-window

Conversation

@KunnnnnQ

Copy link
Copy Markdown

Problem

bee now always looks back a fixed 10 hours. When nothing is found it prints - (none) without saying which window was searched, so "no recent recordings" looks the same as "the recording is older than the window". I hit this while building a tool on top of the CLI for the Amazon Developer Hackathon (Bee track).

Change

  • bee now --hours N (1–168, default 10) changes the look-back window; works with --json.
  • Empty state now reads - (none in the last N hours) (1 hour singular).
  • Invalid values reuse parsePositiveInt (--hours requires a value, --hours must be an integer between 1 and 168); unknown arguments are still rejected.
  • README line for now updated.
  • New sources/commands/now/index.test.ts (local Bun.serve upstream through the proxy client, same pattern as the status command test): empty state, narrowing/widening the window, --json window size, invalid values.

Default behaviour without --hours is unchanged apart from the empty-state text.

Testing

  • bun run typecheck passes
  • bun test: 380 pass, 1 fail — the failing test is photos command (registry-derived) > get --output writes the image and prints the released summary, which also fails on main without this change (run on Windows 11, Bun 1.4.3)
  • bun run build, then bee now --hours 1 against my account returns the expected recent conversations

🤖 Generated with Claude Code

`bee now` always looked back a fixed 10 hours, and when nothing was found
it printed "- (none)" without saying which window was searched. That made
it hard to tell "no recent recordings" apart from "recording outside the
window".

- add `--hours N` (1-168, default 10) to change the window
- empty state now reads "- (none in the last N hours)"
- reject unknown arguments as before
- add tests for the window, the empty state, --json and invalid values

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant