Skip to content

fix(ui): Adaptive flexbox layout for services table#118

Merged
tab merged 1 commit into
masterfrom
fix/timeline
Apr 27, 2026
Merged

fix(ui): Adaptive flexbox layout for services table#118
tab merged 1 commit into
masterfrom
fix/timeline

Conversation

@tab
Copy link
Copy Markdown
Owner

@tab tab commented Apr 27, 2026

Replace fixed column allocation with a three-section flexbox layout that adapts to terminal width and the longest service name in the profile

Replace fixed column allocation with a three-section flexbox layout that adapts to terminal width and the longest service name in the profile
@tab tab requested a review from Copilot April 27, 2026 20:31
@tab tab self-assigned this Apr 27, 2026
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 97.36842% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.36%. Comparing base (7ae66c9) to head (c6dfaf0).

Files with missing lines Patch % Lines
internal/app/ui/services/update.go 50.00% 1 Missing ⚠️
internal/app/ui/services/view.go 96.42% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   89.23%   89.36%   +0.12%     
==========================================
  Files          60       60              
  Lines        5650     5697      +47     
==========================================
+ Hits         5042     5091      +49     
  Misses        480      480              
+ Partials      128      126       -2     
Files with missing lines Coverage Δ
internal/app/ui/components/layout.go 99.37% <100.00%> (+0.09%) ⬆️
internal/app/ui/services/helpers.go 100.00% <100.00%> (ø)
internal/app/ui/services/update.go 74.46% <50.00%> (+0.21%) ⬆️
internal/app/ui/services/view.go 98.12% <96.42%> (-0.28%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the services table layout to adapt to terminal width and the longest service name, introducing a three-section (name / center / metrics) flex layout and adding tests for wrapping/truncation behavior.

Changes:

  • Extend table layout computation to account for preferred service-name width and distribute surplus width into left/right “flex” gaps.
  • Update services view rendering to use the new layout (flex gaps + metric-value truncation).
  • Add/adjust tests to cover truncation, long uptime rendering, wide-terminal distinguishability, and Unicode name behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/app/ui/services/view.go Renders headers/rows using left/right flex gaps; truncates metric values to avoid wrap.
internal/app/ui/services/update.go Recomputes layout on terminal resize and after profile resolution.
internal/app/ui/services/helpers.go Adds longest-name measurement and centralized layout recomputation.
internal/app/ui/services/view_test.go Adds tests for long uptime/no-wrap, wide-terminal name distinguishability, and Unicode behavior.
internal/app/ui/components/layout.go Adds preferred-name bucketing and updated layout allocation with flex gaps.
internal/app/ui/components/layout_test.go Updates/extends layout tests for new layout inputs and preferred-name bucketing.
internal/app/ui/components/constants.go Introduces new layout constants (buckets, divisors, flex-related constants) and adjusts some existing ones.

Comment thread internal/app/ui/services/view.go
Comment thread internal/app/ui/services/view_test.go
Comment thread internal/app/ui/components/layout.go
@tab tab merged commit 08b375f into master Apr 27, 2026
14 checks passed
@tab tab deleted the fix/timeline branch April 27, 2026 20:37
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