Skip to content

docs(ui): add stories for Translation Status page#2559

Merged
ghostdevv merged 3 commits intonpmx-dev:mainfrom
cylewaitforit:sb-translation-status-page
Apr 20, 2026
Merged

docs(ui): add stories for Translation Status page#2559
ghostdevv merged 3 commits intonpmx-dev:mainfrom
cylewaitforit:sb-translation-status-page

Conversation

@cylewaitforit
Copy link
Copy Markdown
Contributor

@cylewaitforit cylewaitforit commented Apr 17, 2026

🔗 Linked issue

#2150

🧭 Context

This would enable a storybook mock page, storybook a11y checks, and chromatic visual regression tests for this page as documented by the storybook stories.

📚 Description

Adds stories for Translation Status page.

Moved i18nStatusHandler into its own file in a new handlers directory since the amount of mock data in that handler had grown considerably to support mocking this page.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Apr 20, 2026 1:34pm
npmx.dev Ready Ready Preview, Comment Apr 20, 2026 1:34pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Apr 20, 2026 1:34pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 63bd2c96-f37c-4a15-a977-cebd29fa4c57

📥 Commits

Reviewing files that changed from the base of the PR and between f55046e and 164bece.

📒 Files selected for processing (4)
  • app/pages/settings.stories.ts
  • app/pages/translation-status.stories.ts
  • app/storybook/mocks/handlers.ts
  • app/storybook/mocks/handlers/lunaria-status.ts
💤 Files with no reviewable changes (1)
  • app/storybook/mocks/handlers.ts
✅ Files skipped from review due to trivial changes (1)
  • app/storybook/mocks/handlers/lunaria-status.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/pages/settings.stories.ts
  • app/pages/translation-status.stories.ts

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive Storybook stories for the translation status page, including scenarios with and without translation data to demonstrate different UI states.
  • Refactor

    • Reorganised mock handlers into dedicated modules for improved code maintainability and structure.

Walkthrough

Refactored the i18nStatusHandler MSW mock from the shared handlers file into a dedicated lunaria-status.ts module. Updated Storybook story imports to use the new handler location. Added a new translation-status Storybook stories file with default and no-data variants.

Changes

Cohort / File(s) Summary
Storybook Stories
app/pages/settings.stories.ts, app/pages/translation-status.stories.ts
Updated settings story import path for i18nStatusHandler from ../storybook/mocks/handlers to ../storybook/mocks/handlers/lunaria-status. Added new translation-status stories with default and loading-state variants.
MSW Handler Refactoring
app/storybook/mocks/handlers.ts, app/storybook/mocks/handlers/lunaria-status.ts
Extracted i18nStatusHandler from main handlers file and moved to dedicated lunaria-status.ts module. Handler intercepts GET /lunaria/status.json and returns locale metadata including completion metrics, missing keys, and GitHub links.

Possibly related PRs

Suggested reviewers

  • ghostdevv
  • JReinhold
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding Storybook stories for the Translation Status page, which aligns with the primary objectives of the pull request.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding stories for the Translation Status page and the rationale for moving i18nStatusHandler to its own file.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Comment thread app/pages/translation-status.stories.ts
@cylewaitforit cylewaitforit marked this pull request as ready for review April 17, 2026 18:01
Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.storybook/handlers/lunaria-status.ts:
- Around line 160-177: The pt-PT missingKeys array in
.storybook/handlers/lunaria-status.ts contains a duplicate entry
'package.license', causing the list length to be off; open the missingKeys array
for locale 'pt-PT' (look for the literal array that includes 'package.license'
twice) and remove the duplicate so every key is unique, or replace the literal
with a deduplicated construct (e.g., build the array via a Set) so the count
equals totalKeys - completedKeys; ensure the final array contains 75 distinct
entries and update any inline comments if present.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1c161b07-b07a-4995-b755-af31190b0b52

📥 Commits

Reviewing files that changed from the base of the PR and between cbcdc54 and 8e8113c.

📒 Files selected for processing (4)
  • .storybook/handlers.ts
  • .storybook/handlers/lunaria-status.ts
  • app/pages/settings.stories.ts
  • app/pages/translation-status.stories.ts
💤 Files with no reviewable changes (1)
  • .storybook/handlers.ts

Comment thread .storybook/handlers/lunaria-status.ts Outdated
@ghostdevv ghostdevv added this pull request to the merge queue Apr 20, 2026
Merged via the queue into npmx-dev:main with commit 8b5edf2 Apr 20, 2026
21 checks passed
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