feat(cv): add VIDI Group, and fix the live figures, orthography and printing - #34
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThe CV now replaces hard-coded GitHub and NPM metrics with validated Sequence Diagram(s)sequenceDiagram
participant CVContent
participant CvArticle
participant StatsSources
CVContent->>CvArticle: provide metric placeholders
StatsSources->>CvArticle: provide GitHub and NPM values
CvArticle->>CVContent: render interpolated content
sequenceDiagram
participant renderLocale
participant BrowserView
participant Page.printToPDF
renderLocale->>BrowserView: inject computed `@page` CSS
BrowserView->>Page.printToPDF: provide configured print document
Page.printToPDF-->>renderLocale: generate PDF
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/www2/src/components/CvArticle.astro`:
- Around line 79-83: Update the statistic-token replacement callback in
CvArticle.astro to match the complete placeholder name, including characters
such as hyphens, so unknown placeholders are not left in the article. Before
returning a value from stats[name], require that name is an own property of
stats; otherwise throw the existing unknown-token error.
In `@apps/www2/src/data/feedPages.ts`:
- Line 19: Update the /cv feed entry’s updatedAt value to the actual update
date, removing the future-dated metadata while preserving the existing path,
key, and publishedAt values.
In `@apps/www2/src/styles/global.css`:
- Around line 309-310: Update the print-page CSS declarations using the visible
`size` and intentional `page-break-*` rules: change the `size` keyword from `A4`
to lowercase `a4`, and add narrowly scoped Stylelint suppression comments for
the deprecated `page-break-*` aliases while preserving those Safari fallback
declarations.
In `@packages/locales/mdx/faq.en.mdx`:
- Line 19: Wrap the changed paragraphs at spaces so every source line stays
within 100 characters, without adding blank lines or changing rendered text or
statistic tokens. Apply this to packages/locales/mdx/faq.en.mdx lines 19-19,
packages/locales/mdx/faq.uk.mdx lines 19-19, packages/locales/mdx/web-dev.en.mdx
lines 7-7, and packages/locales/mdx/web-dev.uk.mdx lines 7-7.
In `@packages/locales/src/en/timeline-career.ts`:
- Line 11: Apply the declared prose formatting rules across all listed sites:
wrap long text without changing rendered content, and use single-quoted
TypeScript literals. Update the VIDI Group description in
packages/locales/src/en/timeline-career.ts (11-11); the new and long
descriptions in packages/locales/src/uk/timeline-career.ts (11-12, 46-46,
93-93); the TypeScript and JavaScript descriptions in
packages/locales/src/uk/skills.ts (8-10, 36-36); and the Noizr and P.S.
paragraphs in packages/locales/mdx/music.uk.mdx (11-11, 17-17).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 65870093-0a1e-4277-b19f-68b053a28d51
⛔ Files ignored due to path filters (2)
apps/www2/public/cv.en.pdfis excluded by!**/*.pdfapps/www2/public/cv.uk.pdfis excluded by!**/*.pdf
📒 Files selected for processing (15)
apps/www2/src/components/CvArticle.astroapps/www2/src/components/Stats.astroapps/www2/src/data/feedPages.tsapps/www2/src/styles/global.csspackages/cv-to-pdf/index.tspackages/locales/mdx/built-with.uk.mdxpackages/locales/mdx/faq.en.mdxpackages/locales/mdx/faq.uk.mdxpackages/locales/mdx/music.uk.mdxpackages/locales/mdx/web-dev.en.mdxpackages/locales/mdx/web-dev.uk.mdxpackages/locales/src/en/timeline-career.tspackages/locales/src/uk/index.tspackages/locales/src/uk/skills.tspackages/locales/src/uk/timeline-career.ts
…rinting VIDI Group joins the career timeline, running alongside the KITRUM contract since April 2024. `проект` becomes `проєкт` throughout, per the 2019 orthography. The live npm and GitHub figures were substituted by matching the old numbers as literals in the prose, so rewording a sentence silently detached it from the live value — the Ukrainian CV printed 1.5M+ downloads while NPM served 3M. Both now interpolate a `%%token%%` that cannot be edited away by accident, and an unknown token fails the build rather than printing itself. Printing the CV from a browser is brought in line with the committed PDFs. WebKit honours fragmentation only in normal block flow, so DaisyUI's timeline — a flex column of grid rows — printed as one unbreakable box; the list now prints as block flow, which is pixel-identical on screen. A `@page` declares the sheet, which Safari needs in order to size it at all, and `cv-to-pdf` appends its own last so the PDFs stay pinned to 12mm no matter what the stylesheet asks for. Break utilities also emit their legacy `page-break-*` aliases. The PDFs are rebuilt, still 13 pages each.
daac773 to
8c7e9c0
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the CV content and its print/PDF pipeline: it adds VIDI Group to the career timeline, applies the 2019 UA orthography change (проект → проєкт) across multiple Ukrainian strings, replaces brittle “regex-matching old literal numbers” with explicit stat tokens for live GitHub/NPM figures, and improves Safari/print pagination by adjusting print CSS and pinning the @page box during PDF generation.
Changes:
- Add VIDI Group (Apr ’24–Now) to the EN/UK career timeline.
- Replace hardcoded prose-number regexes with
%%githubStars%%/%%npmDownloads%%token substitution that fails fast on unknown tokens. - Improve print reliability: declare an
@pagerule for Safari, force DaisyUI timeline to block flow in print, add legacypage-break-*aliases, and append a final@pagerule incv-to-pdfto pin margins.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/locales/src/uk/timeline-career.ts | Adds VIDI Group timeline item; applies проєкт orthography in UA career copy. |
| packages/locales/src/uk/skills.ts | Updates UA “project” wording to проєкт across skills descriptions. |
| packages/locales/src/uk/index.ts | Updates UA UI strings to проєкт (open-to-work + GitHub link description). |
| packages/locales/src/en/timeline-career.ts | Adds VIDI Group timeline item in English. |
| packages/locales/mdx/web-dev.uk.mdx | Replaces literal GitHub/NPM figures with stat tokens in UA web-dev prose. |
| packages/locales/mdx/web-dev.en.mdx | Replaces literal GitHub/NPM figures with stat tokens in EN web-dev prose. |
| packages/locales/mdx/music.uk.mdx | Applies UA проєкт orthography updates in music page copy. |
| packages/locales/mdx/faq.uk.mdx | Applies UA проєкт orthography + swaps to stat tokens (fixes live-figure drift). |
| packages/locales/mdx/faq.en.mdx | Swaps to stat tokens for GitHub/NPM figures in EN FAQ answer. |
| packages/locales/mdx/built-with.uk.mdx | Applies UA проєкт orthography updates in “built-with” page. |
| packages/cv-to-pdf/index.ts | Appends a final @page rule at render-time to pin PDF page box/margins. |
| apps/www2/src/styles/global.css | Adds @page defaults + Safari-friendly print fragmentation/break handling. |
| apps/www2/src/data/feedPages.ts | Updates CV standing page updatedAt (currently set to a future date). |
| apps/www2/src/components/Stats.astro | Adjusts print-break behavior to avoid Safari blank-page pagination edge case. |
| apps/www2/src/components/CvArticle.astro | Implements token-based stat replacement with build-time failure on unknown tokens. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Four CV-adjacent threads.
VIDI Group joins the career timeline
Senior Software Engineer since April 2024, running alongside the KITRUM contract — both entries are current.
проект→проєктPer the 2019 orthography, across every Ukrainian string that carried it.
The live npm figure had stopped being live
The CV interpolates live npm and GitHub stats, but it did so by matching the old numbers as literals in the prose:
When the
зкачуваньtypo was fixed, the Ukrainian sentence stopped matching its own regex and froze at1.5M+while NPM served 3M. English kept working, so only/uk/cvwas wrong. The FAQ answer was worse — it still matched, but rendered3.0M+/mo завантажень на місяць, saying "per month" twice.Both figures now interpolate
%%githubStars%%/%%npmDownloads%%, which cannot be edited away by accident, and an unknown token throws at build time instead of printing itself. Only the number is substituted — the unit words stay in the copy, since the locales word them differently.Printing from a browser now matches the committed PDFs
Two engine differences, both diagnosed from a Safari-printed PDF:
Fragmentation inside flex/grid. WebKit honours it only in normal block flow and drops it on a flex or grid item — the reason the CV
articlealready carriedprint:block. DaisyUI's timeline is the same trap one level down, a flex column of grid rows, so Safari printed the whole career history as one unbreakable box and ignored every avoid rule inside it. The list now prints as block flow; verified pixel-identical on screen (byte-identical WebKit screenshots), so it is inert everywhere except pagination. Entries stay splittable — holding one whole pushes it to the next sheet and leaves a near-empty page.Nothing declared the paper box. The committed PDFs get their geometry from
printToPDF, so no@pagerule existed anywhere. A margin is what Safari needs in order to size a sheet at all; declaring only the size is not enough. But Chrome lets a CSS@pagemargin override whatprintToPDFis passed, so a value chosen for paper reflowed the committed PDFs too.cv-to-pdfnow appends its own@pagelast, winning the cascade and pinning the build to 12mm regardless of what the stylesheet asks for.Break utilities also emit their legacy
page-break-*aliases, which Safari implements more reliably than the modern names.Not fixed, and not fixable here
Safari emits CSS pixels as PDF points 1:1, so a printout comes out at 133% of the built PDF (14px prose prints at 14pt where the PDF uses 10.5pt — uniform across every size measured). That shifts where breaks land.
Scale: 75%in Safari's print dialog cancels it exactly; unchecking "Print headers and footers" drops the date/URL band that also eats vertical space.Verification
cv.uk.pdfcame out byte for byte identical, confirming the build is pinned.bun run check,check-types,bunx turbo test(28 tests) green.updatedAtneeded no bump.