From afa8089897c062121d163f34f355724a0be645e1 Mon Sep 17 00:00:00 2001 From: edithatogo <15080672+edithatogo@users.noreply.github.com> Date: Wed, 29 Jul 2026 00:59:49 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20[code=20health=20improvement]=20?= =?UTF-8?q?Refactor=20game=20theory=20labs=20for=20better=20maintainabilit?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🎯 What: Refactored `render_claims_audit_game_lab` and `render_coordination_game_lab` by extracting explainer text, controls, payload computations, and charts into smaller, composable helper functions. 💡 Why: These functions were extremely long, combining Streamlit UI definition, data processing, and Plotly graph generation. Splitting them into distinct helpers significantly improves readability, reusability, and testing capabilities. ✅ Verification: Confirmed syntax is correct, mypy type checks and ruff format checks pass, and the file imports successfully in python without errors. ✨ Result: Code is modularized into `_render_claims_audit_game_explainer`, `_compute_claims_audit_game_payoffs`, etc.