Skip to content

fix(site): hide Prevention nav CTA until the feature ships - #644

Open
romeo111 wants to merge 1 commit into
masterfrom
claude/hide-profilaktyka-button-80dff5
Open

fix(site): hide Prevention nav CTA until the feature ships#644
romeo111 wants to merge 1 commit into
masterfrom
claude/hide-profilaktyka-button-80dff5

Conversation

@romeo111

Copy link
Copy Markdown
Owner

Why

The prevention flow isn't ready for users, so the top-bar CTA is withheld on both language mirrors (UA «Профілактика» / EN «Prevention»).

What

  • Generatorscripts/build_site.py: the CTA group is now assembled as a list and the Prevention link is gated behind _PREVENT_NAV_ENABLED = False. Bringing the button back is a one-line flip; prevent_href / prevent_current are kept intact.
  • Built site — stripped the rendered anchor from the 5104 already-built pages under docs/ (2552 UA + 2552 EN) so the live site matches the generator without waiting for a full rebuild.

prevent.html still builds and stays reachable by direct URL — only the nav entry point is removed.

Verification

  • Freshly rendered top-bar CTA group is byte-identical to the stripped files for both languages, so the daily site refresh will produce no extra diff.
  • Diff is exactly one deleted line per page — no line-ending churn.
  • No page outside prevent.html links to prevention anymore; the only remaining references are its own canonical / hreflang tags and the UA↔EN language switcher.
  • tests/test_build_site.py: 41 passed, 3 failed. The 3 failures (capabilities_shows_numerical_metrics, engine_bundle_excludes_heavy_unused_subtrees, try_examples_are_curated_and_filter_by_disease_id) concern KB metric labels, engine-zip contents and disease-ID↔questionnaire coverage — none touch navigation. Pre-commit hooks green.

Not done (deliberately out of scope)

  • docs/sitemap.xml still lists prevent.html for both languages, so search engines can still surface the unfinished page.
  • The prevention pages remain reachable by direct URL.

Say the word if either should be handled too.

🤖 Generated with Claude Code

The prevention flow is not ready for users, so the top-bar CTA is
withheld on both language mirrors (UA "Профілактика" / EN "Prevention").
Gated behind _PREVENT_NAV_ENABLED in scripts/build_site.py so bringing
the button back is a one-line flip.

prevent.html still builds and stays reachable by direct URL — only the
nav entry point is removed. Also stripped the rendered anchor from the
5104 already-built pages under docs/ so the live site matches the
generator without waiting for a full rebuild. Verified the freshly
rendered top-bar CTA group is byte-identical to the stripped files, so
the daily site refresh will produce no extra diff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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