-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
good first issueGood for newcomersGood for newcomersrefactorCode improvement without new featuresCode improvement without new features
Description
Summary
The tail command can be consolidated into peek --follow by adding a single missing feature: --interval. This would simplify the codebase and provide a more consistent API.
Current State
| Feature | tail |
peek --follow |
|---|---|---|
| Live updates | ✅ | ✅ |
| Custom interval | ✅ --interval <ms> |
❌ Hardcoded 1000ms |
| Network filter | ✅ --network |
✅ --network |
| Console filter | ✅ --console |
✅ --console |
| DOM filter | ❌ | ✅ --dom |
| Type filter | ❌ | ✅ --type |
Key difference: tail allows --interval 100 to --interval 60000 for custom update frequency.
Proposed Changes
Phase 1: Add --interval to peek --follow
// In peek.ts
.option('--interval <ms>', 'Update interval in milliseconds (only with --follow)', '1000')Validation: 100ms min, 60000ms max (same as tail)
Phase 2: Deprecate tail with warning
$ bdg tail
⚠️ Deprecation: "bdg tail" is deprecated. Use "bdg peek --follow" instead.
# Continue working normallyPhase 3: Remove tail (next major version)
Remove tail.ts entirely. Users have had warning period.
Benefits
- Simpler codebase - Remove ~130 lines of duplicate logic in
tail.ts - Consistent patterns -
peekusesrunCommand,taildoesn't - Better discoverability - One command with options vs two similar commands
- Feature parity -
peek --followgains--interval, users get--domand--typefilters they didn't have withtail
Migration Path
# Before
bdg tail --interval 500 --network
# After
bdg peek --follow --interval 500 --networkChecklist
- Add
--interval <ms>option topeekcommand (only active with--follow) - Update
setupFollowModeto accept interval parameter - Add deprecation warning to
tailcommand - Update documentation (CLI_REFERENCE.md, CLAUDE.md)
- Update task mappings to point to
peek --follow - Remove
tailin next major version
Labels
refactorenhancementgood first issue(Phase 1 only)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersrefactorCode improvement without new featuresCode improvement without new features