Skip to content

Conversation

@nopoz
Copy link

@nopoz nopoz commented Jan 7, 2026

  • Add ShowTemperatureUnit boolean property (default: true) across backend and frontend
  • When false, displays only degree symbol (e.g., "72°") without F/C indicator
  • Handle undefined weather.unit with fallback to "°"
  • Update test data files (TestV2.json, TestV2.yml) for new setting

Summary by CodeRabbit

  • New Features
    • Added a new configuration setting to control display of temperature units (enabled by default).
    • Clock/weather display now respects the temperature-unit setting.
    • Client and server configuration samples and environment vars updated to include the new setting.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

This change introduces a new configuration setting to control whether temperature units are displayed. The feature is implemented across the server configuration interface, model layers, data mappings, test resources, and the client-side UI component with conditional rendering logic.

Changes

Cohort / File(s) Summary
Interface & Core Definitions
ImmichFrame.Core/Interfaces/IServerSettings.cs
Added ShowTemperatureUnit getter-only boolean property to IGeneralSettings interface.
Server-Side Models & Settings
ImmichFrame.WebApi/Models/ServerSettings.cs, ImmichFrame.WebApi/Models/ClientSettingsDto.cs, ImmichFrame.WebApi/Helpers/Config/ServerSettingsV1.cs
Added ShowTemperatureUnit property to GeneralSettings (default true), added corresponding property to ClientSettingsDto and mapped it in FromGeneralSettings, and added adapter property in GeneralSettingsV1Adapter returning true.
Test Data Resources
ImmichFrame.WebApi.Tests/Resources/TestV2.json, ImmichFrame.WebApi.Tests/Resources/TestV2.yml
Added ShowTemperatureUnit: true under the General section in both test config files.
Client-Side Components & Types
immichFrame.Web/src/lib/components/elements/clock.svelte, immichFrame.Web/src/lib/immichFrameApi.ts
Added optional showTemperatureUnit field to client settings type. Modified clock.svelte to conditionally render the temperature unit: show '°' when disabled, otherwise show weather.unit (defaulting to '°' if undefined).
Docker / Example Configs
docker/Settings.example.json, docker/Settings.example.yml, docker/example.env
Added ShowTemperatureUnit: true to example configuration files and ShowTemperatureUnit=true to example.env.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I nudged a setting, small and bright,
Show or hide the degree in sight,
From server fields to clock's soft tune,
A tiny flag beneath the moon—
Hop, tweak, and watch the units light!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a ShowTemperatureUnit setting that controls whether F/C units are displayed in the weather component.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0ac525 and 46f2695.

📒 Files selected for processing (3)
  • docker/Settings.example.json
  • docker/Settings.example.yml
  • docker/example.env
✅ Files skipped from review due to trivial changes (1)
  • docker/example.env
🔇 Additional comments (2)
docker/Settings.example.json (1)

37-38: LGTM!

The new ShowTemperatureUnit setting is correctly added with proper JSON syntax (trailing comma on the previous property) and the default value of true aligns with the backend implementation.

docker/Settings.example.yml (1)

36-36: LGTM!

The new ShowTemperatureUnit setting is correctly added with proper YAML indentation and a default value consistent with the JSON example and backend implementation.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@3rob3 3rob3 added the enhancement New feature or request label Jan 14, 2026
@3rob3
Copy link
Collaborator

3rob3 commented Jan 15, 2026

I'm good with this too.

@JW-CH
Copy link
Collaborator

JW-CH commented Jan 15, 2026

I'm good with this too.

Sorry, I lack behind with review. Will probably find time this weekend.

Copy link
Collaborator

@3rob3 3rob3 left a comment

Choose a reason for hiding this comment

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

Can you update the Settings.example.json, Settings.example.yml, and example.env with this new setting please?

@nopoz nopoz requested a review from 3rob3 January 16, 2026 20:38
Copy link
Collaborator

@3rob3 3rob3 left a comment

Choose a reason for hiding this comment

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

thanks!

@JW-CH JW-CH self-requested a review January 17, 2026 21:52
public string Style => _delegate.Style;
public string? BaseFontSize => _delegate.BaseFontSize;
public bool ShowWeatherDescription => _delegate.ShowWeatherDescription;
public bool ShowTemperatureUnit => true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this default true in the v1 settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants