Skip to content

fix: Treat onboarding patch updates as completed#1884

Merged
elibosley merged 1 commit intomainfrom
codex/update-onboarding-visibility-for-patch-releases
Mar 5, 2026
Merged

fix: Treat onboarding patch updates as completed#1884
elibosley merged 1 commit intomainfrom
codex/update-onboarding-visibility-for-patch-releases

Conversation

@elibosley
Copy link
Member

@elibosley elibosley commented Mar 5, 2026

Motivation

  • Prevent the onboarding modal from reappearing for patch-level releases when a user already completed onboarding on a previous patch of the same minor release.

Description

  • Update hasOnboardingVersionDrift in onboarding-status.util.ts to ignore differences when major and minor are equal so patch bumps do not count as drift.
  • Update getOnboardingVersionDirection to return undefined for same major+minor to avoid signaling UPGRADE/DOWNGRADE on patch updates.
  • Add unit tests to cover patch-to-patch behavior in customization.resolver.spec.ts and onboarding.mutation.spec.ts to ensure completed onboarding remains COMPLETED for same minor releases.

Testing

  • Ran the targeted vitest cases with pnpm --filter ./api exec vitest run src/unraid-api/graph/resolvers/customization/customization.resolver.spec.ts src/unraid-api/graph/resolvers/onboarding/onboarding.mutation.spec.ts, and the run succeeded with Test Files 2 passed (2) and Tests 16 passed (16).
  • pnpm --filter api lint:fix executed as part of the commit hooks and completed successfully.

Codex Task

Summary by CodeRabbit

  • Bug Fixes

    • Fixed onboarding status reporting to correctly display COMPLETED when the onboarding version is a prior patch of the current minor version.
  • Tests

    • Added test cases to verify onboarding status handling across patch versions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Walkthrough

The pull request adds test cases to verify onboarding behavior when completed versions are prior patches within the same minor version, and introduces version comparison guards in utility logic to treat matching major.minor versions as equivalent.

Changes

Cohort / File(s) Summary
Onboarding Version Comparison Logic
api/src/unraid-api/graph/resolvers/onboarding/onboarding-status.util.ts
Adds early-return guards using semver major/minor helpers in hasOnboardingVersionDrift and getOnboardingVersionDirection to treat patch-version differences within the same minor version as equivalent before performing deeper version comparisons.
Onboarding Test Coverage
api/src/unraid-api/graph/resolvers/customization/customization.resolver.spec.ts, api/src/unraid-api/graph/resolvers/onboarding/onboarding.mutation.spec.ts
Adds new test cases verifying correct status resolution (COMPLETED) when onboarding is completed on a prior patch version within the current minor version, with appropriate mock setup for version and state getters.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A patch, a fix, a minor dance,
versions drift, yet still advance,
same-major floors keep unity,
tests confirm the harmony! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'fix: Treat onboarding patch updates as completed' accurately summarizes the main change: preventing onboarding modal reappearance for patch-level releases by treating patch updates as already completed.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-onboarding-visibility-for-patch-releases

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

@elibosley elibosley requested a review from Ajit-Mehrotra March 5, 2026 15:31
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.63%. Comparing base (db88eb8) to head (458ea48).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...aph/resolvers/onboarding/onboarding-status.util.ts 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1884      +/-   ##
==========================================
+ Coverage   48.08%   48.63%   +0.55%     
==========================================
  Files        1002     1013      +11     
  Lines       66502    67606    +1104     
  Branches     6675     6931     +256     
==========================================
+ Hits        31978    32882     +904     
- Misses      34403    34603     +200     
  Partials      121      121              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1884/dynamix.unraid.net.plg

@elibosley elibosley changed the title Treat onboarding patch updates as completed fix: Treat onboarding patch updates as completed Mar 5, 2026
@elibosley elibosley merged commit d03b25e into main Mar 5, 2026
13 checks passed
@elibosley elibosley deleted the codex/update-onboarding-visibility-for-patch-releases branch March 5, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant