Skip to content

Feat/language backgrounds - #23

Closed
hsbu wants to merge 24 commits into
mainfrom
feat/language-backgrounds
Closed

hsbu wants to merge 24 commits into
mainfrom
feat/language-backgrounds

Conversation

@hsbu

@hsbu hsbu commented May 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

hsbu and others added 24 commits May 9, 2026 12:25
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…over generation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…prove edge function error handling"

This reverts commit b0adb0f.
- Add LANGUAGE_COUNTRY and LANGUAGE_BG maps to learningLanguages.ts;
  LANGUAGE_BG uses import.meta.glob to bundle all per-country backgrounds
  (learner + elder variants) and resolves the right image from the user's
  chosen learning language
- Replace static background-learner/elder imports in LandingPage with
  LANGUAGE_BG[learningLanguage] lookup; pass learningLanguage to ElderLanding
- Add 20 country-specific background images under assets/landing/background/
- Add ::after dark overlay (rgba 0,0,0,0.32) on .landing-hero for legibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Accept remote versions: alphabetical CSS properties, type-only import,
onOpenLanguageSettings prop, LEARNING_LANGUAGE_METADATA superseding
LANGUAGE_COUNTRY, and getLandingBackground/backgroundModules naming.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… guide

- Add What's New section covering story pipeline, multi-language hero
  backgrounds, AI coach improvements, and profile onboarding
- Add Mermaid architecture diagram and elder recording to story data flow
- Expand setup instructions: migrations, edge function deployment, secrets
- Add project structure tree with ai-helper and assets detail
- Restructure features section and tech stack table for clarity
@vercel

vercel Bot commented May 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hackwknd-2026 Ready Ready Preview, Comment May 9, 2026 10:39pm

@greptile-apps

greptile-apps Bot commented May 9, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR reorganises the landing background assets from two generic flat files (background-elder.png, background-learner.png) into a country-namespaced directory (assets/landing/background/{country}-{role}.png), adds Brunei and Laos image pairs to that directory, and rewrites the README with a detailed changelog, updated architecture diagrams, and improved setup instructions.

  • Two old generic background images are deleted and the new directory structure (already used by src/lib/learningLanguages.ts via import.meta.glob) is now the sole source of hero images.
  • Four new images are added (brunei-elder, brunei-learner, laos-elder, laos-learner), but the eight language-to-country mappings in LANGUAGE_BG cover only Indonesia, Malaysia, Thailand, Cambodia, Philippines, Vietnam, Singapore, and Myanmar \u2014 neither Brunei nor Laos is mapped, so these images are bundled eagerly but never displayed.
  • The README rewrite is documentation-only and has no runtime impact.

Confidence Score: 4/5

Safe to merge — the image restructuring and README rewrite introduce no runtime regressions; the Brunei and Laos images are inert dead assets rather than broken paths.

The structural change (moving from flat generic backgrounds to a country-namespaced directory) is clean and already wired correctly in learningLanguages.ts. The four new Brunei/Laos images land in the glob directory and will be eagerly bundled on every build, but no language entry resolves to those keys, so they silently inflate bundle size without being rendered.

assets/landing/background/brunei-elder.png, assets/landing/background/brunei-learner.png, assets/landing/background/laos-elder.png, assets/landing/background/laos-learner.png — these four images have no corresponding language mapping in src/lib/learningLanguages.ts

Important Files Changed

Filename Overview
README.md Comprehensive documentation rewrite — adds changelog, updated architecture diagram, multi-language feature notes, and improved setup guide. No code impact.
assets/landing/background-elder.png Deleted — replaced by the new country-specific background directory structure.
assets/landing/background-learner.png Deleted — replaced by the new country-specific background directory structure.
assets/landing/background/brunei-elder.png New Brunei elder background image — eagerly bundled by Vite's glob but no language in LANGUAGE_BG maps to 'brunei', making it a dead asset.
assets/landing/background/brunei-learner.png New Brunei learner background image — eagerly bundled by Vite's glob but unreferenced by any language mapping.
assets/landing/background/laos-elder.png New Laos elder background image — eagerly bundled by Vite's glob but unreferenced by any language mapping.
assets/landing/background/laos-learner.png New Laos learner background image — eagerly bundled by Vite's glob but unreferenced by any language mapping.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User selects learning language"] --> B["resolveLearningLanguage()"]
    B --> C["LANGUAGE_BG lookup\n(8 languages → 8 countries)"]
    C --> D["getLandingBackground(country, role)"]
    D --> E["backgroundModules key lookup\nimport.meta.glob eager bundle"]
    E -->|key found| F["Render hero image"]
    E -->|key not found| G["Return empty string\n(no image rendered)"]

    subgraph bundled ["Eagerly bundled by Vite glob (20 images)"]
        H["✅ malaysia-elder/learner"]
        I["✅ indonesia-elder/learner"]
        J["✅ thailand-elder/learner"]
        K["✅ cambodia-elder/learner"]
        L["✅ philippines-elder/learner"]
        M["✅ vietnam-elder/learner"]
        N["✅ singapore-elder/learner"]
        O["✅ myanmar-elder/learner"]
        P["⚠️ brunei-elder/learner (unused)"]
        Q["⚠️ laos-elder/learner (unused)"]
    end
Loading

Comments Outside Diff (1)

  1. assets/landing/background/brunei-elder.png, line 1 (link)

    P2 Orphaned assets — not reachable by any language mapping

    The four new images (brunei-elder.png, brunei-learner.png, laos-elder.png, laos-learner.png) land inside assets/landing/background/, which means Vite's import.meta.glob('../../assets/landing/background/*.png', { eager: true }) in src/lib/learningLanguages.ts will bundle all four at build time. However, LANGUAGE_BG maps only the 8 declared languages — Tandia (Indonesia), Semai (Malaysia), Mlabri (Thailand), Chong (Cambodia), Arta (Philippines), Arem (Vietnam), Kristang (Singapore), Moken (Myanmar) — and none of them resolves to brunei or laos. The images are imported eagerly but the keys are never looked up, so they add bundle weight without being rendered anywhere in the app.

Reviews (1): Last reviewed commit: "feat: adjust readme" | Re-trigger Greptile

This branch was successfully deployed

1 active deployment
Preview — 58c91867 Deployed May 9, 2026 by vercel[bot]
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.

2 participants