Repository navigation
refactor: Simplify-Audit (toter Code, Helper-Reuse, Effizienz) - #356
Merged
Merged
Conversation
…Effizienz Toter Code: AnimatedHero (+Test/Mock), constants/WebAccessibility.ts, ungenutzte Imports/Handler in game.tsx/settings.tsx, TOTAL_STEPS, unerreichbare `?? Colors.surface`-Fallbacks, ungenutzte Colors.accents-Tokens. Reuse: getTotalStars (QuickStatsCards), getLocalDateKey (DailyChallenge- Manager, SessionTracker), SITE_URL/PLAY_STORE_URL aus ExternalLinks (_layout), Colors.difficulty statt Hex-Kopien (RatingManager, Badge), Colors.accents.dailyChallenge statt Literal (gallery). Effizienz: Level-Screen liest Progress einmal statt 20x; SettingsModal ein getSettings() statt zwei; saveSettings schreibt parallel; LevelImageDisplay memoisiert den SVG-Baum (kein Rebuild pro Timer-Tick); native Canvas memoisiert fertige Striche (kein Rebuild pro Touch-Move); Web-Canvas-Kontext mit willReadFrequently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017fxbsNALrmwMj7LGMDPLw2
🔀 Mergeability-Report✅ Konfliktfrei mergebar ( CI-Checks: ✅ keine fehlgeschlagenen Checks ⏳ 🔐 Docs Privacy Check Merge-Checkliste
Kostenlos generiert von reusable-mergeability.yml · keine API-Kosten · review-gate: |
4 of 7 tasks
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Beschreibung
Wiederkehrender
/simplify-Durchlauf (CLAUDE.md [SIMPLIFY-AUDIT]) überapp/,components/,services/,constants/. Enthält nur kleine Refactorings, die das Verhalten nicht ändern sollen. Unsichere Funde sind ausgelassen und unten aufgelistet.Toter Code entfernt
components/AnimatedHero.tsx(+ Test und Mock), wird nirgends gerendertconstants/WebAccessibility.ts, hatte keine einzige Referenzapp/game.tsxungenutzte Imports (Platform,getDifficultyForLevel, Default-DrawingCanvas) und der HandlerhandleRestartCurrentLevel; inapp/settings.tsxungenutzte Imports; inTutorialOverlaydie KonstanteTOTAL_STEPScolors.surface ?? Colors.surface: Der Fallback kann nie greifen, weilsurfaceein Pflichtfeld ist (BadgesModal, ParentDashboard)Colors.accents.dailyChallengeTextundstreakBadgewerden seit Startseite entschlacken, ruhiger Merke-Timer, Icon-Farbe & -Assets vereinheitlichen #354 nicht mehr verwendetVorhandene Helfer statt Kopien
getTotalStars()(MascotManager) inQuickStatsCardsgetLocalDateKey()(StreakManager) inDailyChallengeManagerundSessionTrackerSITE_URLundPLAY_STORE_URLausconstants/ExternalLinksinapp/_layout.tsxColors.difficultystatt Hex-Kopien inRatingManager.getStarColorundBadgeColors.accents.dailyChallengestatt des Literals#F59E0Bingallery.tsxEffizienz
getProgress()statt 20×getLevelRating()(jeweils ein Storage-Read plus JSON-Parse)SettingsModal: eingetSettings()statt zweimalgetSetting()(12 → 6 Reads)saveSettings: die 6 Writes laufen parallel statt nacheinanderLevelImageDisplay: Der SVG-Baum inkl. Outline-/Dark-Transformation wird gecacht und nicht mehr bei jedem Timer-Tick der Merke-Phase neu gebautgetContext('2d', { willReadFrequently: true })auch im Redraw-Effekt. Der erste Aufruf legt die Kontext-Optionen fest, deshalb wurde das Flag beim Flood-Fill bisher ignoriertBewusst ausgelassen (Folge-Issues / Produktentscheidung)
Mascotbekommt nirgendsaccessoryübergeben, der Unlock-Toast kündigt also Accessoires an, die nie erscheinen. Das ist eine Produktentscheidung.restartFromLevel1setzt im Gegensatz zu den anderen Reset-PfadensavedToGallerynicht zurück. Das wäre eine Verhaltensänderung.ResultPhaseruftgetRatingFeedbackim Render auf und rückt dabei Rotationszähler weiter. Der Text kann sich deshalb beim Re-Render ändern.ThemeColors-Tokens, die niemand liest;platform.tsmit Funktionen, die nur Tests verwenden;Button.tsx, das nur Tests verwenden.Art der Änderung
Cross-Platform Kompatibilität
Betrifft dieser PR plattformspezifischen Code? Ja:
DrawingCanvas.native.tsx(Memoisierung) undDrawingCanvas.web.tsx(Kontext-Option). Keine neuen Web-APIs.Testing Checklist
expo export --platform web)npm run test:ci: 454/454 grün (4 Tests weniger durch das entfernte AnimatedHero), Coverage-Schwellen erfülltvalidate:svg-counts🤖 Generated with Claude Code
https://claude.ai/code/session_017fxbsNALrmwMj7LGMDPLw2
Generated by Claude Code