Skip to content

chore(ui): Rename constants#133

Merged
tab merged 1 commit into
masterfrom
fix/const-names
May 30, 2026
Merged

chore(ui): Rename constants#133
tab merged 1 commit into
masterfrom
fix/const-names

Conversation

@tab
Copy link
Copy Markdown
Owner

@tab tab commented May 30, 2026

  • Rename TipRotationTicks to UITipRotationTicks
  • Rename StatsCallTimeout to UIStatsCallTimeout
  • Rename MinPanelHeight to PanelMinHeight
  • Rename BorderEdgeWidth to BorderSpacerWidth
  • Rename NameWidthShort/Medium/Long to ServiceNameWidthShort/Medium/Long
  • Rename DefaultTimelineSlots to TimelineDefaultSlots

- Rename TipRotationTicks to UITipRotationTicks
- Rename StatsCallTimeout to UIStatsCallTimeout
- Rename MinPanelHeight to PanelMinHeight
- Rename BorderEdgeWidth to BorderSpacerWidth
- Rename NameWidthShort/Medium/Long to ServiceNameWidthShort/Medium/Long
- Rename DefaultTimelineSlots to TimelineDefaultSlots
@tab tab requested a review from Copilot May 30, 2026 12:13
@tab tab self-assigned this May 30, 2026
@sentry
Copy link
Copy Markdown

sentry Bot commented May 30, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.45%. Comparing base (5123bd9) to head (3187761).

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #133      +/-   ##
==========================================
- Coverage   89.48%   89.45%   -0.04%     
==========================================
  Files          63       63              
  Lines        5899     5899              
==========================================
- Hits         5279     5277       -2     
- Misses        488      489       +1     
- Partials      132      133       +1     
Files with missing lines Coverage Δ
internal/app/render/log.go 100.00% <100.00%> (ø)
internal/app/ui/components/layout.go 99.37% <100.00%> (ø)
internal/app/ui/services/view.go 98.14% <100.00%> (ø)
internal/app/ui/services/monitor.go 84.61% <0.00%> (ø)
internal/app/ui/services/update.go 74.47% <50.00%> (ø)

... and 1 file 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

Pure rename refactor of UI/component constants in internal/app/ui/components/constants.go, regrouping them by UI domain (Panel, Border, Row, Status, Metric, ServiceName, Timeline, LogStream) and updating all call sites and tests accordingly.

Changes:

  • Regroups and renames constants in constants.go to use domain-prefixed names (e.g. UITipRotationTicks, PanelMinHeight, BorderSpacerWidth, ServiceNameWidth*, TimelineDefaultSlots, LogStreamMaxServiceNameLen).
  • Updates all consumers in internal/app/ui/services/* and internal/app/render/log.go to the new names.
  • Updates the matching unit tests to reference the new constant names.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/app/ui/components/constants.go Regroups constants by domain and renames them with domain prefixes.
internal/app/ui/components/layout.go Updates layout/border helpers to use renamed constants.
internal/app/ui/components/layout_test.go Updates tests to use ServiceNameWidth*/ServiceNameTrailingGap.
internal/app/ui/services/view.go Uses UITipRotationTicks, ServiceNameTrailingGap, RowErrorPadding.
internal/app/ui/services/view_test.go Updates test references to renamed constants.
internal/app/ui/services/update.go Uses PanelMinHeight and TimelineDefaultSlots.
internal/app/ui/services/update_test.go Updates test references to TimelineDefaultSlots.
internal/app/ui/services/monitor.go Uses UIStatsCallTimeout.
internal/app/render/log.go Uses LogStreamMaxServiceNameLen.

@tab tab merged commit 03abff7 into master May 30, 2026
11 checks passed
@tab tab deleted the fix/const-names branch May 30, 2026 12:17
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