feat(web): open official release notes via header os version#1003
feat(web): open official release notes via header os version#1003
Conversation
WalkthroughThe pull request introduces a new function Changes
Sequence DiagramsequenceDiagram
participant Component as HeaderOsVersion
participant Helper as urls.ts
participant Browser as Web Browser
Component->>Helper: Call getReleaseNotesUrl(osVersion)
Helper-->>Component: Return URL object
Component->>Browser: Open release notes in new tab
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
web/helpers/urls.ts (1)
28-36: Add input validation for version string format.The function assumes the version string will always be in the correct format. Consider adding validation to handle malformed version strings gracefully.
const getReleaseNotesUrl = (version: string): URL => { + if (!version || typeof version !== 'string') { + throw new Error('Version must be a non-empty string'); + } + if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9]+)?$/.test(version)) { + throw new Error('Invalid version format. Expected format: x.x.x or x.x.x-suffix'); + } const osVersion = version.split('-')[0]; return new URL(`/unraid-os/release-notes/${osVersion}`, DOCS); }web/components/HeaderOsVersion.ce.vue (1)
Line range hint
73-89: Consider enhancing keyboard accessibility.While the link implementation is good, consider adding keyboard focus styles for better accessibility.
<a - class="group leading-none" + class="group leading-none focus:outline-none focus:ring-2 focus:ring-orange-dark rounded" :title="t('View release notes')" :href="getReleaseNotesUrl(osVersion).toString()" target="_blank" rel="noopener" >
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (2)
web/components/HeaderOsVersion.ce.vue(3 hunks)web/helpers/urls.ts(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build Web App
- GitHub Check: Build and Test API
🔇 Additional comments (2)
web/components/HeaderOsVersion.ce.vue (2)
Line range hint
73-89: LGTM! Security best practices implemented correctly.Good job implementing security best practices with
target="_blank"andrel="noopener"for the external link.
13-13: Verify error handling for osVersion.The
getReleaseNotesUrlfunction is called directly in the template without error handling. Consider handling potential errors from malformed version strings.Also applies to: 76-76
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
|
@pujitm @zackspear one thing that has always bugged me about the header OS version is that it doesn't allow updating when clicked. I would like to be able to click the current version and get a prompt about an update if possible - or show release notes if not possible (or both)
|
|
@pujitm nice work dude @elibosley – great idea, I used to do the same. I'll create a follow up task for that where we can discuss with Larry & Tom to get them on board. |

Summary by CodeRabbit
New Features
Documentation