| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…tter Red on ProsePre (useI18n) and ProseImg (useRuntimeConfig). Refs: CNT-06
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
launchpad | 649bc21 | Commit Preview URL Branch Preview URL |
Aug 03 2026, 09:05 PM |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Implements CNT-06, test-first. The finding names one file; there are two.
Why it works, and why that is the problem
A composable resolves its component through getCurrentInstance(), which is only set during setup. Called from inside a computed getter it works by accident: Vue's implementation is currentInstance || currentRenderingInstance, so while the getter runs as part of a render the rendering instance stands in.
That holds exactly as long as nothing evaluates the computed outside a render — a watcher, a pre-flush job, a unit test reading .value. vue-i18n throws MUST_BE_CALL_SETUP_TOP the moment it does.
ProseHeading.vue already has the right shape, with const { t, te } = useI18n() beside defineProps and the computed closing over it. Hoisting also stops the lookup repeating on every re-evaluation.
Verified on the page that renders them
Both components are blog-article prose, so I rendered an article with seven code blocks and an image:
The interpolated "Code in yaml" is the proof that matters — it is the hoisted t producing a translated, parameterised string, not a fallback.
Then the whole article, before and after, ignoring <script> blocks: byte-identical, 99 961 both ways.
The guard
Flags any useX() call inside a computed(() => { … }) body across components, pages, layouts and composables. The self-test pins both directions — a call inside the getter is caught, the same call hoisted above it is not — so it cannot decay into matching everything or nothing.
Gates
Suite: 121 tests, 41 files. Build green. Ratchet unchanged at 334 / 39 / 21 (this branch is cut from d63bc02; #260 lowers the error count to 320 by a different route).
Refs: CNT-06
🤖 Generated with Claude Code
https://claude.ai/code/session_017uWFJwn6dswmNtR8kKB86s