feat: social share preview images and fix duplicate URL#142
Conversation
- Fix duplicate URL bug: getShareText() no longer includes URL (was being appended twice). shareResults() now builds fullText with ?r= param and passes it as single text to navigator.share() to avoid platform-dependent URL duplication. - Add OG meta tag overrides: when ?r= query param is present, serve language-specific share preview images and challenge text as og:title and og:description. - Make og:image overridable in _base_head.html via template variable. - Parse ?r= param in Flask language() route and pass to template. - Add generate_share_images.py script and share_translations.json with challenge text in 65 languages. - Add 455 pre-generated 1200x630 PNG share images (all languages x results).
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (67)
📝 WalkthroughWalkthroughPR adds social sharing features by modifying the frontend share flow to include a result query parameter in shared URLs, introducing a new Python script to pre-generate PNG share images across multiple languages with RTL text support, updating the backend to parse and validate the result parameter, and providing localized share message translations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
scripts/generate_share_images.py (3)
77-77: Addstrict=Truetozip()for safety.The static analyzer flagged this: if
TILE_LETTERSandTILE_PATTERNever have different lengths, the mismatch would be silently ignored. Addingstrict=Truewill raise aValueErrorif lengths differ.🔧 Proposed fix
- for i, (letter, pattern) in enumerate(zip(TILE_LETTERS, TILE_PATTERN)): + for i, (letter, pattern) in enumerate(zip(TILE_LETTERS, TILE_PATTERN, strict=True)):🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/generate_share_images.py` at line 77, Update the loop that enumerates pairs from TILE_LETTERS and TILE_PATTERN to use zip(..., strict=True) so mismatched lengths raise a ValueError; specifically modify the enumerate(zip(TILE_LETTERS, TILE_PATTERN)) usage in the generate_share_images.py loop to enumerate(zip(TILE_LETTERS, TILE_PATTERN, strict=True)) to ensure the lengths of TILE_LETTERS and TILE_PATTERN are enforced at runtime.
220-265: Consider adding error handling for missing translations or configs.If a language directory exists but lacks
language_config.json, or if a translation is missing entirely, the script continues with fallbacks. This is acceptable, but logging warnings would help catch missing translations during generation.📝 Optional: Add logging for missing translations
+import logging + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + def main(): # Load translations with open(TRANSLATIONS_PATH) as f: translations = json.load(f) # ... existing code ... for lang_code in target_langs: name_native = lang_names.get(lang_code, lang_code) trans = translations.get(lang_code, translations.get("en", {})) + if lang_code not in translations: + logger.warning(f"No translation for {lang_code}, using English fallback")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/generate_share_images.py` around lines 220 - 265, In main(), add warning logs when expected language assets are missing: when iterating LANG_DIR if language_config.json is absent log a warning mentioning the lang_code and that name_native fell back to lang_code (reference lang_names and language_config.json), and after loading TRANSLATIONS_PATH check for missing language entries and when trans falls back to "en" or uses default strings for "win"/"lose" emit a warning that translations for lang_code are incomplete (reference translations, trans, and the use of "win"/"lose"). Use the existing logging facility (or import logging) to emit these warnings so they appear during generation without changing fallback behavior.
142-149: Simplify redundant score color logic.The conditions can be simplified —
result == "1"is already covered byint(result) <= 3, and the last two branches both setYELLOW.♻️ Suggested simplification
if result == "x": score_text = "X/6" score_color = GRAY else: score_text = f"{result}/6" - if result == "1": - score_color = GREEN - elif int(result) <= 3: - score_color = GREEN - elif int(result) <= 5: - score_color = YELLOW - else: - score_color = YELLOW + score_color = GREEN if int(result) <= 3 else YELLOW🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/generate_share_images.py` around lines 142 - 149, The current branching for assigning score_color is redundant; convert result to an integer once (use the variable result) and replace the multiple branches (including the unnecessary result == "1" check) with a simple check: if int_result <= 3 set score_color = GREEN, otherwise set score_color = YELLOW; update the logic around the score_color assignment (variables: result, score_color, constants GREEN and YELLOW) to remove the duplicate branches and avoid repeated int() conversions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/generate_share_images.py`:
- Line 77: Update the loop that enumerates pairs from TILE_LETTERS and
TILE_PATTERN to use zip(..., strict=True) so mismatched lengths raise a
ValueError; specifically modify the enumerate(zip(TILE_LETTERS, TILE_PATTERN))
usage in the generate_share_images.py loop to enumerate(zip(TILE_LETTERS,
TILE_PATTERN, strict=True)) to ensure the lengths of TILE_LETTERS and
TILE_PATTERN are enforced at runtime.
- Around line 220-265: In main(), add warning logs when expected language assets
are missing: when iterating LANG_DIR if language_config.json is absent log a
warning mentioning the lang_code and that name_native fell back to lang_code
(reference lang_names and language_config.json), and after loading
TRANSLATIONS_PATH check for missing language entries and when trans falls back
to "en" or uses default strings for "win"/"lose" emit a warning that
translations for lang_code are incomplete (reference translations, trans, and
the use of "win"/"lose"). Use the existing logging facility (or import logging)
to emit these warnings so they appear during generation without changing
fallback behavior.
- Around line 142-149: The current branching for assigning score_color is
redundant; convert result to an integer once (use the variable result) and
replace the multiple branches (including the unnecessary result == "1" check)
with a simple check: if int_result <= 3 set score_color = GREEN, otherwise set
score_color = YELLOW; update the logic around the score_color assignment
(variables: result, score_color, constants GREEN and YELLOW) to remove the
duplicate branches and avoid repeated int() conversions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7905e0d3-8a4a-4c7f-ac0d-d1d7287c96cb
⛔ Files ignored due to path filters (296)
webapp/static/images/share/ar_1.pngis excluded by!**/*.pngwebapp/static/images/share/ar_2.pngis excluded by!**/*.pngwebapp/static/images/share/ar_3.pngis excluded by!**/*.pngwebapp/static/images/share/ar_4.pngis excluded by!**/*.pngwebapp/static/images/share/ar_5.pngis excluded by!**/*.pngwebapp/static/images/share/ar_6.pngis excluded by!**/*.pngwebapp/static/images/share/ar_x.pngis excluded by!**/*.pngwebapp/static/images/share/az_1.pngis excluded by!**/*.pngwebapp/static/images/share/az_2.pngis excluded by!**/*.pngwebapp/static/images/share/az_3.pngis excluded by!**/*.pngwebapp/static/images/share/az_4.pngis excluded by!**/*.pngwebapp/static/images/share/az_5.pngis excluded by!**/*.pngwebapp/static/images/share/az_6.pngis excluded by!**/*.pngwebapp/static/images/share/az_x.pngis excluded by!**/*.pngwebapp/static/images/share/bg_1.pngis excluded by!**/*.pngwebapp/static/images/share/bg_2.pngis excluded by!**/*.pngwebapp/static/images/share/bg_3.pngis excluded by!**/*.pngwebapp/static/images/share/bg_4.pngis excluded by!**/*.pngwebapp/static/images/share/bg_5.pngis excluded by!**/*.pngwebapp/static/images/share/bg_6.pngis excluded by!**/*.pngwebapp/static/images/share/bg_x.pngis excluded by!**/*.pngwebapp/static/images/share/br_1.pngis excluded by!**/*.pngwebapp/static/images/share/br_2.pngis excluded by!**/*.pngwebapp/static/images/share/br_3.pngis excluded by!**/*.pngwebapp/static/images/share/br_4.pngis excluded by!**/*.pngwebapp/static/images/share/br_5.pngis excluded by!**/*.pngwebapp/static/images/share/br_6.pngis excluded by!**/*.pngwebapp/static/images/share/br_x.pngis excluded by!**/*.pngwebapp/static/images/share/ca_1.pngis excluded by!**/*.pngwebapp/static/images/share/ca_2.pngis excluded by!**/*.pngwebapp/static/images/share/ca_3.pngis excluded by!**/*.pngwebapp/static/images/share/ca_4.pngis excluded by!**/*.pngwebapp/static/images/share/ca_5.pngis excluded by!**/*.pngwebapp/static/images/share/ca_6.pngis excluded by!**/*.pngwebapp/static/images/share/ca_x.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_1.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_2.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_3.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_4.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_5.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_6.pngis excluded by!**/*.pngwebapp/static/images/share/ckb_x.pngis excluded by!**/*.pngwebapp/static/images/share/cs_1.pngis excluded by!**/*.pngwebapp/static/images/share/cs_2.pngis excluded by!**/*.pngwebapp/static/images/share/cs_3.pngis excluded by!**/*.pngwebapp/static/images/share/cs_4.pngis excluded by!**/*.pngwebapp/static/images/share/cs_5.pngis excluded by!**/*.pngwebapp/static/images/share/cs_6.pngis excluded by!**/*.pngwebapp/static/images/share/cs_x.pngis excluded by!**/*.pngwebapp/static/images/share/da_1.pngis excluded by!**/*.pngwebapp/static/images/share/da_2.pngis excluded by!**/*.pngwebapp/static/images/share/da_3.pngis excluded by!**/*.pngwebapp/static/images/share/da_4.pngis excluded by!**/*.pngwebapp/static/images/share/da_5.pngis excluded by!**/*.pngwebapp/static/images/share/da_6.pngis excluded by!**/*.pngwebapp/static/images/share/da_x.pngis excluded by!**/*.pngwebapp/static/images/share/de_1.pngis excluded by!**/*.pngwebapp/static/images/share/de_2.pngis excluded by!**/*.pngwebapp/static/images/share/de_3.pngis excluded by!**/*.pngwebapp/static/images/share/de_4.pngis excluded by!**/*.pngwebapp/static/images/share/de_5.pngis excluded by!**/*.pngwebapp/static/images/share/de_6.pngis excluded by!**/*.pngwebapp/static/images/share/de_x.pngis excluded by!**/*.pngwebapp/static/images/share/el_1.pngis excluded by!**/*.pngwebapp/static/images/share/el_2.pngis excluded by!**/*.pngwebapp/static/images/share/el_3.pngis excluded by!**/*.pngwebapp/static/images/share/el_4.pngis excluded by!**/*.pngwebapp/static/images/share/el_5.pngis excluded by!**/*.pngwebapp/static/images/share/el_6.pngis excluded by!**/*.pngwebapp/static/images/share/el_x.pngis excluded by!**/*.pngwebapp/static/images/share/en_1.pngis excluded by!**/*.pngwebapp/static/images/share/en_2.pngis excluded by!**/*.pngwebapp/static/images/share/en_3.pngis excluded by!**/*.pngwebapp/static/images/share/en_4.pngis excluded by!**/*.pngwebapp/static/images/share/en_5.pngis excluded by!**/*.pngwebapp/static/images/share/en_6.pngis excluded by!**/*.pngwebapp/static/images/share/en_x.pngis excluded by!**/*.pngwebapp/static/images/share/eo_1.pngis excluded by!**/*.pngwebapp/static/images/share/eo_2.pngis excluded by!**/*.pngwebapp/static/images/share/eo_3.pngis excluded by!**/*.pngwebapp/static/images/share/eo_4.pngis excluded by!**/*.pngwebapp/static/images/share/eo_5.pngis excluded by!**/*.pngwebapp/static/images/share/eo_6.pngis excluded by!**/*.pngwebapp/static/images/share/eo_x.pngis excluded by!**/*.pngwebapp/static/images/share/es_1.pngis excluded by!**/*.pngwebapp/static/images/share/es_2.pngis excluded by!**/*.pngwebapp/static/images/share/es_3.pngis excluded by!**/*.pngwebapp/static/images/share/es_4.pngis excluded by!**/*.pngwebapp/static/images/share/es_5.pngis excluded by!**/*.pngwebapp/static/images/share/es_6.pngis excluded by!**/*.pngwebapp/static/images/share/es_x.pngis excluded by!**/*.pngwebapp/static/images/share/et_1.pngis excluded by!**/*.pngwebapp/static/images/share/et_2.pngis excluded by!**/*.pngwebapp/static/images/share/et_3.pngis excluded by!**/*.pngwebapp/static/images/share/et_4.pngis excluded by!**/*.pngwebapp/static/images/share/et_5.pngis excluded by!**/*.pngwebapp/static/images/share/et_6.pngis excluded by!**/*.pngwebapp/static/images/share/et_x.pngis excluded by!**/*.pngwebapp/static/images/share/eu_1.pngis excluded by!**/*.pngwebapp/static/images/share/eu_2.pngis excluded by!**/*.pngwebapp/static/images/share/eu_3.pngis excluded by!**/*.pngwebapp/static/images/share/eu_4.pngis excluded by!**/*.pngwebapp/static/images/share/eu_5.pngis excluded by!**/*.pngwebapp/static/images/share/eu_6.pngis excluded by!**/*.pngwebapp/static/images/share/eu_x.pngis excluded by!**/*.pngwebapp/static/images/share/fa_1.pngis excluded by!**/*.pngwebapp/static/images/share/fa_2.pngis excluded by!**/*.pngwebapp/static/images/share/fa_3.pngis excluded by!**/*.pngwebapp/static/images/share/fa_4.pngis excluded by!**/*.pngwebapp/static/images/share/fa_5.pngis excluded by!**/*.pngwebapp/static/images/share/fa_6.pngis excluded by!**/*.pngwebapp/static/images/share/fa_x.pngis excluded by!**/*.pngwebapp/static/images/share/fi_1.pngis excluded by!**/*.pngwebapp/static/images/share/fi_2.pngis excluded by!**/*.pngwebapp/static/images/share/fi_3.pngis excluded by!**/*.pngwebapp/static/images/share/fi_4.pngis excluded by!**/*.pngwebapp/static/images/share/fi_5.pngis excluded by!**/*.pngwebapp/static/images/share/fi_6.pngis excluded by!**/*.pngwebapp/static/images/share/fi_x.pngis excluded by!**/*.pngwebapp/static/images/share/fo_1.pngis excluded by!**/*.pngwebapp/static/images/share/fo_2.pngis excluded by!**/*.pngwebapp/static/images/share/fo_3.pngis excluded by!**/*.pngwebapp/static/images/share/fo_4.pngis excluded by!**/*.pngwebapp/static/images/share/fo_5.pngis excluded by!**/*.pngwebapp/static/images/share/fo_6.pngis excluded by!**/*.pngwebapp/static/images/share/fo_x.pngis excluded by!**/*.pngwebapp/static/images/share/fr_1.pngis excluded by!**/*.pngwebapp/static/images/share/fr_2.pngis excluded by!**/*.pngwebapp/static/images/share/fr_3.pngis excluded by!**/*.pngwebapp/static/images/share/fr_4.pngis excluded by!**/*.pngwebapp/static/images/share/fr_5.pngis excluded by!**/*.pngwebapp/static/images/share/fr_6.pngis excluded by!**/*.pngwebapp/static/images/share/fr_x.pngis excluded by!**/*.pngwebapp/static/images/share/fur_1.pngis excluded by!**/*.pngwebapp/static/images/share/fur_2.pngis excluded by!**/*.pngwebapp/static/images/share/fur_3.pngis excluded by!**/*.pngwebapp/static/images/share/fur_4.pngis excluded by!**/*.pngwebapp/static/images/share/fur_5.pngis excluded by!**/*.pngwebapp/static/images/share/fur_6.pngis excluded by!**/*.pngwebapp/static/images/share/fur_x.pngis excluded by!**/*.pngwebapp/static/images/share/fy_1.pngis excluded by!**/*.pngwebapp/static/images/share/fy_2.pngis excluded by!**/*.pngwebapp/static/images/share/fy_3.pngis excluded by!**/*.pngwebapp/static/images/share/fy_4.pngis excluded by!**/*.pngwebapp/static/images/share/fy_5.pngis excluded by!**/*.pngwebapp/static/images/share/fy_6.pngis excluded by!**/*.pngwebapp/static/images/share/fy_x.pngis excluded by!**/*.pngwebapp/static/images/share/ga_1.pngis excluded by!**/*.pngwebapp/static/images/share/ga_2.pngis excluded by!**/*.pngwebapp/static/images/share/ga_3.pngis excluded by!**/*.pngwebapp/static/images/share/ga_4.pngis excluded by!**/*.pngwebapp/static/images/share/ga_5.pngis excluded by!**/*.pngwebapp/static/images/share/ga_6.pngis excluded by!**/*.pngwebapp/static/images/share/ga_x.pngis excluded by!**/*.pngwebapp/static/images/share/gd_1.pngis excluded by!**/*.pngwebapp/static/images/share/gd_2.pngis excluded by!**/*.pngwebapp/static/images/share/gd_3.pngis excluded by!**/*.pngwebapp/static/images/share/gd_4.pngis excluded by!**/*.pngwebapp/static/images/share/gd_5.pngis excluded by!**/*.pngwebapp/static/images/share/gd_6.pngis excluded by!**/*.pngwebapp/static/images/share/gd_x.pngis excluded by!**/*.pngwebapp/static/images/share/gl_1.pngis excluded by!**/*.pngwebapp/static/images/share/gl_2.pngis excluded by!**/*.pngwebapp/static/images/share/gl_3.pngis excluded by!**/*.pngwebapp/static/images/share/gl_4.pngis excluded by!**/*.pngwebapp/static/images/share/gl_5.pngis excluded by!**/*.pngwebapp/static/images/share/gl_6.pngis excluded by!**/*.pngwebapp/static/images/share/gl_x.pngis excluded by!**/*.pngwebapp/static/images/share/he_1.pngis excluded by!**/*.pngwebapp/static/images/share/he_2.pngis excluded by!**/*.pngwebapp/static/images/share/he_3.pngis excluded by!**/*.pngwebapp/static/images/share/he_4.pngis excluded by!**/*.pngwebapp/static/images/share/he_5.pngis excluded by!**/*.pngwebapp/static/images/share/he_6.pngis excluded by!**/*.pngwebapp/static/images/share/he_x.pngis excluded by!**/*.pngwebapp/static/images/share/hr_1.pngis excluded by!**/*.pngwebapp/static/images/share/hr_2.pngis excluded by!**/*.pngwebapp/static/images/share/hr_3.pngis excluded by!**/*.pngwebapp/static/images/share/hr_4.pngis excluded by!**/*.pngwebapp/static/images/share/hr_5.pngis excluded by!**/*.pngwebapp/static/images/share/hr_6.pngis excluded by!**/*.pngwebapp/static/images/share/hr_x.pngis excluded by!**/*.pngwebapp/static/images/share/hu_1.pngis excluded by!**/*.pngwebapp/static/images/share/hu_2.pngis excluded by!**/*.pngwebapp/static/images/share/hu_3.pngis excluded by!**/*.pngwebapp/static/images/share/hu_4.pngis excluded by!**/*.pngwebapp/static/images/share/hu_5.pngis excluded by!**/*.pngwebapp/static/images/share/hu_6.pngis excluded by!**/*.pngwebapp/static/images/share/hu_x.pngis excluded by!**/*.pngwebapp/static/images/share/hy_1.pngis excluded by!**/*.pngwebapp/static/images/share/hy_2.pngis excluded by!**/*.pngwebapp/static/images/share/hy_3.pngis excluded by!**/*.pngwebapp/static/images/share/hy_4.pngis excluded by!**/*.pngwebapp/static/images/share/hy_5.pngis excluded by!**/*.pngwebapp/static/images/share/hy_6.pngis excluded by!**/*.pngwebapp/static/images/share/hy_x.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_1.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_2.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_3.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_4.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_5.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_6.pngis excluded by!**/*.pngwebapp/static/images/share/hyw_x.pngis excluded by!**/*.pngwebapp/static/images/share/ia_1.pngis excluded by!**/*.pngwebapp/static/images/share/ia_2.pngis excluded by!**/*.pngwebapp/static/images/share/ia_3.pngis excluded by!**/*.pngwebapp/static/images/share/ia_4.pngis excluded by!**/*.pngwebapp/static/images/share/ia_5.pngis excluded by!**/*.pngwebapp/static/images/share/ia_6.pngis excluded by!**/*.pngwebapp/static/images/share/ia_x.pngis excluded by!**/*.pngwebapp/static/images/share/ie_1.pngis excluded by!**/*.pngwebapp/static/images/share/ie_2.pngis excluded by!**/*.pngwebapp/static/images/share/ie_3.pngis excluded by!**/*.pngwebapp/static/images/share/ie_4.pngis excluded by!**/*.pngwebapp/static/images/share/ie_5.pngis excluded by!**/*.pngwebapp/static/images/share/ie_6.pngis excluded by!**/*.pngwebapp/static/images/share/ie_x.pngis excluded by!**/*.pngwebapp/static/images/share/is_1.pngis excluded by!**/*.pngwebapp/static/images/share/is_2.pngis excluded by!**/*.pngwebapp/static/images/share/is_3.pngis excluded by!**/*.pngwebapp/static/images/share/is_4.pngis excluded by!**/*.pngwebapp/static/images/share/is_5.pngis excluded by!**/*.pngwebapp/static/images/share/is_6.pngis excluded by!**/*.pngwebapp/static/images/share/is_x.pngis excluded by!**/*.pngwebapp/static/images/share/it_1.pngis excluded by!**/*.pngwebapp/static/images/share/it_2.pngis excluded by!**/*.pngwebapp/static/images/share/it_3.pngis excluded by!**/*.pngwebapp/static/images/share/it_4.pngis excluded by!**/*.pngwebapp/static/images/share/it_5.pngis excluded by!**/*.pngwebapp/static/images/share/it_6.pngis excluded by!**/*.pngwebapp/static/images/share/it_x.pngis excluded by!**/*.pngwebapp/static/images/share/ka_1.pngis excluded by!**/*.pngwebapp/static/images/share/ka_2.pngis excluded by!**/*.pngwebapp/static/images/share/ka_3.pngis excluded by!**/*.pngwebapp/static/images/share/ka_4.pngis excluded by!**/*.pngwebapp/static/images/share/ka_5.pngis excluded by!**/*.pngwebapp/static/images/share/ka_6.pngis excluded by!**/*.pngwebapp/static/images/share/ka_x.pngis excluded by!**/*.pngwebapp/static/images/share/ko_1.pngis excluded by!**/*.pngwebapp/static/images/share/ko_2.pngis excluded by!**/*.pngwebapp/static/images/share/ko_3.pngis excluded by!**/*.pngwebapp/static/images/share/ko_4.pngis excluded by!**/*.pngwebapp/static/images/share/ko_5.pngis excluded by!**/*.pngwebapp/static/images/share/ko_6.pngis excluded by!**/*.pngwebapp/static/images/share/ko_x.pngis excluded by!**/*.pngwebapp/static/images/share/la_1.pngis excluded by!**/*.pngwebapp/static/images/share/la_2.pngis excluded by!**/*.pngwebapp/static/images/share/la_3.pngis excluded by!**/*.pngwebapp/static/images/share/la_4.pngis excluded by!**/*.pngwebapp/static/images/share/la_5.pngis excluded by!**/*.pngwebapp/static/images/share/la_6.pngis excluded by!**/*.pngwebapp/static/images/share/la_x.pngis excluded by!**/*.pngwebapp/static/images/share/lb_1.pngis excluded by!**/*.pngwebapp/static/images/share/lb_2.pngis excluded by!**/*.pngwebapp/static/images/share/lb_3.pngis excluded by!**/*.pngwebapp/static/images/share/lb_4.pngis excluded by!**/*.pngwebapp/static/images/share/lb_5.pngis excluded by!**/*.pngwebapp/static/images/share/lb_6.pngis excluded by!**/*.pngwebapp/static/images/share/lb_x.pngis excluded by!**/*.pngwebapp/static/images/share/lt_1.pngis excluded by!**/*.pngwebapp/static/images/share/lt_2.pngis excluded by!**/*.pngwebapp/static/images/share/lt_3.pngis excluded by!**/*.pngwebapp/static/images/share/lt_4.pngis excluded by!**/*.pngwebapp/static/images/share/lt_5.pngis excluded by!**/*.pngwebapp/static/images/share/lt_6.pngis excluded by!**/*.pngwebapp/static/images/share/lt_x.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_1.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_2.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_3.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_4.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_5.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_6.pngis excluded by!**/*.pngwebapp/static/images/share/ltg_x.pngis excluded by!**/*.pngwebapp/static/images/share/lv_1.pngis excluded by!**/*.pngwebapp/static/images/share/lv_2.pngis excluded by!**/*.pngwebapp/static/images/share/lv_3.pngis excluded by!**/*.pngwebapp/static/images/share/lv_4.pngis excluded by!**/*.pngwebapp/static/images/share/lv_5.pngis excluded by!**/*.pngwebapp/static/images/share/lv_6.pngis excluded by!**/*.pngwebapp/static/images/share/lv_x.pngis excluded by!**/*.pngwebapp/static/images/share/mi_1.pngis excluded by!**/*.pngwebapp/static/images/share/mi_2.pngis excluded by!**/*.pngwebapp/static/images/share/mi_3.pngis excluded by!**/*.pngwebapp/static/images/share/mi_4.pngis excluded by!**/*.pngwebapp/static/images/share/mi_5.pngis excluded by!**/*.pngwebapp/static/images/share/mi_6.pngis excluded by!**/*.pngwebapp/static/images/share/mi_x.pngis excluded by!**/*.pngwebapp/static/images/share/mk_1.pngis excluded by!**/*.pngwebapp/static/images/share/mk_2.pngis excluded by!**/*.pngwebapp/static/images/share/mk_3.pngis excluded by!**/*.pngwebapp/static/images/share/mk_4.pngis excluded by!**/*.pngwebapp/static/images/share/mk_5.pngis excluded by!**/*.pngwebapp/static/images/share/mk_6.pngis excluded by!**/*.pngwebapp/static/images/share/mk_x.pngis excluded by!**/*.pngwebapp/static/images/share/mn_1.pngis excluded by!**/*.pngwebapp/static/images/share/mn_2.pngis excluded by!**/*.png
📒 Files selected for processing (4)
frontend/src/game.tsscripts/generate_share_images.pywebapp/app.pywebapp/data/share_translations.json
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
getShareText()included the URL, andnavigator.share({text, url})passed it again separately — platforms appended both. Now buildsfullTextonce with?r=param.?r=5(or?r=x), which serves a language-specific OG image showing the score and challenge text in the native language.language_config.jsonundershare_challenge_win/share_challenge_lose, following the established pattern.Test plan
?r=param/en?r=5→ view source showsshare/en_5.pngin og:image/en?r=abc→ falls back to default og:image/en(no param) → default og:image unchanged