Skip to content

Match corner progress preview to the watch - #6073

Merged
bgoncal merged 8 commits into
mainfrom
corner-progress-preview
Oct 19, 2026
Merged

bgoncal merged 8 commits into
mainfrom
corner-progress-preview

Conversation

@bgoncal

@bgoncal bgoncal commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

AI Policy

Select exactly one option that describes AI usage in this contribution:

  • I have not used AI for this contribution.
  • AI assistance was used for this contribution.
  • AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review.

Summary

In progress bar mode the watch draws the corner text on the same line as the bar, ahead of it. The iPhone preview now shows the same layout, so users know what to expect.

Screenshots

Value + name Icon + name

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

Follow-up to #5941.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Layout parity needs human confirmation in a native watch host because the rendering snapshots exercise the approximation.

0 open findings

What changed in this PR

Aligns the iPhone corner-complication preview with the watch’s progress-bar layout, building on #5941.

Changes:

  • Places progress-mode text ahead of the bar and distinguishes gauge markers from progress arcs.
  • Connects the indicator selection across configuration, previews, and watch snapshots.
  • Adds localized controls and configuration/snapshot test coverage.
File Description
Tests/​WatchComplications/​CornerComplicationSnapshot.test.swift Adds progress-layout snapshot cases.
Tests/​WatchAppTests/​CornerComplicationWatchSnapshot.test.swift Adds matching watch-side snapshot cases.
Tests/​Shared/​WatchComplicationConfigGaugeRange.test.swift Tests indicator defaults and family overrides.
Tests/​App/​Watch/​WatchComplicationConfigurationSheetSnapshot.test.swift Adds light/dark picker snapshots.
Sources/​WatchWidgets/​WatchWidgetComplicationSnapshot.swift Reads the progress selection in widget snapshots.
Sources/​WatchWidgets/​Complications/​CornerComplicationView.swift Selects native progress or gauge rendering.
Sources/​WatchApp/​Complication/​WatchWidgetComplicationSnapshot.swift Transfers the indicator selection to widgets.
Sources/​Shared/​Resources/​Swiftgen/​Strings.swift Adds generated localization accessors.
Sources/​Shared/​API/​Models/​WatchComplication.swift Provides localized indicator titles.
Sources/​HAWatchComplications/​Sources/​CornerComplicationRenderModel.swift Adds the indicator display mode.
Sources/​HAWatchComplications/​Sources/​CornerComplicationContentView.swift Updates progress text placement and gauge drawing.
Sources/​HAModels/​Sources/​WatchComplicationConfig.swift Stores the selection with a gauge fallback.
Sources/​App/​Settings/​AppleWatch/​Complications/​WatchComplicationConfigurationSheet.swift Adds the corner indicator picker.
Sources/​App/​Settings/​AppleWatch/​Complications/​Preview/​CornerComplicationPreview.swift Passes the selected mode into previews.
Sources/​App/​Resources/​en.lproj/​Localizable.strings Adds English indicator labels.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bgoncal
bgoncal force-pushed the corner-progress-preview branch from bb264b1 to 84ab83f Compare October 15, 2026 10:18
@bgoncal
bgoncal requested a balanced review from Copilot October 15, 2026 10:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused layout changes have corresponding snapshot cases and no identified blocking issues.

0 open findings

🧠 Review effort: Balanced

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.09%. Comparing base (7be51e5) to head (8be9ef0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6073      +/-   ##
==========================================
- Coverage   56.11%   56.09%   -0.03%     
==========================================
  Files        1256     1256              
  Lines       83431    83431              
==========================================
- Hits        46819    46797      -22     
- Misses      36612    36634      +22     

see 11 files with indirect coverage changes

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal
bgoncal enabled auto-merge (squash) October 15, 2026 13:57
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Unused L10n strings detected

Found 2 unused localization strings in the codebase.

Click to see details
Parsing Strings.swift...
Found 3051 L10n strings

Reading all Swift source code...
Read 14137240 characters of Swift code

Checking for unused strings...
Checked 100/3051 strings...
Checked 200/3051 strings...
Checked 300/3051 strings...
Checked 400/3051 strings...
Checked 500/3051 strings...
Checked 600/3051 strings...
Checked 700/3051 strings...
Checked 800/3051 strings...
Checked 900/3051 strings...
Checked 1000/3051 strings...
Checked 1100/3051 strings...
Checked 1200/3051 strings...
Checked 1300/3051 strings...
Checked 1400/3051 strings...
Checked 1500/3051 strings...
Checked 1600/3051 strings...
Checked 1700/3051 strings...
Checked 1800/3051 strings...
Checked 1900/3051 strings...
Checked 2000/3051 strings...
Checked 2100/3051 strings...
Checked 2200/3051 strings...
Checked 2300/3051 strings...
Checked 2400/3051 strings...
Checked 2500/3051 strings...
Checked 2600/3051 strings...
Checked 2700/3051 strings...
Checked 2800/3051 strings...
Checked 2900/3051 strings...
Checked 3000/3051 strings...

================================================================================
UNUSED STRINGS REPORT
================================================================================

Found 2 unused strings:


SETTINGS:
  - L10n.Settings.ConnectionSection.connectingVia
    Key: settings.connection_section.connecting_via
    Line: 5301
  - L10n.Settings.ConnectionSection.loggedInAs
    Key: settings.connection_section.logged_in_as
    Line: 5309

================================================================================
Total unused: 2
================================================================================

================================================================================
Copy-paste these keys into the "Lokalise: Delete Keys" workflow (keys input):
================================================================================
settings.connection_section.connecting_via,settings.connection_section.logged_in_as

To remove them, run the
Lokalise: Delete Keys
workflow — it deletes the keys from Lokalise and opens a PR removing them from
Localizable.strings and regenerating Strings.swift. Copy-paste these keys into the keys input:

settings.connection_section.connecting_via,settings.connection_section.logged_in_as

@bgoncal
bgoncal merged commit 906aae6 into main Oct 19, 2026
19 of 20 checks passed
@bgoncal
bgoncal deleted the corner-progress-preview branch October 19, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants