Repository navigation
Homepage: dated city-wide answer for "este oprita apa calda azi" - #46
tiXor-code wants to merge 1 commit into
Conversation
Targets "apa calda bucuresti" (pos 8.96, 4,897 impr., CTR 0.9%, GSC 28d to 2026-10-17), which lands on /. The page had history and rankings but zero "azi/acum" content, while the sector pages answer that intent with a dated status. This adds the city-level equivalent right under the hero: a status sentence aggregated from the same nightly per-sector live data /sector/N renders, a 6-row per-sector table (ongoing interruptions, PTs hit in the last 30 days) linking every sector page, and the usual staleness caveat. The meta description now leads with "azi, pe sectoare" instead of only the rent-history angle, aimed at the sub-1% CTR. Order: seo-sentinel content/brief #108. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Solid feature, but one correctness bug in the new copy and one duplication issue worth fixing before merge.
1. Wrong Romanian "de" pluralization for counts in the 101–119 / 201–219 / … bands (app/page.tsx:47-58, fmtIntreruperi/fmtAvarii)
Both helpers gate the "de" insertion on n >= 20, but Romanian plural rules are last-two-digits, not magnitude-based — exactly what deFor() in lib/format.ts:31 already encodes (and what fmtPuncteTermice in app/sector/[id]/page.tsx:43-47 correctly uses). For n = 101..119, n >= 20 is true but the correct rule says no "de" (e.g. "109 întreruperi", not "109 de întreruperi"). Same bug exists already in app/sector/[id]/page.tsx:36-40's fmtIntreruperi, but this PR makes it much more likely to trigger: it sums ongoing counts across all 6 sectors on the homepage, and the PR's own verification example (98) is already close to the 100+ band where the bug lives. Since this status sentence is deliberately left snippet-eligible for Google, a grammatically wrong count landing in the SERP undercuts the point of the feature.
Fix: swap the n >= 20 checks for deFor(n) !== '' (or reuse deFor directly) in both fmtIntreruperi and fmtAvarii.
2. Duplicated pluralization/status-sentence logic (app/page.tsx:47-70 vs app/sector/[id]/page.tsx:36-90)
fmtIntreruperi and the overall status-sentence shape are now copy-pasted between the homepage and the sector page (including the identical JSDoc comment). Worth extracting into a shared helper (e.g. lib/format.ts or lib/sector-live.ts) so fix #1 only needs to happen once, and so the two pages don't drift again later.
Minor, non-blocking: cityStatusSentence's ongoing === 1 branch only distinguishes avarie vs. not, losing the sector page's statusSentence nuance for a single non-avarie episode ("oprire programată" / "cauză neprecizată în anunț" — app/sector/[id]/page.tsx:75-81). Not wrong, just less precise phrasing for that edge case.
|
@claude please address this review:
|
|
Re-verified 2026-10-26 by the sentinel content engine. The striking-distance query re-issued as order #115 (apa calda bucuresti, now 6,859 impressions, position 8.7), so this PR is the pending fix. Octopus merge of this branch plus #47 onto current main (31b98df) is conflict-free; on that merged tree npm test passes 137/137 and npm run build exits 0 against the current data-latest bundle. Ready to merge as-is, and #29 stacks cleanly on top. One caveat outside this PR: data-latest is stale (data_through 2026-10-09). The termo-data Scrape CMTEB workflow has failed on every scheduled run since then: cmteb.ro times out from GitHub Actions runners but answers in 0.07s from the Mac mini, so GHA egress IPs look blocked. Until the scraper runs from somewhere cmteb.ro accepts, the dated status this section renders stays frozen at 9 octombrie, which blunts exactly the azi/acum intent it targets. |
TLDR: "apa calda bucuresti" (4,897 impressions, position 8.96, CTR 0.9%) lands on the homepage, which had no azi/acum content at all. This adds a dated, answer-first "Este oprita apa calda in Bucuresti azi?" section under the hero, built from the same nightly per-sector live data the sector pages render, and points the meta description at the live-status intent.
What changed:
Verification: npm test 137/137 passed, npm run build zero errors against the 2026-10-09 local bundle; rendered HTML checked (status sentence reads "La 9 octombrie 2026, in Bucuresti erau anuntate 98 de intreruperi de apa calda in curs, dintre care 19 avarii").
Order: seo-sentinel content/brief #108 (query "apa calda bucuresti").
🤖 Generated with Claude Code