Skip to content

[codex] Fix stale translated hero label#633

Merged
riderx merged 1 commit into
mainfrom
codex/fix-id-hero-cache
May 5, 2026
Merged

[codex] Fix stale translated hero label#633
riderx merged 1 commit into
mainfrom
codex/fix-id-hero-cache

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented May 4, 2026

Summary

  • replace the hero angle-bracket label workaround with plain visible text
  • bump the translation worker cache namespace so stale translated HTML is regenerated

Root cause

Production was still serving an old translated-page cache for /id/ (x-capgo-translation-cache: STALE) that contained the previous hero markup. The source-only fix could not invalidate that stored HTML.

Validation

  • bunx prettier --write apps/web/src/components/Hero.astro apps/translation-worker/src/index.ts
  • apps/web: bun run check
  • bun run ci:verify:translation
  • apps/web: bun run build
  • apps/translation-worker: bunx wrangler deploy --dry-run
  • verified built index has no hero-capacitor-target, no <CapacitorJS app/>, and no literal

Summary by CodeRabbit

  • Refactor
    • Updated translation cache configuration to a new cache version for more consistent translated content delivery.
    • Simplified the hero headline markup so the "CapacitorJS app" text is rendered directly, improving accessibility and maintainability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 442d5021-6826-4996-9ec6-4678a2c5cb80

📥 Commits

Reviewing files that changed from the base of the PR and between ed5fc9b and 4093712.

📒 Files selected for processing (2)
  • apps/translation-worker/src/index.ts
  • apps/web/src/components/Hero.astro
✅ Files skipped from review due to trivial changes (1)
  • apps/translation-worker/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/components/Hero.astro

📝 Walkthrough

Walkthrough

This PR bumps the translation cache version constant used by the translation worker and refactors the Hero component to render the “CapacitorJS app” label as a direct styled span instead of via a CSS ::before pseudo-element (removing the related style and ARIA helper spans).

Changes

Translation Cache Version Bump

Layer / File(s) Summary
Data Shape / Constants
apps/translation-worker/src/index.ts
TRANSLATION_CACHE_VERSION changed from '2026-05-02-llama-3.1-8b-json-body-v4' to '2026-05-04-llama-3.1-8b-json-body-v5', affecting cache key prefixes and R2 object keys for translated pages and partial translation state.
Wiring / Keys Usage
apps/translation-worker/src/index.ts
Marker values (__capgo_translation_cache, __capgo_translation_pending) and R2 keys derived from the version constant are implicitly updated where used.
Tests / Docs (none changed)
-
No test or documentation files modified in this diff.

Hero Component Markup Refactor

Layer / File(s) Summary
Markup Change
apps/web/src/components/Hero.astro
In the hero <h1>, the “CapacitorJS app” text is now a direct <span class="text-azure-500">CapacitorJS app</span> instead of being provided via a CSS ::before pseudo-element and hidden/ARIA helper spans.
Style Removal
apps/web/src/components/Hero.astro
Removed the <style> block that defined .hero-capacitor-target::before { content: '<CapacitorJS app/>'; }.
Accessibility / ARIA helpers
apps/web/src/components/Hero.astro
Associated aria-hidden / sr-only helper spans that supported the pseudo-element approach were removed along with the pseudo-element.
Tests / Docs (none changed)
-
No test or documentation files modified in this diff.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐇
A tiny bump, a cache renewed,
The hero's words no longer hued by pseudo-mood.
Span shows true in azure light,
Translations keyed to version right.
Hop, deploy — the rabbit's pleased tonight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[codex] Fix stale translated hero label' directly addresses the root cause and primary change—fixing the stale cache for the hero label by both replacing the markup workaround and bumping the translation cache version.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 codex/fix-id-hero-cache

Review rate limit: 0/5 reviews remaining, refill in 50 minutes and 1 second.

Comment @coderabbitai help to get the list of available commands and usage tips.

@riderx riderx marked this pull request as ready for review May 4, 2026 17:07
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@riderx riderx force-pushed the codex/fix-id-hero-cache branch from ed5fc9b to 4093712 Compare May 4, 2026 17:10
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@riderx riderx merged commit 843d57e into main May 5, 2026
10 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