Skip to content

fix: update label, translation - #1045

Merged
scheidtdav merged 5 commits into
devfrom
fix/update-luftdaten-label
Aug 13, 2026
Merged

fix: update label, translation#1045
scheidtdav merged 5 commits into
devfrom
fix/update-luftdaten-label

Conversation

@jona159

@jona159 jona159 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Dependency upgrade
  • Bug fix (non-breaking change)
  • Breaking change
    • e.g. a fixed bug or new feature that may break something else
  • New feature
  • Code quality improvements
    • e.g. refactoring, documentation, tests, tooling, ...

Implementation

Checklist

  • I gave this pull request a meaningful title
  • My pull request is targeting the dev branch
  • I have added documentation to my code
  • I have deleted code that I have commented out

Additional Information

  • This PR closes #

Summary by CodeRabbit

  • Improvements
    • Updated device displays to show “Sensor.Community” for Luftdaten.info devices.
    • Retained the original device name when no display label is available.
  • Localization
    • Updated the German translation of “Device ID” to “Geräte ID”.

@jona159 jona159 linked an issue Aug 3, 2026 that may be closed by this pull request
@jona159 jona159 mentioned this pull request Aug 3, 2026
3 tasks
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 65.97% 2242 / 3398
🔵 Statements 64.51% 2316 / 3590
🔵 Functions 63.21% 433 / 685
🔵 Branches 50.79% 1080 / 2126
File CoverageNo changed files found.
Generated in workflow #2863 for commit c174804 by the Vitest Coverage Report Action

@scheidtdav
scheidtdav enabled auto-merge (squash) August 11, 2026 09:02
@scheidtdav
scheidtdav disabled auto-merge August 11, 2026 09:03
@scheidtdav

Copy link
Copy Markdown
Member

@jona159 unfortunately I saw @zven finding on the issue after approval.
I can confirm it still says "Model: luftdaten.info" on the last page of device setup, so this is not ready to merge yet.

I suppose the reason is that we are using the name of the device as a sort of key on the model as well, essentially mixing up label and id.
I think we should probably clean that up for good. Due to legacy reasons, we cannot easily get rid of the "luftdaten.info" as a key (I think this would require a database migration too. Don't think we should mix that right now), but certainly as a label.
What do you think?

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The device views now display Sensor.Community for luftdaten.info devices. Other model values remain unchanged. The German device_id translation now reads “Geräte ID”.

Changes

Device display labels

Layer / File(s) Summary
Device label display
app/components/device/new/device-info.tsx, app/components/device/new/summary-info.tsx
The luftdaten.info device uses Sensor.Community in headings, image alt text, and the Device summary. Other models retain their existing labels.

German localization

Layer / File(s) Summary
German device ID translation
public/locales/de/data-table.json
The German device_id translation changes from “Device ID” to “Geräte ID”.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the label and translation updates in the pull request.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/update-luftdaten-label

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/components/device/new/summary-info.tsx (1)

10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse the device definition as the single source of truth for labels.

app/components/device/new/device-info.tsx now stores Sensor.Community on the luftdaten.info device definition, but this file repeats the mapping. If a label changes or another device gains a label, the selection view and summary can diverge. Reuse a shared label resolver while preserving formData.model as the stored key.

🤖 Prompt for 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.

In `@app/components/device/new/summary-info.tsx` around lines 10 - 11, Update the
modelLabel logic in the summary component to use the shared device-definition
label resolver from device-info.tsx instead of repeating the luftdaten.info
mapping. Keep formData.model unchanged as the stored key, and preserve the
resolved display label for the summary.
🤖 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.

Nitpick comments:
In `@app/components/device/new/summary-info.tsx`:
- Around line 10-11: Update the modelLabel logic in the summary component to use
the shared device-definition label resolver from device-info.tsx instead of
repeating the luftdaten.info mapping. Keep formData.model unchanged as the
stored key, and preserve the resolved display label for the summary.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f83afe0-f1c8-4cde-bb04-c6f3be8704ab

📥 Commits

Reviewing files that changed from the base of the PR and between 5635799 and a358b22.

📒 Files selected for processing (3)
  • app/components/device/new/device-info.tsx
  • app/components/device/new/summary-info.tsx
  • public/locales/de/data-table.json

@scheidtdav
scheidtdav enabled auto-merge (squash) August 13, 2026 07:54
@scheidtdav
scheidtdav merged commit 309d849 into dev Aug 13, 2026
7 checks passed
@scheidtdav
scheidtdav deleted the fix/update-luftdaten-label branch August 13, 2026 07:59
@coderabbitai coderabbitai Bot mentioned this pull request Aug 13, 2026
9 tasks
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.

update naming of Luftdaten.Info to Sensor.Community

2 participants