Skip to content

fix(analytics): hint that an empty session list searched only the last 24 hours - #1026

Merged
Topherhindman merged 1 commit into
mainfrom
cli-session-list-default-window
Oct 10, 2026
Merged

Topherhindman merged 1 commit into
mainfrom
cli-session-list-default-window

Conversation

@Topherhindman

@Topherhindman Topherhindman commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

lk analytics session list under --experimental-auth printed only "No sessions found" whenever the last 24 hours were empty. With no --start, the Public API lists only the last 24 hours (its TimeRange default), so a project whose latest session was two days ago looked like it had none.

What changed

  • An empty listing that left the window to the server gets a hint, as a status line after "No sessions found", worded like the paging hint (More results available — re-run with --cursor …):
    No sessions found
    Only the last 24 hours were searched — re-run with --start YYYY-MM-DD to look further back
    
  • No hint when --start is set, when --cursor is (a cursor carries the window of the listing it came from), or with --json.
  • The API-key listing is unchanged. --start's help is too: the flag is shared with the API-key endpoint, whose default window differs.

Testing

  • TestSearchedDefaultWindow covers no --start, a --start, and a cursor.
  • go test ./cmd/lk/ ./pkg/public/... and go vet pass.
  • Against staging (--experimental-api-url https://beta-api.staging.livekit.cloud), on a project whose last session was 2026-10-07:
    • no --start prints the two lines above;
    • --start 2026-10-08 prints only No sessions found;
    • --json prints {"items": []} with no hint.

@Topherhindman
Topherhindman force-pushed the devx-800-cli-participant-sessions-events branch from bcb53de to ae6a1dd Compare October 10, 2026 03:11
@Topherhindman
Topherhindman force-pushed the cli-session-list-default-window branch 2 times, most recently from 398c87a to f0023a5 Compare October 10, 2026 03:12
@Topherhindman
Topherhindman force-pushed the devx-800-cli-participant-sessions-events branch 2 times, most recently from 2d0e47e to 9c1422c Compare October 10, 2026 03:48
@Topherhindman
Topherhindman force-pushed the cli-session-list-default-window branch 2 times, most recently from 4715d07 to a53aa18 Compare October 10, 2026 04:21
@Topherhindman
Topherhindman force-pushed the devx-800-cli-participant-sessions-events branch 2 times, most recently from 2759435 to 9eb6d33 Compare October 10, 2026 04:37
@Topherhindman
Topherhindman force-pushed the cli-session-list-default-window branch 2 times, most recently from 81920ac to e631e6e Compare October 10, 2026 04:53
@Topherhindman
Topherhindman force-pushed the devx-800-cli-participant-sessions-events branch from 9eb6d33 to e200807 Compare October 10, 2026 04:53
@Topherhindman
Topherhindman force-pushed the cli-session-list-default-window branch from e631e6e to b65b9ed Compare October 10, 2026 05:03
@Topherhindman
Topherhindman force-pushed the devx-800-cli-participant-sessions-events branch from e200807 to 0a431da Compare October 10, 2026 05:03
Base automatically changed from devx-800-cli-participant-sessions-events to main October 10, 2026 05:15
@Topherhindman
Topherhindman force-pushed the cli-session-list-default-window branch from b65b9ed to 7888756 Compare October 10, 2026 05:17
@Topherhindman
Topherhindman merged commit f3a6aeb into main Oct 10, 2026
25 checks passed
@Topherhindman
Topherhindman deleted the cli-session-list-default-window branch October 10, 2026 05:27
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.

2 participants