diff --git a/apps.html b/apps.html index 97f867cb..00eba4c1 100644 --- a/apps.html +++ b/apps.html @@ -1437,7 +1437,8 @@

Chaos - Stranger Missions

const terms = text.split(/\s+/).filter(Boolean); let shown = 0; cards.forEach(card => { - const app = slug(card), content = clean(card.textContent || ''); + // Include the stable catalog slug so former/internal app names stay findable. + const app = slug(card), content = clean((card.textContent || '') + ' ' + app + ' ' + app.replace(/-/g, ' ')); const inGoal = goal === 'all' || (groups[goal] || []).includes(app); const visible = inGoal && terms.every(term => content.includes(term)); card.hidden = !visible; diff --git a/scripts/check_growth_live.py b/scripts/check_growth_live.py index a8264784..48f3e253 100644 --- a/scripts/check_growth_live.py +++ b/scripts/check_growth_live.py @@ -74,6 +74,9 @@ def check(path, key, valid): check("/apps", "no_stale_live_store_claim", "92 free apps on Google Play" not in catalog) check("/apps", "store_click_tracking", "catalog_store_click" in catalog and "download_click" in catalog) check("/apps", "detail_click_tracking", "catalog_app_detail_click" in catalog) + check("/apps", "search_includes_app_slug", + "const app = slug(card), content = clean((card.textContent || '') + ' ' + app" in catalog + and "app.replace(/-/g, ' ')" in catalog) check("/apps", "empty_search_reset", 'id="finder-reset"' in catalog and "reset.addEventListener('click'" in catalog and diff --git a/scripts/test_growth_live.py b/scripts/test_growth_live.py index 99de2cb8..3eedecc5 100644 --- a/scripts/test_growth_live.py +++ b/scripts/test_growth_live.py @@ -26,6 +26,7 @@ def valid_pages(): pages["/apps"] = ( '' + cards + " catalog_store_click download_click catalog_app_detail_click " + + "const app = slug(card), content = clean((card.textContent || '') + ' ' + app; app.replace(/-/g, ' ')" + 'id="finder-reset" reset.addEventListener(\'click\' input.value = \'\' goal = \'all\' render(); catalog_search_reset ' + " ".join(f'' for slug in SLUGS) ) @@ -186,6 +187,17 @@ def test_store_schema_package_mismatch_fails(self): "id=jp.appdevelopsk.testapp1", "id=jp.appdevelopsk.unlisted", 1) self.assertFalse(inspect(data)["passed"]) + def test_missing_slug_search_fails(self): + data = valid_pages() + data["/apps"] = data["/apps"].replace( + "const app = slug(card), content = clean((card.textContent || '') + ' ' + app", "content = clean(card.textContent)") + self.assertFalse(inspect(data)["passed"]) + + def test_missing_hyphen_alias_fails(self): + data = valid_pages() + data["/apps"] = data["/apps"].replace("app.replace(/-/g, ' ')", "") + self.assertFalse(inspect(data)["passed"]) + def test_missing_empty_search_reset_fails(self): data = valid_pages() data["/apps"] = data["/apps"].replace('id="finder-reset"', 'id="missing-reset"')