Skip to content

fix: Hebrew word list, PWA banner, keyboard sofit, UX improvements#182

Merged
Hugo0 merged 1 commit intomainfrom
fix/hebrew-pwa-ux-improvements
Mar 20, 2026
Merged

fix: Hebrew word list, PWA banner, keyboard sofit, UX improvements#182
Hugo0 merged 1 commit intomainfrom
fix/hebrew-pwa-ux-improvements

Conversation

@Hugo0
Copy link
Owner

@Hugo0 Hugo0 commented Mar 20, 2026

Summary

  • Hebrew blocklist fix: 57,483 words moved from blockedvalid. Hebrew had 57% of words blocked (every other language: 0-4%), causing common words like ישראל, אנחנו, ילדים to be rejected as "not valid". This was the root cause of Hebrew's 8.5% completion rate (vs 37% baseline).
  • Keyboard sofit colors: updateKeyColor() now propagates colors to final↔regular form pairs (Hebrew כ↔ך מ↔ם נ↔ן פ↔ף צ↔ץ, Greek σ↔ς). Previously only diacritic variants were linked.
  • PWA install banner: Restore banner missing since Nuxt migration. Fix manifest icon paths (/static/favicon//favicon/). Show on game over (win or loss). Handle beforeinstallprompt timing edge cases.
  • Share button icon: Add share SVG icon to both share buttons.
  • PostHog events: Remove skip list so all events reach PostHog.
  • Definition logging: Add diagnostic logs to identify why 57 languages return 404 for definitions on production.
  • Translations: Add/update UI translation keys for 79 languages.

Risks

This is a large PR touching 92 files. Key risks:

  • Hebrew words.json (114K line diff): Bulk tier change from blockedvalid. No words were added or removed — only the tier field changed. Risk: some blocked words may be genuine garbage (transliterations, fragments). Follow-up LLM curation planned.
  • PWA banner: New DOM elements in game page + manifest changes. Tested locally with production build + ngrok. Could interact with @vite-pwa/nuxt module in unexpected ways on Render.
  • PostHog skip list removal: Will increase PostHog event volume by ~3x (adding guess_submit, guess_time, first_guess_delay). Monitor free tier usage (1M events/month).
  • Translation configs: Bulk changes to 79 language_config.json files. Generated via LLM translation — may contain inaccuracies for some languages.

Test plan

  • Hebrew: play a game, verify common words (מחלקה, ישראל, אנחנו) are accepted as guesses
  • Hebrew: verify keyboard colors both פ and ף when one is guessed
  • Greek: verify keyboard colors both σ and ς
  • PWA: on mobile Chrome, complete a game → install banner should appear
  • PWA: on desktop Chrome (production), complete a game → install banner should appear
  • Share button: verify share icon appears on both Today and Statistics tabs
  • Definitions: check Render logs for [DEFS] and [KAIKKI] entries after deploy
  • Translations: spot-check a few languages for correct UI text

Summary by CodeRabbit

  • New Features

    • Added PWA install banner with localized messaging and install/dismiss actions
    • Added translated part-of-speech labels (noun, verb, adjective, adverb) displayed for word definitions instead of raw values
  • Localization

    • Extended UI translations across all 79 supported languages with comprehensive new string keys for settings, statistics, and gameplay features
    • Updated app manifest description to reflect 79 languages
  • Bug Fixes

    • Improved keyboard final form character color alignment in gameplay

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b2a07158-4e6d-4641-84bd-6a64861047c0

📥 Commits

Reviewing files that changed from the base of the PR and between d7f2369 and 17908a7.

📒 Files selected for processing (93)
  • TODO.md
  • components/game/StatsModal.vue
  • composables/useAnalytics.ts
  • data/default_language_config.json
  • data/languages/ar/language_config.json
  • data/languages/az/language_config.json
  • data/languages/bg/language_config.json
  • data/languages/bn/language_config.json
  • data/languages/br/language_config.json
  • data/languages/ca/language_config.json
  • data/languages/ckb/language_config.json
  • data/languages/cs/language_config.json
  • data/languages/da/language_config.json
  • data/languages/de/language_config.json
  • data/languages/el/language_config.json
  • data/languages/en/language_config.json
  • data/languages/eo/language_config.json
  • data/languages/es/language_config.json
  • data/languages/et/language_config.json
  • data/languages/eu/language_config.json
  • data/languages/fa/language_config.json
  • data/languages/fi/language_config.json
  • data/languages/fo/language_config.json
  • data/languages/fr/language_config.json
  • data/languages/fur/language_config.json
  • data/languages/fy/language_config.json
  • data/languages/ga/language_config.json
  • data/languages/gd/language_config.json
  • data/languages/gl/language_config.json
  • data/languages/ha/language_config.json
  • data/languages/he/language_config.json
  • data/languages/he/words.json
  • data/languages/hi/language_config.json
  • data/languages/hr/language_config.json
  • data/languages/hu/language_config.json
  • data/languages/hy/language_config.json
  • data/languages/hyw/language_config.json
  • data/languages/ia/language_config.json
  • data/languages/id/language_config.json
  • data/languages/ie/language_config.json
  • data/languages/is/language_config.json
  • data/languages/it/language_config.json
  • data/languages/ja/language_config.json
  • data/languages/ka/language_config.json
  • data/languages/ko/language_config.json
  • data/languages/la/language_config.json
  • data/languages/lb/language_config.json
  • data/languages/lt/language_config.json
  • data/languages/ltg/language_config.json
  • data/languages/lv/language_config.json
  • data/languages/mi/language_config.json
  • data/languages/mk/language_config.json
  • data/languages/mn/language_config.json
  • data/languages/mr/language_config.json
  • data/languages/ms/language_config.json
  • data/languages/nb/language_config.json
  • data/languages/nds/language_config.json
  • data/languages/ne/language_config.json
  • data/languages/nl/language_config.json
  • data/languages/nn/language_config.json
  • data/languages/oc/language_config.json
  • data/languages/pa/language_config.json
  • data/languages/pau/language_config.json
  • data/languages/pl/language_config.json
  • data/languages/pt/language_config.json
  • data/languages/qya/language_config.json
  • data/languages/ro/language_config.json
  • data/languages/ru/language_config.json
  • data/languages/rw/language_config.json
  • data/languages/sk/language_config.json
  • data/languages/sl/language_config.json
  • data/languages/sq/language_config.json
  • data/languages/sr/language_config.json
  • data/languages/sv/language_config.json
  • data/languages/sw/language_config.json
  • data/languages/tk/language_config.json
  • data/languages/tl/language_config.json
  • data/languages/tlh/language_config.json
  • data/languages/tr/language_config.json
  • data/languages/uk/language_config.json
  • data/languages/ur/language_config.json
  • data/languages/uz/language_config.json
  • data/languages/vi/language_config.json
  • data/languages/yo/language_config.json
  • nuxt.config.ts
  • pages/[lang]/index.vue
  • pages/[lang]/word/[id].vue
  • plugins/pwa.client.ts
  • public/manifest.json
  • server/utils/definitions.ts
  • stores/game.ts
  • utils/i18n.ts
  • utils/types.ts

📝 Walkthrough

Walkthrough

This pull request adds comprehensive part-of-speech (POS) label translations across 60+ languages, implements PWA installation functionality with a fixed banner UI, introduces POS translation utilities, enables keyboard final-form variant state propagation, and adds logging to the definitions pipeline. It also updates the app manifest for PWA support.

Changes

Cohort / File(s) Summary
Language Configuration POS Labels
data/languages/*/language_config.json
Added new POS-related translation keys (pos_noun, pos_verb, pos_adjective, pos_adverb, pos_other) with localized values across ~65 language configurations. Each language file consistently follows the pattern of adding these 5 keys to existing text or ui objects, with trailing commas adjusted accordingly.
POS Translation System
utils/i18n.ts, utils/types.ts
Added translatePos() utility function to map POS codes to UI labels via language config, and introduced UiStrings interface to type-safe the LanguageConfig.ui field with all UI string keys including POS labels and ~50 additional UI-related strings.
Stats & Word Display
components/game/StatsModal.vue, pages/[lang]/word/[id].vue
Updated part-of-speech display in Stats Modal (TODAY/STATS tabs) to use translatePos() for localized labels. Added share button inline icon. Introduced posLabel() helper in word page to translate POS across three definition display contexts (revealed, server, async).
PWA Installation Feature
nuxt.config.ts, pages/[lang]/index.vue, plugins/pwa.client.ts, public/manifest.json
Implemented PWA install flow: added pwa-install custom element support, global manifest link, fixed bottom banner UI with install/dismiss actions, and refactored banner trigger logic from gameWon to gameOver with immediate evaluation and deferred prompt handling.
Game State & Keyboard
stores/game.ts
Enhanced updateKeyColor() to propagate state updates to final-form/positional keyboard variants using final_form_map and finalFormReverseMap, enabling consistent keyboard display for languages with alternate character forms.
Logging & Documentation
server/utils/definitions.ts, TODO.md
Added console logging for definitions directory resolution (existence/fallback) and Kaikki JSON file parsing (load count, missing file warnings). Created TODO.md documenting Hebrew bug investigation, systemic impacts, and follow-up tasks including logging and definition curation.
Analytics & Manifest
composables/useAnalytics.ts, public/manifest.json
Cleared POSTHOG_SKIP_EVENTS set to track previously skipped events. Updated manifest app description (65+ → 79 languages) and corrected icon paths by removing /static prefix.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser as Browser/PWA
    participant Game as Game Page
    participant GameStore as Game Store
    participant Plugin as PWA Plugin

    User->>Browser: Opens game page
    Plugin->>GameStore: Watch gameOver (immediate)
    
    alt Game already over on load
        GameStore-->>Plugin: gameOver = true (immediate)
        Plugin->>Plugin: setTimeout(showBanner)
    else Game in progress
        User->>Game: Makes guess
        Game->>GameStore: updateGameState
        GameStore-->>Plugin: gameOver changes to true
        Plugin->>Plugin: showBanner()
    end
    
    alt bannerShown guard passes
        Plugin->>Browser: Display PWA install banner
        User->>Browser: Clicks install or dismiss
        Browser->>Plugin: $pwaInstall.install() or dismiss()
        Plugin->>Plugin: Set bannerShown = true
        Browser-->>User: Install prompt or close banner
    else bannerShown already set
        Plugin->>Plugin: Skip banner display
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A whispered tale of scripts and translations fine,
Where Hebrew letters find their rightful line,
And nouns and verbs in sixty tongues align,
PWA banners beckon apps to shine!
With logs aplenty, the puzzle grows divine.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hebrew-pwa-ux-improvements
📝 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.

## Hebrew (P0 — root cause of 8.5% completion rate)
- Unblock 57,483 Hebrew words from blocked → valid tier
  Common words like ישראל, אנחנו, ילדים, מחלקה were blocked,
  causing "word not valid" for normal Hebrew guesses.
  Hebrew was the only language with 57% blocked (others: 0-4%).

## Keyboard sofit colors (Hebrew + Greek)
- Fix updateKeyColor() to propagate colors to final↔regular form pairs
  via final_form_map (Hebrew: כ↔ך מ↔ם נ↔ן פ↔ף צ↔ץ, Greek: σ↔ς).
  Previously only diacritic variants were linked, not positional forms.

## PWA install banner
- Restore PWA install banner missing since Nuxt migration
  (Flask had <div id="pwa-install-banner"> + <pwa-install>, never ported)
- Fix manifest.json icon paths: /static/favicon/ → /favicon/ (Flask legacy)
- Add <link rel="manifest"> to head (PWA module doesn't inject in all cases)
- Register pwa-install as Vue custom element (suppress warnings)
- Show banner on game over (win or loss), not just win
- Handle beforeinstallprompt arriving after game already completed
- Update manifest description to 79 languages

## UX
- Add share icon (SVG) to both share buttons in StatsModal
- Add part-of-speech translation support in StatsModal definition display

## Analytics
- Remove PostHog event skip list (was blocking guess_submit, guess_time,
  first_guess_delay from reaching PostHog)

## Diagnostics
- Add logging to definition system (resolveDefinitionsDir, loadKaikkiFile,
  fetchDefinition) to diagnose why 57 languages return 404 on production

## Translations
- Add/update language_config.json for 79 languages with UI translation keys
- Add new configs for languages that had none (ckb, cs, el, eo, qya, rw, sl, tk, tlh)
@Hugo0 Hugo0 force-pushed the fix/hebrew-pwa-ux-improvements branch from 4c15927 to 17908a7 Compare March 20, 2026 07:24
@Hugo0 Hugo0 merged commit a377660 into main Mar 20, 2026
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.

1 participant