From 26b6558bb6502caf35f666136ce50bd0e7d1a928 Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Sat, 6 Jun 2026 18:16:45 +0530 Subject: [PATCH 1/3] update help with shortcuts --- cmd/dataset.go | 11 +++++++---- cmd/profile.go | 4 ++-- cmd/queryList.go | 2 +- cmd/role.go | 4 ++-- cmd/user.go | 4 ++-- pkg/model/query.go | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cmd/dataset.go b/cmd/dataset.go index 091a0d4..cafef28 100644 --- a/cmd/dataset.go +++ b/cmd/dataset.go @@ -54,12 +54,15 @@ type DatasetStatsData struct { type DatasetListItem struct { Name string + Type string + LastIngested time.Time } func (item *DatasetListItem) Render() string { bullet := SelectedStyle.Render("•") name := StandardStyle.Render(item.Name) - return ItemOuter.Render(fmt.Sprintf("%s %s", bullet, name)) + datasetType := StandardStyle.Render(item.Type) + return ItemOuter.Render(fmt.Sprintf("%s %s [%s]", bullet, name, datasetType)) } // DatasetRetentionData is the data structure for dataset retention @@ -459,7 +462,7 @@ func init() { } var RemoveDatasetCmd = &cobra.Command{ - Use: "remove dataset-name", + Use: "remove|rm dataset-name", Aliases: []string{"rm"}, Example: " pb dataset remove backend_logs\n pb dataset remove backend_logs --type logs", Short: "Delete a dataset", @@ -546,7 +549,7 @@ func init() { // ListDatasetCmd is the list command for datasets var ListDatasetCmd = &cobra.Command{ - Use: "list", + Use: "list|ls", Aliases: []string{"ls"}, Example: " pb dataset list", Short: "List all datasets", @@ -577,7 +580,7 @@ var ListDatasetCmd = &cobra.Command{ } for _, dataset := range items { - fmt.Println((&DatasetListItem{Name: dataset.Title}).Render()) + fmt.Println((&DatasetListItem{Name: dataset.Title, Type: dataset.DatasetType}).Render()) } return nil }, diff --git a/cmd/profile.go b/cmd/profile.go index 008f92b..01fb161 100644 --- a/cmd/profile.go +++ b/cmd/profile.go @@ -154,7 +154,7 @@ var AddProfileCmd = &cobra.Command{ } var RemoveProfileCmd = &cobra.Command{ - Use: "remove profile-name", + Use: "remove|rm profile-name", Aliases: []string{"rm"}, Example: " pb profile remove local_parseable", Args: cobra.ExactArgs(1), @@ -328,7 +328,7 @@ var UpdateProfileCmd = &cobra.Command{ } var ListProfileCmd = &cobra.Command{ - Use: "list profiles", + Use: "list|ls profiles", Aliases: []string{"ls"}, Short: "List all added profiles", Example: " pb profile list", diff --git a/cmd/queryList.go b/cmd/queryList.go index 3938462..89d5a6b 100644 --- a/cmd/queryList.go +++ b/cmd/queryList.go @@ -30,7 +30,7 @@ import ( ) var SavedQueryList = &cobra.Command{ - Use: "list", + Use: "list|ls", Aliases: []string{"ls"}, Example: "pb sql list [-o | --output]", Short: "List of saved queries", diff --git a/cmd/role.go b/cmd/role.go index 1528612..e4e2fb3 100644 --- a/cmd/role.go +++ b/cmd/role.go @@ -143,7 +143,7 @@ var AddRoleCmd = &cobra.Command{ } var RemoveRoleCmd = &cobra.Command{ - Use: "remove role-name", + Use: "remove|rm role-name", Aliases: []string{"rm"}, Example: " pb role remove ingestor", Short: "Delete a role", @@ -188,7 +188,7 @@ var RemoveRoleCmd = &cobra.Command{ } var ListRoleCmd = &cobra.Command{ - Use: "list", + Use: "list|ls", Aliases: []string{"ls"}, Short: "List all roles", Example: " pb role list", diff --git a/cmd/user.go b/cmd/user.go index 6da5900..849a77b 100644 --- a/cmd/user.go +++ b/cmd/user.go @@ -149,7 +149,7 @@ var AddUserCmd = func() *cobra.Command { }() var RemoveUserCmd = &cobra.Command{ - Use: "remove user-name", + Use: "remove|rm user-name", Aliases: []string{"rm"}, Example: " pb user remove bob", Short: "Delete a user", @@ -275,7 +275,7 @@ var SetUserRoleCmd = &cobra.Command{ } var ListUserCmd = &cobra.Command{ - Use: "list", + Use: "list|ls", Aliases: []string{"ls"}, Short: "List all users", Example: " pb user list", diff --git a/pkg/model/query.go b/pkg/model/query.go index 5aab7d2..273aa58 100644 --- a/pkg/model/query.go +++ b/pkg/model/query.go @@ -1641,7 +1641,7 @@ func renderSQLControlsBox(start, end, dataset string, columns []string, columnId paneRule("┌", "┐", "TIME RANGE "+formatResultTimeLabel(displayMode), width, borderStyle, timeTitleStyle), } lines = append(lines, paneBodyLines(lipgloss.JoinVertical(lipgloss.Left, timeLines...), width, len(timeLines), borderStyle)...) - lines = append(lines, paneRule("├", "┤", "DATASET", width, borderStyle, datasetTitleStyle)) + lines = append(lines, paneRule("├", "┤", "DATASET ", width, borderStyle, datasetTitleStyle)) lines = append(lines, paneBodyLines(lipgloss.JoinVertical(lipgloss.Left, datasetLines...), width, len(datasetLines), borderStyle)...) lines = append(lines, paneRule("├", "┤", columnsTitle, width, borderStyle, columnsTitleStyle)) lines = append(lines, paneBodyLines(lipgloss.JoinVertical(lipgloss.Left, columnLines...), width, columnSectionH, borderStyle)...) From 8d73a7b0836a067dd62d962db8d43a0a275a001a Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Sun, 7 Jun 2026 00:01:53 +0530 Subject: [PATCH 2/3] update --- cmd/dataset.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/dataset.go b/cmd/dataset.go index cafef28..b08b8cf 100644 --- a/cmd/dataset.go +++ b/cmd/dataset.go @@ -62,6 +62,9 @@ func (item *DatasetListItem) Render() string { bullet := SelectedStyle.Render("•") name := StandardStyle.Render(item.Name) datasetType := StandardStyle.Render(item.Type) + if datasetType == "" { + return ItemOuter.Render(fmt.Sprintf("%s %s", bullet, name)) + } return ItemOuter.Render(fmt.Sprintf("%s %s [%s]", bullet, name, datasetType)) } From e6ebad0254af71b3ad51d6f8e4889fd8a1d890e4 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Jun 2026 00:22:11 +0530 Subject: [PATCH 3/3] fix: apply gofumpt formatting to cmd/dataset.go (#107) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- cmd/dataset.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/dataset.go b/cmd/dataset.go index b08b8cf..f8c9cf7 100644 --- a/cmd/dataset.go +++ b/cmd/dataset.go @@ -53,8 +53,8 @@ type DatasetStatsData struct { } type DatasetListItem struct { - Name string - Type string + Name string + Type string LastIngested time.Time }