Skip to content

Conversation

@shuuji3
Copy link
Member

@shuuji3 shuuji3 commented Feb 8, 2026

⚠️ Note: This PR is forked from the branch #1183 for experiments. Do not merge.

This is an experimental PR for better test reportings on GitHub Actions. I update .github/workflows/ci.yml to add test-summary/action (run always) and upload test result files as Artifacts when the test failed so that we can examine locally the HTML test reports by downloading the artifact.

serhalp and others added 7 commits February 7, 2026 19:06
I've been working on a PR to add "likes" as a new facet that can be visualized
in what I'm calling "trends" charts (e.g. downloads over time, likes over time).
That PR generalizes the existing "downloads" chart to support one or more given facets.

I've had a half dozen painful merge conflicts across 37 locale files, so I've pulled
out just this i18n key rename into its own PR to make this all easier.
@vercel
Copy link

vercel bot commented Feb 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 8, 2026 10:46am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 8, 2026 10:46am
npmx-lunaria Ignored Ignored Feb 8, 2026 10:46am

Request Review

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/ar-EG.json Localization changed, will be marked as complete.
lunaria/files/az-AZ.json Localization changed, will be marked as complete.
lunaria/files/cs-CZ.json Localization changed, will be marked as complete.
lunaria/files/de-DE.json Localization changed, will be marked as complete.
lunaria/files/en-GB.json Localization changed, will be marked as complete.
lunaria/files/en-US.json Source changed, localizations will be marked as outdated.
lunaria/files/es-419.json Localization changed, will be marked as complete.
lunaria/files/es-ES.json Localization changed, will be marked as complete.
lunaria/files/fr-FR.json Localization changed, will be marked as complete.
lunaria/files/hi-IN.json Localization changed, will be marked as complete.
lunaria/files/hu-HU.json Localization changed, will be marked as complete.
lunaria/files/id-ID.json Localization changed, will be marked as complete.
lunaria/files/it-IT.json Localization changed, will be marked as complete.
lunaria/files/ja-JP.json Localization changed, will be marked as complete.
lunaria/files/ne-NP.json Localization changed, will be marked as complete.
lunaria/files/no-NO.json Localization changed, will be marked as complete.
lunaria/files/pl-PL.json Localization changed, will be marked as complete.
lunaria/files/pt-BR.json Localization changed, will be marked as complete.
lunaria/files/ru-RU.json Localization changed, will be marked as complete.
lunaria/files/te-IN.json Localization changed, will be marked as complete.
lunaria/files/uk-UA.json Localization changed, will be marked as complete.
lunaria/files/zh-CN.json Localization changed, will be marked as complete.
lunaria/files/zh-TW.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

This PR updates the CI workflow and the i18n translations. The CI changes switch test runners to emit default, JUnit and HTML reporters, add test-summary rendering steps, and add conditional artifact uploads for unit, component and browser reports (naming: unit-test-report, component-test-report, playwright-report), while preserving existing coverage/upload steps. The UI changes move many download-related translation keys from package.downloads.* into a new package.trends.* namespace and adjust Vue components to use the package.trends.* keys; corresponding edits were applied across ~30 locale files in i18n and lunaria.

Possibly related PRs

Suggested reviewers

  • danielroe
  • wojtekmaj
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly describes changes to CI workflow for test reporting and artifact uploads, which aligns with file modifications in .github/workflows/ci.yml and i18n localization files.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 15

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
lunaria/files/zh-CN.json (1)

369-388: ⚠️ Potential issue | 🟠 Major

Add missing package.trends keys to zh-CN.json to prevent runtime fallback.

The zh-CN.json file is missing four keys that exist in en-US.json under package.trends: items.downloads, legend_estimation, no_data, and y_axis_label. These missing keys will cause the application to fall back to untranslated raw key strings at runtime. Add Chinese translations for these four keys to achieve parity with the base locale.

No stale references to old package.downloads.* keys were found in the codebase.

app/pages/compare.vue (1)

241-246: ⚠️ Potential issue | 🟡 Minor

Add compare.facets.trends.title to all locales.

The new heading now relies on compare.facets.trends.title; several provided locale files (zh-TW, ru-RU, ja-JP, it-IT and Lunaria it-IT) don’t show this key yet. Please add translations there to avoid missing-key fallbacks at runtime/i18n checks.

🟡 Minor comments (8)
lunaria/files/hu-HU.json-305-316 (1)

305-316: ⚠️ Potential issue | 🟡 Minor

Add missing date_range_multiline under package.trends.

date_range_multiline is absent here, which is likely to surface as a missing translation/fallback if the base locale defines it for the trends UI. Please add it to keep key parity.

lunaria/files/te-IN.json-250-263 (1)

250-263: ⚠️ Potential issue | 🟡 Minor

Add missing package.trends.no_data and package.trends.y_axis_label translations.

The new package.trends block doesn’t include the no_data and y_axis_label strings that were part of the downloads UI and are now expected under trends. This will cause missing‑key fallbacks for te‑IN if those keys are still referenced. Please add them here (or confirm their usage was removed everywhere).

lunaria/files/fr-FR.json-349-367 (1)

349-367: ⚠️ Potential issue | 🟡 Minor

