fix: update label, translation - #1045
Conversation
Coverage Report
File CoverageNo changed files found. |
|
@jona159 unfortunately I saw @zven finding on the issue after approval. 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. |
📝 WalkthroughWalkthroughThe device views now display ChangesDevice display labels
German localization
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/components/device/new/summary-info.tsx (1)
10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReuse the device definition as the single source of truth for labels.
app/components/device/new/device-info.tsxnow storesSensor.Communityon theluftdaten.infodevice 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 preservingformData.modelas 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
📒 Files selected for processing (3)
app/components/device/new/device-info.tsxapp/components/device/new/summary-info.tsxpublic/locales/de/data-table.json
Type of Change
Implementation
Checklist
devbranchAdditional Information
Summary by CodeRabbit