feat: center section divider to match table width (#2698)

The '========== Updated Releases ==========' header was a fixed 38
chars regardless of the table width below it. Now the divider line
is extended to match the table's visual width, with the title text
centered within the '=' borders.

- Add TableVisualWidth() to measure table width via runewidth
- Add HeaderDividerCentered() and HeaderDividerCenteredStyled()
  for centered dividers with optional bold+blue ANSI styling
- Refactor DisplayAffectedReleases to build the table first, then
  compute its width before logging the header
- Update all test snapshots and integration test output files

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2026-07-10 21:17:35 +08:00
committed by GitHub
parent 30f529f529
commit a9e4a8518a
59 changed files with 191 additions and 78 deletions
@@ -52,7 +52,7 @@ processing releases in group 1/3: default/kube-system/kubernetes-external-secret
processing releases in group 2/3: default/default/external-secrets
processing releases in group 3/3: default/default/my-release
========== Updated Releases ==========
============================== Updated Releases ==============================
NAME NAMESPACE CHART VERSION DURATION
kubernetes-external-secrets kube-system incubator/raw 3.1.0 0s
external-secrets default incubator/raw 3.1.0 0s