Skip to content

Fix health analyzer#677

Open
JrInventor05 wants to merge 2 commits into
corvax-team:offbrand-devfrom
JrInventor05:port-analyzer-fix
Open

Fix health analyzer#677
JrInventor05 wants to merge 2 commits into
corvax-team:offbrand-devfrom
JrInventor05:port-analyzer-fix

Conversation

@JrInventor05

@JrInventor05 JrInventor05 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Описание PR

Починены кнопки помощи, возращены метки оценки состояния.

Почему / Баланс

фикс

Технические детали

Медиа

#440

Требования

Согласие с условиями

  • Я согласен с условиями LICENSE и CLA.

Критические изменения

Список изменений

Summary by CodeRabbit

  • New Features

    • Health metrics now display rating indicators alongside vital values (Brain Health, Heart Rate, Blood Pressure, SpO2, EtCO2, and others)
    • Expanded health rating scale to include new "Awful" tier for critical conditions
  • Style

    • Updated health analyzer button styling and increased button size for better visibility
    • Restyled tooltip panels for improved visual consistency

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds seven MetricRanking rating fields to WoundableHealthAnalyzerData, extends MetricRanking with Awful=4/Dangerous=5, updates TakeSample to compute and populate those ratings, threads them through the client Populate localization calls, updates vital button and tooltip style classes in XAML, and defines a Russian locale rating formatter.

Changes

Health Analyzer Rating Display

Layer / File(s) Summary
MetricRanking enum, new data fields, and rating computation
Content.Shared/_Offbrand/Wounds/WoundableHealthAnalyzer.cs
WoundableHealthAnalyzerData gains seven MetricRanking fields; enum adds Awful = 4 and shifts Dangerous to 5; rating helpers widen to a 0–5 scale; TakeSample computes etco2/spo2 intermediates and populates all new rating fields.
Client Populate rating args, button styles, and tooltip style classes
Content.Client/HealthAnalyzer/UI/HealthAnalyzerControl.xaml, Content.Client/HealthAnalyzer/UI/HealthAnalyzerControl.xaml.cs, Content.Client/HealthAnalyzer/UI/Tooltips/*.xaml
Populate passes each new *Rating field as a localization argument alongside existing value(s); vital TextureButtons switch to windowHelpButton style at Scale 1.3 1.3; all three tooltip PanelContainers switch StyleClasses from tooltipBox to TooltipPanel.
Russian locale rating formatter and updated metric value strings
Resources/Locale/ru-RU/_Offbrand/health-analyzer.ftl
Defines health-analyzer-rating Fluent term mapping $rating to colored Russian descriptors with fallback; updates brain/heart/lung health, heart rate, blood pressure, SpO2, and EtCO2 value strings to append the formatted rating.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • corvax-team/ss14-wl#440: Modifies the same health analyzer UI button styling (windowHelpButton) and health metric localization flow for the same set of vitals (brain/heart/lung/SpO2/EtCO2) in the analyzer window.

Suggested reviewers

  • tau27

Poem

🐇 Hop hop, the vitals glow with color bright,
Each rating now displayed — awful, critical, or right!
The buttons grew from 0.3 to 1.3 scale,
Tooltips swapped their boxes without fail.
In Russian hues the rankings sweetly sing,
A healthy patient — now that's everything! 🩺

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive The title 'Fix health analyzer' is vague and non-descriptive, using a generic term 'Fix' without specifying what aspect of the health analyzer is being fixed or improved. Replace the vague title with a more specific description of the changes, such as 'Restore health analyzer help buttons and status assessment labels' or 'Update health analyzer UI styling and add rating metrics'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@JrInventor05

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Resources/Locale/ru-RU/_Offbrand/health-analyzer.ftl`:
- Around line 1-9: The variant keys in the health-analyzer-rating Fluent
selector use lowercase names (good, okay, poor, bad, awful, dangerous) but the
MetricRanking enum values are defined in PascalCase (Good, Okay, Poor, Bad,
Awful, Dangerous). Since Fluent selectors are case-sensitive and the UI passes
the enum's ToString() output which returns PascalCase, the keys will never match
and all ratings will fall through to the *[other] case. Fix this by changing all
variant keys in the health-analyzer-rating selector from lowercase to
PascalCase: [good] becomes [Good], [okay] becomes [Okay], [poor] becomes [Poor],
[bad] becomes [Bad], [awful] becomes [Awful], and [dangerous] becomes
[Dangerous] to match the actual enum values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 76302783-2786-4563-8ae4-60c44c97d4ce

📥 Commits

Reviewing files that changed from the base of the PR and between 98aad6a and 6cc42e5.

📒 Files selected for processing (7)
  • Content.Client/HealthAnalyzer/UI/HealthAnalyzerControl.xaml
  • Content.Client/HealthAnalyzer/UI/HealthAnalyzerControl.xaml.cs
  • Content.Client/HealthAnalyzer/UI/Tooltips/StaticTooltip.xaml
  • Content.Client/HealthAnalyzer/UI/Tooltips/TemperatureTooltip.xaml
  • Content.Client/HealthAnalyzer/UI/Tooltips/UpdatableTooltip.xaml
  • Content.Shared/_Offbrand/Wounds/WoundableHealthAnalyzer.cs
  • Resources/Locale/ru-RU/_Offbrand/health-analyzer.ftl

Comment thread Resources/Locale/ru-RU/_Offbrand/health-analyzer.ftl
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.

1 participant