Skip to content

Add --limit flag to timeline command#318

Merged
jeremy merged 3 commits intomainfrom
bc-9679133913
Mar 16, 2026
Merged

Add --limit flag to timeline command#318
jeremy merged 3 commits intomainfrom
bc-9679133913

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 16, 2026

Summary

  • Add --limit, --all, and --page flags to the timeline command, matching the pagination pattern established by recordings, todos, events, etc.
  • --all and --page are rejected under --watch (continuous polling makes them nonsensical; --limit is allowed to cap each poll cycle)
  • Add truncation notices on all three list paths (account-wide, project, person)
  • Update .surface, .surface-skill-drift, and SKILL.md to reflect the new flags

Test plan

  • make check passes (lint, vet, unit tests, e2e, surface snapshot, skill drift, bare groups, naming, SDK provenance)
  • basecamp timeline --all --limit 5 returns mutual exclusion error
  • basecamp timeline --watch --all returns "cannot be used with --watch"
  • basecamp timeline --watch --page 1 returns "cannot be used with --watch"
  • Skill drift check passes with --limit baseline removed (5 baselined, down from 6)

Summary by cubic

Add --limit, --all, and --page to the basecamp timeline command to match pagination used by other list commands, with truncation notices and clear guardrails. Also fix watch-mode flag handling so invalid combos return the correct --watch error.

  • New Features

    • --limit N caps results (default: 100). --all fetches everything. --page 1 fetches a single page.
    • Validation: --all and --limit are mutually exclusive; --page cannot be combined with --all or --limit (only --page 1 is supported).
    • --watch rejects --all and --page; --limit is allowed per poll cycle.
    • Truncation notices added for account, project, and person timelines.
    • Updated .surface and skills/basecamp/SKILL.md with new flags and guidance.
  • Bug Fixes

    • In --watch mode, --all/--page now error with "cannot be used with --watch" (e.g., --watch --page 2), instead of page-validation messages.

Written for commit a1cf099. Summary will update on new commits.

jeremy added 2 commits March 15, 2026 18:53
Match the pagination pattern used by recordings, todos, events, etc.
The flags thread through to both normal and watch modes, with --all
and --page rejected under --watch since continuous polling makes them
nonsensical. Truncation notices surface when results are capped.
Regenerate .surface with new --all/--limit/--page flags, remove the
--limit baseline from .surface-skill-drift, and replace the "not
supported" note in SKILL.md with usage documentation.
@jeremy jeremy requested a review from a team as a code owner March 16, 2026 02:04
Copilot AI review requested due to automatic review settings March 16, 2026 02:04
@github-actions github-actions bot added commands CLI command implementations skills Agent skills enhancement New feature or request labels Mar 16, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds pagination support to the basecamp timeline command so it matches the established list-command pattern across the CLI, including consistent truncation notices and updated surfaced docs/skill metadata.

Changes:

  • Added --limit, --all, and --page flags to timeline, with shared validation and SDK list option wiring.
  • Rejected --all/--page under --watch, while allowing --limit to cap each poll.
  • Added truncation notices for account, project, and person timeline list paths; updated surface/skill docs accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
internal/commands/timeline.go Implements new pagination flags, validation, option building, truncation notices, and watch-mode constraints.
skills/basecamp/SKILL.md Updates user-facing skill documentation to describe the new flags and --watch restrictions.
.surface Adds the new flags to the surfaced CLI contract for basecamp timeline.
.surface-skill-drift Removes the timeline --limit baseline entry now that the flag is part of the surface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/commands/timeline.go Outdated
Reorder checks in runTimelineWatch so --all/--page are rejected with
the watch-specific message before validateTimelinePagination runs.
Previously --watch --page 2 returned "only --page 1 is supported"
instead of "--page cannot be used with --watch".
@jeremy jeremy merged commit c2be1da into main Mar 16, 2026
26 checks passed
@jeremy jeremy deleted the bc-9679133913 branch March 16, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations enhancement New feature or request skills Agent skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants