Skip to content

feat(cmd): ux feedback - #1051

Open
rektdeckard wants to merge 8 commits into
mainfrom
tobiasfried/ocd-3469-cli-ux-feedback
Open

rektdeckard wants to merge 8 commits into
mainfrom
tobiasfried/ocd-3469-cli-ux-feedback

Conversation

@rektdeckard

@rektdeckard rektdeckard commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Implement some UX feedback on CLI commands:

  • Support natural language query ranges with the --since flag (--since 2w as an alternative to --start 2026-10-02)
  • Sets default query window for analytics commands to 14 days instead of 24 hours
  • Increases default page size for observability objects from 50 -> 1000
  • Makes the output of lk analytics session transcript match the live transcript output when running lk agent console, lk agent debugger
  • Standardize the --json output of some experimental commands (consistent way of showing pagination, prefer raw response shapes to something made-up)
  • Sets default --type=audio for lk analytics session recording and handles file name collisions
  • Updates charm.land/bubbletea package to fix issue with form output not being cleared from the terminal

@JackNDwyer

Copy link
Copy Markdown
Contributor

Me and claude went through

Two things:
(1) With --quiet, recording prints nothing, and now that filenames get numbered, scripts can’t tell where the file went. Is it reasonable for the path to go to stdout?
(2) I know we discussed max query return lengths. Is 1000 per page safe for aggregator, given the 64 MB cap and Kuba’s get-traces OOM? If not, maybe a lower default with a 1000 max?

@Topherhindman

Copy link
Copy Markdown
Contributor

Me and claude went through

Two things: (1) With --quiet, recording prints nothing, and now that filenames get numbered, scripts can’t tell where the file went. Is it reasonable for the path to go to stdout? (2) I know we discussed max query return lengths. Is 1000 per page safe for aggregator, given the 64 MB cap and Kuba’s get-traces OOM? If not, maybe a lower default with a 1000 max?

yeah 1000 is safe. https://live-kit.slack.com/archives/C02RXL72MQA/p1792097914902789

// when the recording started (to line the audio up with the transcript), from
// the signed URL response r the download came from.
func RecordingSaved(p *util.Printer, r oapi.LivekitPublicapiObservabilityV1RecordingGetURLResponse, s SavedRecording) error {
p.Statusf("Saved %s of session to [%s] (%s)", RecordingLabel(s.Recording),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to what @JackNDwyer said about putting the path on stdout. also while ur in here the session id got dropped so it says "saved chat history of session to [...]", and the recording start time doesnt print anymore either. r gets passed in for it but never used. 0f6680e changed TestRecordingSaved to match the current output so prob worth putting those assertions back too

Comment thread cmd/lk/analytics.go
next := page.Cursor
for {
items, cursor, err := fetch(public.PageOptions{
Limit: min(public.MaxPageSize, page.Limit-int32(len(all))),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since livekit/public-api-server#82 drops the max for transcript/logs/traces/metrics we can just ask for whatever's left in one go here, like Limit: page.Limit - int32(len(all)), and kill MaxPageSize entirely. default read becomes 1 request instead of limit/1000, and metrics especially bc GetMetrics reads the whole session on every page anyway.

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.

3 participants