Skip to content

refactor: weekly cleanup for analytics coverage, desktop-download exports, and agent docs - #456

Open
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/bc-c876aa9f-328c-4a4c-aced-b770fd44efe9-69fe
Open

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/bc-c876aa9f-328c-4a4c-aced-b770fd44efe9-69fe

Conversation

@cursor

@cursor cursor Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

⇝pull request

॰✩‧₊˚༺☆༻॰✩‧₊˚

what & why

Weekly code cleanup after #441. Tighten the public desktop-download API, share formatYear on related work, sync Storybook docs with the analytics/video work, and cover the new track* helpers plus provider callbacks. Agent docs now describe the event catalog, tracked media providers, and XP desktop downloads.

scope

apps/portfolio, apps/storybook, @httpjpg/ui, @httpjpg/analytics, AGENTS.md

change type

  • refactor / style / revert · Changed · patch
  • build / ci / docs / test · Tooling · patch

screenshots / recordings

Docs and tests only — no visual product change.


checklist — every pull request
  • pnpm lint, pnpm type-check, pnpm test and pnpm build pass locally
  • Follows the conventions in CLAUDE.md — I read a neighbouring file before inventing a pattern
  • Scoped: no drive-by refactors bundled with the feature
  • Server Components by default; any new "use client" boundary is as small as possible
  • Styling uses design tokens from @httpjpg/tokens via Panda (no raw hex outside genuinely off-palette decoration)
  • Dependency direction respected (tokens/env stay leaves; ui never imports back from consumers)
  • New env vars declared in packages/env/src/env.mjs, .env.example and turbo.json
  • Tests added or updated next to the source (*.test.ts(x)); E2E updated if a user-facing flow changed
  • No console.log in shipped paths; errors reported through @httpjpg/observability
  • Did not hand-edit the root package.json version, .release-please-manifest.json or CHANGELOG.md