Add labels for any additional trend facets.
Line 365–367 only defines downloads. If the trends chart now supports other facets (e.g., likes), those labels will otherwise fall back to raw keys in fr-FR.

Suggested addition
       "items": {
-        "downloads": "Téléchargements"
+        "downloads": "Téléchargements",
+        "likes": "Likes"
       }
i18n/locales/zh-CN.json-375-387 (1)

375-387: ⚠️ Potential issue | 🟡 Minor

Add missing package.trends strings to prevent fallback.
Please add translations for no_data, y_axis_label, legend_estimation, and items.downloads so the trends UI doesn’t fall back to English.

lunaria/files/es-419.json-379-392 (1)

379-392: ⚠️ Potential issue | 🟡 Minor

Add missing package.trends strings to avoid English fallback.
The new trends UI introduces no_data, y_axis_label, legend_estimation, and items.downloads in other locales; add equivalents here so this locale doesn’t fall back to English or raw keys.

i18n/locales/es.json-379-392 (1)

379-392: ⚠️ Potential issue | 🟡 Minor

Add missing package.trends strings to avoid fallback text.
no_data, y_axis_label, legend_estimation, and items.downloads exist in en but not here; without them, UI copy will fall back to English.

i18n/locales/id-ID.json-321-335 (1)

321-335: ⚠️ Potential issue | 🟡 Minor

Add missing package.trends strings to prevent English fallback.
Please add translations for no_data, y_axis_label, legend_estimation, and items.downloads to match the new trends UI.

i18n/locales/te-IN.json-250-263 (1)

250-263: ⚠️ Potential issue | 🟡 Minor

Add missing package.trends strings to avoid fallback.
Please add translations for no_data, y_axis_label, legend_estimation, and items.downloads so the trends UI doesn’t fall back to English.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

187-192: Pin the action to a commit SHA for consistency and security.

Line 189 uses actions/upload-artifact@v4 whilst other instances in this workflow (lines 97, 141) use the pinned SHA @b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0. Using unpinned version tags poses a supply chain risk as tags can be moved to point to different commits.

🔧 Suggested fix
       - name: ⬆︎ Upload browser test report
         if: failure()
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
         with:
           name: playwright-report
           path: playwright-report/

@shuuji3 shuuji3 changed the title refactor: generalize i18n keys for download trends ci: add test summary and upload failed unit/component test reports Feb 8, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Comment on lines +286 to +288
"trends": {
"items": {}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== Checking if i18n/locales directory exists ==="
ls -la i18n/locales/ 2>/dev/null | head -20 || echo "Directory not found, searching for locale files..."

echo ""
echo "=== Finding locale JSON files ==="
fd -t f '\.json$' i18n/locales 2>/dev/null | head -20

Repository: npmx-dev/npmx.dev

Length of output: 1761


🏁 Script executed:

#!/bin/bash

echo "=== Looking for zh-CN.json ==="
fd -t f 'zh' i18n/locales

echo ""
echo "=== Checking en.json for package.trends structure ==="
cat i18n/locales/en.json | jq '.package.trends // "trends not found"'

echo ""
echo "=== Checking if zh-CN.json exists ==="
if [ -f i18n/locales/zh-CN.json ]; then
  echo "zh-CN.json exists"
  echo "=== Checking zh-CN.json package.trends ==="
  cat i18n/locales/zh-CN.json | jq '.package.trends // "trends not found"'
else
  echo "zh-CN.json does not exist in i18n/locales/"
  echo "=== Listing all files in i18n/locales to verify ==="
  ls -la i18n/locales/
fi

Repository: npmx-dev/npmx.dev

Length of output: 892


Add missing translations to trends object; currently only empty items container exists.

The package.trends object in zh-CN.json is severely incomplete. The English locale (en.json) defines 16 translation keys (granularity labels, date range, loading states, axis labels, etc.) plus a "downloads" translation in items, but zh-CN.json provides none of these. Chinese (Simplified) users will encounter untranslated UI text for the trends feature.

All these keys must be translated and added to zh-CN.json: granularity, granularity_daily, granularity_weekly, granularity_monthly, granularity_yearly, start_date, end_date, loading, date_range, date_range_multiline, download_file, toggle_annotator, legend_estimation, no_data, y_axis_label, and items.downloads.

Comment on lines +286 to +288
"trends": {
"items": {}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Populate package.trends keys instead of an empty stub.

Line 286–Line 288 introduce package.trends.items as an empty object. Since trend-related keys were moved out of package.downloads, this will surface missing zh-CN strings (or fallback text). Please migrate the previously removed zh-CN translations into package.trends.*.

Comment on lines +923 to 925
},
"trends": {}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add translations for compare.facets.trends or remove the block.

Line 923–Line 925 adds an empty compare.facets.trends object. If the UI expects compare.facets.trends.* keys, this will render missing labels in zh-CN. Please populate the translations or omit the block until it’s wired up.

@shuuji3
Copy link
Member Author

shuuji3 commented Feb 8, 2026

I think I need to test this on my fork repository as ci.yaml needs to be merged to main branch.

@shuuji3 shuuji3 closed this Feb 8, 2026
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