From 73631ff04bbe5b536000976134b2878e504bed95 Mon Sep 17 00:00:00 2001 From: "paulo.flores" Date: Tue, 3 Mar 2026 17:34:45 -0300 Subject: [PATCH 1/8] Add Aliases using 1080p width, including TAGs in describe --- custom/cloudfront/distributions/dao.go | 15 +++++++ custom/cloudfront/distributions/render.go | 54 ++++++++++++----------- 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/custom/cloudfront/distributions/dao.go b/custom/cloudfront/distributions/dao.go index 9b20695..753ba70 100644 --- a/custom/cloudfront/distributions/dao.go +++ b/custom/cloudfront/distributions/dao.go @@ -94,6 +94,21 @@ func (d *DistributionDAO) Get(ctx context.Context, id string) (dao.Resource, err } res := NewDistributionResource(summary) + + // Fetch tags (only on Get/describe, not on List) + if arn := appaws.Str(dist.ARN); arn != "" { + tagsOutput, err := d.client.ListTagsForResource(ctx, &cloudfront.ListTagsForResourceInput{ + Resource: &arn, + }) + if err == nil && tagsOutput.Tags != nil { + for _, tag := range tagsOutput.Tags.Items { + if tag.Key != nil && tag.Value != nil { + res.Tags[*tag.Key] = *tag.Value + } + } + } + } + // Store the invalidation batches from the full distribution if dist.InProgressInvalidationBatches != nil { res.InProgressInvalidations = *dist.InProgressInvalidationBatches diff --git a/custom/cloudfront/distributions/render.go b/custom/cloudfront/distributions/render.go index d33b498..d2d0588 100644 --- a/custom/cloudfront/distributions/render.go +++ b/custom/cloudfront/distributions/render.go @@ -2,6 +2,7 @@ package distributions import ( "fmt" + "sort" "strings" "github.com/clawscli/claws/internal/dao" @@ -25,11 +26,10 @@ func NewDistributionRenderer() *DistributionRenderer { Resource: "distributions", Cols: []render.Column{ {Name: "ID", Width: 16, Getter: getDistributionId}, - {Name: "DOMAIN", Width: 32, Getter: getDomainName}, + {Name: "DOMAIN", Width: 35, Getter: getDomainName}, {Name: "STATUS", Width: 12, Getter: getStatus}, - {Name: "ORIGIN", Width: 25, Getter: getDefaultOrigin}, - {Name: "ALIASES", Width: 8, Getter: getAliasCount}, {Name: "AGE", Width: 10, Getter: getAge}, + {Name: "ALIASES", Width: 20, Getter: getAllAliases}, // last column: expands to fill screen }, }, } @@ -60,37 +60,26 @@ func getStatus(r dao.Resource) string { return "" } -func getDefaultOrigin(r dao.Resource) string { +func getAge(r dao.Resource) string { if dist, ok := r.(*DistributionResource); ok { - origin := dist.DefaultOrigin() - if len(origin) > 23 { - return origin[:23] + "..." + if dist.Item.LastModifiedTime != nil { + return render.FormatAge(*dist.Item.LastModifiedTime) } - return origin } - return "" + return "-" } -func getAliasCount(r dao.Resource) string { +func getAllAliases(r dao.Resource) string { if dist, ok := r.(*DistributionResource); ok { - count := dist.AliasCount() - if count > 0 { - return fmt.Sprintf("%d", count) + aliases := dist.Aliases() + if len(aliases) == 0 { + return "-" } - return "-" + return strings.Join(aliases, ", ") } return "" } -func getAge(r dao.Resource) string { - if dist, ok := r.(*DistributionResource); ok { - if dist.Item.LastModifiedTime != nil { - return render.FormatAge(*dist.Item.LastModifiedTime) - } - } - return "-" -} - // RenderDetail renders detailed distribution information func (r *DistributionRenderer) RenderDetail(resource dao.Resource) string { dist, ok := resource.(*DistributionResource) @@ -116,7 +105,9 @@ func (r *DistributionRenderer) RenderDetail(resource dao.Resource) string { // Aliases if aliases := dist.Aliases(); len(aliases) > 0 { d.Section("Alternate Domain Names (CNAMEs)") - d.Field("Aliases", strings.Join(aliases, ", ")) + for _, alias := range aliases { + d.Field("Alias", alias) + } } // Origins @@ -198,7 +189,20 @@ func (r *DistributionRenderer) RenderDetail(resource dao.Resource) string { d.Field("WAF Web ACL", webAclId) } - // Status + // Tags (only available after d:describe / Enter) + if tags := dist.GetTags(); len(tags) > 0 { + d.Section("Tags") + keys := make([]string, 0, len(tags)) + for k := range tags { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + d.Field(k, tags[k]) + } + } + + // In-progress invalidations if batches := dist.InProgressInvalidationBatches(); batches > 0 { d.Section("In Progress") d.Field("Invalidation Batches", fmt.Sprintf("%d", batches)) From c21e7278047264d9b43abbeed070f81ab02b5157 Mon Sep 17 00:00:00 2001 From: "paulo.flores" Date: Mon, 9 Mar 2026 16:36:24 -0300 Subject: [PATCH 2/8] ci: fix actions/checkout version from v6 to v4 Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/claude-code-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index fd65da1..8452b0f 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: fetch-depth: 1 From f1dc370cb0bebe3113b89e0f328ca0d0e8f49aad Mon Sep 17 00:00:00 2001 From: "paulo.flores" Date: Mon, 9 Mar 2026 17:49:49 -0300 Subject: [PATCH 3/8] fix: remove extra indentation from Tag method and refactor tags rendering Co-Authored-By: Claude Sonnet 4.6 --- custom/cloudfront/distributions/render.go | 13 +------------ internal/render/detail.go | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/custom/cloudfront/distributions/render.go b/custom/cloudfront/distributions/render.go index d2d0588..697711d 100644 --- a/custom/cloudfront/distributions/render.go +++ b/custom/cloudfront/distributions/render.go @@ -2,7 +2,6 @@ package distributions import ( "fmt" - "sort" "strings" "github.com/clawscli/claws/internal/dao" @@ -190,17 +189,7 @@ func (r *DistributionRenderer) RenderDetail(resource dao.Resource) string { } // Tags (only available after d:describe / Enter) - if tags := dist.GetTags(); len(tags) > 0 { - d.Section("Tags") - keys := make([]string, 0, len(tags)) - for k := range tags { - keys = append(keys, k) - } - sort.Strings(keys) - for _, k := range keys { - d.Field(k, tags[k]) - } - } + d.Tags(dist.GetTags()) // In-progress invalidations if batches := dist.InProgressInvalidationBatches(); batches > 0 { diff --git a/internal/render/detail.go b/internal/render/detail.go index cdae4b0..90b920c 100644 --- a/internal/render/detail.go +++ b/internal/render/detail.go @@ -128,7 +128,7 @@ func (d *DetailBuilder) DimIndent(text string) *DetailBuilder { // Tag adds a single tag line (key: value format) func (d *DetailBuilder) Tag(key, value string) *DetailBuilder { - d.sb.WriteString(" " + d.styles.Dim.Render(key+":") + " " + d.styles.Value.Render(value) + "\n") + d.sb.WriteString(d.styles.Dim.Render(key+":") + " " + d.styles.Value.Render(value) + "\n") return d } From dd93b04abb0a84f9bba5cdc4b2888fd9d60d72eb Mon Sep 17 00:00:00 2001 From: Paulo Flores Date: Tue, 10 Mar 2026 14:00:44 -0300 Subject: [PATCH 4/8] feat: Add `DetailBuilder` for consistent and structured rendering of detail views with styling and placeholder support. --- ...\357\201\234marketplaces\357\201\234claude-plugins-official" | 1 + internal/render/detail.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 "C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" diff --git "a/C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" "b/C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" new file mode 160000 index 0000000..205b6e0 --- /dev/null +++ "b/C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" @@ -0,0 +1 @@ +Subproject commit 205b6e0b30366a969412d9aab7b99bea99d58db1 diff --git a/internal/render/detail.go b/internal/render/detail.go index 90b920c..e3bd844 100644 --- a/internal/render/detail.go +++ b/internal/render/detail.go @@ -128,7 +128,7 @@ func (d *DetailBuilder) DimIndent(text string) *DetailBuilder { // Tag adds a single tag line (key: value format) func (d *DetailBuilder) Tag(key, value string) *DetailBuilder { - d.sb.WriteString(d.styles.Dim.Render(key+":") + " " + d.styles.Value.Render(value) + "\n") + d.sb.WriteString(d.styles.Label.Render(key+":") + d.styles.Value.Render(value) + "\n") return d } From 3b347982633611f20f7d1d66f5d62c5db6730166 Mon Sep 17 00:00:00 2001 From: Paulo Flores Date: Tue, 10 Mar 2026 14:54:04 -0300 Subject: [PATCH 5/8] Please provide the file changes to generate a commit message. --- ...s\357\201\234marketplaces\357\201\234claude-plugins-official" | 1 - 1 file changed, 1 deletion(-) delete mode 160000 "C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" diff --git "a/C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" "b/C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" deleted file mode 160000 index 205b6e0..0000000 --- "a/C\357\200\272\357\201\234Users\357\201\234paulo\357\201\234.claude\357\201\234plugins\357\201\234marketplaces\357\201\234claude-plugins-official" +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 205b6e0b30366a969412d9aab7b99bea99d58db1 From c20ebf2cb07ef3549b90158eedf4194dc954c75e Mon Sep 17 00:00:00 2001 From: Paulo Flores Date: Tue, 10 Mar 2026 22:00:55 -0300 Subject: [PATCH 6/8] revert: undo unrelated changes outside CloudFront scope Revert non-CloudFront changes introduced alongside the CloudFront aliases/tags feature to keep the PR focused: - detail.go: restore original Tag() styling (Dim + indent) - claude-code-review.yml: restore actions/checkout@v6 - integration-test.yml: restore actions/upload-artifact@v6 - ecs/clusters/render.go: remove unrelated AutoReload flag Co-Authored-By: Claude Opus 4.6 --- .github/workflows/claude-code-review.yml | 2 +- .github/workflows/integration-test.yml | 2 +- custom/ecs/clusters/render.go | 1 - internal/render/detail.go | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 8452b0f..fd65da1 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 1 diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 93009e7..d421471 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -71,7 +71,7 @@ jobs: - name: Upload screenshots on failure if: failure() - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v6 with: name: vhs-screenshots path: docs/images/ diff --git a/custom/ecs/clusters/render.go b/custom/ecs/clusters/render.go index fc02938..47ed257 100644 --- a/custom/ecs/clusters/render.go +++ b/custom/ecs/clusters/render.go @@ -194,7 +194,6 @@ func (r *ClusterRenderer) Navigations(resource dao.Resource) []render.Navigation Resource: "services", FilterField: "ClusterName", FilterValue: clusterName, - AutoReload: true, }, { Key: "t", diff --git a/internal/render/detail.go b/internal/render/detail.go index e3bd844..cdae4b0 100644 --- a/internal/render/detail.go +++ b/internal/render/detail.go @@ -128,7 +128,7 @@ func (d *DetailBuilder) DimIndent(text string) *DetailBuilder { // Tag adds a single tag line (key: value format) func (d *DetailBuilder) Tag(key, value string) *DetailBuilder { - d.sb.WriteString(d.styles.Label.Render(key+":") + d.styles.Value.Render(value) + "\n") + d.sb.WriteString(" " + d.styles.Dim.Render(key+":") + " " + d.styles.Value.Render(value) + "\n") return d } From a031f028f689818843b65f848dbca9fdc89c2806 Mon Sep 17 00:00:00 2001 From: Paulo Flores Date: Tue, 10 Mar 2026 22:47:45 -0300 Subject: [PATCH 7/8] fix: render CloudFront tags aligned with other detail sections Use Field() instead of Tags() for CloudFront detail view so tag labels and values align with the same tabulation as other sections. Co-Authored-By: Claude Opus 4.6 --- custom/cloudfront/distributions/render.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/custom/cloudfront/distributions/render.go b/custom/cloudfront/distributions/render.go index 697711d..2efb2a2 100644 --- a/custom/cloudfront/distributions/render.go +++ b/custom/cloudfront/distributions/render.go @@ -2,6 +2,7 @@ package distributions import ( "fmt" + "slices" "strings" "github.com/clawscli/claws/internal/dao" @@ -189,7 +190,17 @@ func (r *DistributionRenderer) RenderDetail(resource dao.Resource) string { } // Tags (only available after d:describe / Enter) - d.Tags(dist.GetTags()) + if tags := dist.GetTags(); len(tags) > 0 { + d.Section("Tags") + keys := make([]string, 0, len(tags)) + for k := range tags { + keys = append(keys, k) + } + slices.Sort(keys) + for _, key := range keys { + d.Field(key, tags[key]) + } + } // In-progress invalidations if batches := dist.InProgressInvalidationBatches(); batches > 0 { From bb86c91d33a6ea778fc14517b4b496dc99ac561f Mon Sep 17 00:00:00 2001 From: Paulo Flores Date: Tue, 10 Mar 2026 22:52:41 -0300 Subject: [PATCH 8/8] revert: restore integration-test.yml and ecs/clusters to upstream state Co-Authored-By: Claude Opus 4.6 --- .github/workflows/integration-test.yml | 2 +- custom/ecs/clusters/render.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index d421471..93009e7 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -71,7 +71,7 @@ jobs: - name: Upload screenshots on failure if: failure() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: vhs-screenshots path: docs/images/ diff --git a/custom/ecs/clusters/render.go b/custom/ecs/clusters/render.go index 47ed257..fc02938 100644 --- a/custom/ecs/clusters/render.go +++ b/custom/ecs/clusters/render.go @@ -194,6 +194,7 @@ func (r *ClusterRenderer) Navigations(resource dao.Resource) []render.Navigation Resource: "services", FilterField: "ClusterName", FilterValue: clusterName, + AutoReload: true, }, { Key: "t",