notes for reviewers

  • No unused DESKTOP_ICON_SRC / fileKindFromSource barrel re-exports. Internal ./lib imports stay.
  • Related-work years now use shared formatYear (invalid dates stay hidden; wall-clock CMS dates keep the year from the string).
  • Storybook: Video poster/objectFit argTypes; FooterStatusLine onClick; ImageComparisonSlider onInteract; DesktopDownloads cursor copy; leftover “Basic X with live controls” JSDoc stripped.
  • Tests cover remaining analytics helpers, lightbox onClose, audio play/pause/skip callbacks, Tracked*Provider wiring, related-work / work-nav / locale / ask error+action events.
  • Deps left to open Renovate PRs: commitlint (deps: update dev dependencies to ^21.2.3 #453), vitest 5 (deps: update vitest monorepo to v5 #424), pnpm 12 (deps: update pnpm to v12 #422).
  • Coverage: statements 96.92%, lines 97.15%, functions 95.53%, branches 93.18%. Lint, type-check, and 2461 unit tests passed. Build was not re-run (no production bundle change beyond formatYear).
  • Only cleanup PR; weekly-cleanup label applied after open. Previous weekly cleanup refactor: weekly cleanup for shared ICON_NAMES, story catalog, and agent docs #441 is merged.
Open in Web View Automation 

@dmnktoe dmnktoe added the weekly-cleanup label Sep 22, 2026 — with Cursor
…orts, and agent docs

Stop re-exporting unused desktop-download helpers, share formatYear on
related work, sync Storybook docs after the analytics and video work,
and cover the new track* helpers plus provider callbacks.
@cursor
cursor Bot force-pushed the cursor/bc-c876aa9f-328c-4a4c-aced-b770fd44efe9-69fe branch from 3b11165 to fd17d69 Compare September 22, 2026 22:23
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 1.1kB (-0.01%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
portfolio-server-cjs 11.16MB -1.0kB (-0.01%) ⬇️
portfolio-client-array-push 3.52MB -103 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: portfolio-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1570.js -960 bytes 242.88kB -0.39%
../app/(portfolio)/[...slug]/page.js -32 bytes 162.26kB -0.02%
731.js (New) 70.32kB 70.32kB 100.0% 🚀
../app/(portfolio)/cookie-policy/page.js -1 bytes 24.79kB -0.0%
../app/page.js -1 bytes 7.28kB -0.01%
1361.js (New) 6.74kB 6.74kB 100.0% 🚀
../app/_not-found/page.js -1 bytes 4.04kB -0.02%
../app/(portfolio)/[...slug]/page.js.nft.json -1 bytes 1.29kB -0.08%
../app/page.js.nft.json -1 bytes 872 bytes -0.11%
../app/(portfolio)/cookie-policy/page.js.nft.json -1 bytes 800 bytes -0.12%
8679.js (New) 617 bytes 617 bytes 100.0% 🚀
9162.js (New) 617 bytes 617 bytes 100.0% 🚀
../app/_not-found/page.js.nft.json -1 bytes 567 bytes -0.18%
4038.js (Deleted) -70.32kB 0 bytes -100.0% 🗑️
3478.js (Deleted) -6.74kB 0 bytes -100.0% 🗑️
8647.js (Deleted) -617 bytes 0 bytes -100.0% 🗑️
4773.js (Deleted) -617 bytes 0 bytes -100.0% 🗑️

App Routes Affected:

App Route Size Change Total Size Change (%)
/ -3 bytes 352.21kB -0.0%
/(portfolio) -33 bytes 439.19kB -0.01%
/(portfolio)/cookie-policy -1 bytes 276.93kB -0.0%
/(portfolio)/[...slug] -32 bytes 414.4kB -0.01%
view changes for bundle: portfolio-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/2110-*.js -62 bytes 192.87kB -0.03%
static/chunks/153-*.js -1 bytes 28.36kB -0.0%
static/chunks/app/(portfolio)/[...slug]/page-*.js -31 bytes 14.32kB -0.22%
static/chunks/155-*.js -1 bytes 6.61kB -0.02%
static/chunks/webpack-*.js -1 bytes 3.52kB -0.03%
static/fci1K70QDxqjc_NjBuvuu/_buildManifest.js (New) 1.5kB 1.5kB 100.0% 🚀
react-*.json -2 bytes 900 bytes -0.22%
server/middleware-*.js -347 bytes 495 bytes -41.21%
server/middleware-*.js 345 bytes 840 bytes 69.7% ⚠️
static/chunks/7874.*.js (New) 679 bytes 679 bytes 100.0% 🚀
static/chunks/706.*.js (New) 678 bytes 678 bytes 100.0% 🚀
static/fci1K70QDxqjc_NjBuvuu/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/Hy3WVqOJfY4bdOL2YXLw6/_buildManifest.js (Deleted) -1.5kB 0 bytes -100.0% 🗑️
static/chunks/2693.*.js (Deleted) -680 bytes 0 bytes -100.0% 🗑️
static/chunks/3619.*.js (Deleted) -680 bytes 0 bytes -100.0% 🗑️
static/Hy3WVqOJfY4bdOL2YXLw6/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

App Routes Affected:

App Route Size Change Total Size Change (%)
/ -3 bytes 77.93kB -0.0%

@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.52%. Comparing base (8e2c43c) to head (fd17d69).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #456      +/-   ##
==========================================
+ Coverage   96.95%   97.52%   +0.57%     
==========================================
  Files         360      360              
  Lines        9551     9551              
  Branches     3191     3100      -91     
==========================================
+ Hits         9260     9315      +55     
+ Misses        285      230      -55     
  Partials        6        6              
Components Coverage Δ
ui 98.09% <ø> (+0.18%) ⬆️
storyblok 96.84% <ø> (ø)
integrations 94.48% <ø> (+3.93%) ⬆️
foundations 92.10% <ø> (ø)
portfolio 98.01% <100.00%> (+0.83%) ⬆️
Files with missing lines Coverage Δ
apps/portfolio/components/ui/related-work-card.tsx 100.00% <100.00%> (ø)
apps/portfolio/components/ui/related-work-row.tsx 100.00% <100.00%> (ø)
...components/desktop-downloads/desktop-downloads.tsx 100.00% <ø> (ø)

... and 6 files with indirect coverage changes

@dmnktoe
dmnktoe marked this pull request as ready for review September 23, 2026 08:26
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.

2 participants