Skip to content

Fix tech debt from PR #15 (Muss + Sollte)#17

Merged
rdmueller merged 5 commits intoLLM-Coding:mainfrom
raifdmueller:fix/tech-debt-pr15
Mar 16, 2026
Merged

Fix tech debt from PR #15 (Muss + Sollte)#17
rdmueller merged 5 commits intoLLM-Coding:mainfrom
raifdmueller:fix/tech-debt-pr15

Conversation

@raifdmueller
Copy link
Contributor

@raifdmueller raifdmueller commented Mar 16, 2026

Summary

  • Remove dead code (commented-out duplicates, unused getOffsetPosition())
  • Internationalize hardcoded English strings ("Unlocks at Tier", "locked")
  • Replace hardcoded tooltip colors (#1e293b, #94a3b8, #475569) with CSS variables for proper light/dark theme support
  • Remove !important from card hover CSS
  • Increase max-height from 600px to 2000px to prevent content clipping
  • Compute maxR from size instead of hardcoded value

Test plan

  • Build passes (npm run build)
  • Verify tooltip renders correctly in both light and dark theme
  • Verify i18n: switch to DE, check "Verfügbar ab Tier X" and "gesperrt" appear
  • Verify mitigation cards expand fully without clipping

Closes #16

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Radar chart now scales dynamically based on component size.
    • Increased maximum expanded view height for better content visibility.
  • Bug Fixes

    • Fixed rendering flow in radar chart to prevent display issues.
  • Style

    • Replaced hardcoded colors with theme-based styling for improved consistency.
    • Removed hover border accent from card components.
  • Refactor

    • Enhanced localization support for UI labels and messaging.
    • Removed unused legacy code.

raifdmueller and others added 4 commits March 16, 2026 20:25
…used function)

Closes part of LLM-Coding#16 (Muss: Code-Hygiene)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add i18n keys for "locked", "unlocksAtTier" in both DE and EN.
Closes part of LLM-Coding#16 (Muss: i18n)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#1e293b → var(--bg-card), #94a3b8 → var(--text-secondary),
#475569 → var(--text-muted). Tooltip now respects light/dark theme.
Closes part of LLM-Coding#16 (Sollte: CSS-Variablen)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove border-width !important from card hover
- Increase measuresWrapper max-height to 2000px (prevents clipping)
- Compute maxR from size instead of hardcoded 130
Closes LLM-Coding#16

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This pull request addresses technical debt cleanup from PR #15 by removing unused code, eliminating hardcoded strings through internationalization, replacing hardcoded colors with CSS variables, and adjusting responsive styling. Changes affect component text rendering, radar chart geometry and theming, and remove deprecated utility functions and commented code blocks.

Changes

Cohort / File(s) Summary
Internationalization
src/i18n.js
Added locked and unlocksAtTier(tier) translation keys to both German and English locales for use in component messaging.
Component Text Updates
src/components/MitigationCard.jsx, src/components/RiskRadar.jsx
Replaced hardcoded English strings with localized i18n calls: "Unlocks at Tier X" now uses t.unlocksAtTier(group.tier), and "locked" count uses t.locked.
Styling Adjustments
src/components/MitigationCard.module.css
Removed !important flag from hover border-width and increased .measuresWrapperOpen max-height from 600px to 2000px for expanded content.
Radar Chart Theming & Sizing
src/components/RadarChart.jsx
Replaced hardcoded tooltip/legend colors (#1e293b, #94a3b8, #475569) with CSS variables (--bg-card, --text-secondary, --text-muted). Made radar scale responsive by calculating maxR from component size instead of fixed 130px value. Moved early return guard after all hooks.
Code Cleanup
src/constants.js
Removed commented-out legacy export definitions (VERSION, TIER_BG, TYPE_COLORS).
Utility Removal
src/utils.js
Removed unused getOffsetPosition() function and associated commented helper declarations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #15: The source of the technical debt being addressed; both PRs modify the same UI components (MitigationCard, RadarChart, RiskRadar) and establish the internationalization keys that this PR now utilizes.

Poem

🐰 Hopping through the code, we clean with care,
Comments out, unused functions rare,
Colors now dance with variables true,
Translations bloom in German and English too!
Tech debt hops away—our stack feels light! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately reflects the main objective of the PR: addressing technical debt from PR #15, though it uses German terms which may not be immediately clear to non-German speakers.
Linked Issues check ✅ Passed All coding requirements from issue #16 Muss/Sollte tasks are met: commented code removed, unused function deleted, hardcoded strings internationalized, tooltip colors replaced with CSS variables, !important removed, measuresWrapper expanded, and maxR computed from size.
Out of Scope Changes check ✅ Passed All changes align with issue #16 requirements; however, npm audit fix vulnerability fix is a minor addition not explicitly mentioned in the issue's stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rdmueller rdmueller merged commit 50e2805 into LLM-Coding:main Mar 16, 2026
3 of 5 checks passed
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.

Tech Debt: Frontend-Updates aus PR #15 aufräumen

2 participants