Skip to content

feat: add notification for admins when they are not on latest nao version#719

Open
ClaireGz wants to merge 1 commit intomainfrom
claude/infallible-swartz-741a89
Open

feat: add notification for admins when they are not on latest nao version#719
ClaireGz wants to merge 1 commit intomainfrom
claude/infallible-swartz-741a89

Conversation

@ClaireGz
Copy link
Copy Markdown
Contributor

@ClaireGz ClaireGz commented May 4, 2026

Closes #569

Summary

  • Adds a backend endpoint (system.checkUpdate) that fetches the latest nao release from GitHub and compares it with the current APP_VERSION
  • Shows a small amber warning notification at the bottom of the left sidebar when the deployed version is outdated — links to the release page
  • Admin-only: non-admin users don't see the notification and can't call the endpoint
  • Works for both CLI (APP_VERSION=dev by default) and Docker deployments (version set via build arg)
  • Backend caches the GitHub check for 1 hour to avoid rate limiting

Changed files

  • apps/backend/src/services/version-check.service.ts — new service: fetches latest GitHub release, semver comparison with rc support, 1-hour in-memory cache
  • apps/backend/src/trpc/system.routes.ts — new checkUpdate admin-protected route
  • apps/frontend/src/components/sidebar-version-notice.tsx — new component: amber warning with tooltip when collapsed
  • apps/frontend/src/components/sidebar.tsx — wires the notice into the sidebar bottom section (admin-only)

Notes

The original issue also mentioned showing release notes in the admin panel — this PR ships the floating notification only. Release notes in settings can be a follow-up if useful.

Test plan

  • Deploy with an older APP_VERSION and verify the notification appears for admin users
  • Verify the notification does NOT appear for non-admin users
  • Verify the notification links to the correct GitHub release page
  • Verify the collapsed sidebar shows a tooltip on hover
  • Test with APP_VERSION=dev (default local development) — should show the notice
  • Test with the latest version — notification should not appear
  • Verify no GitHub API errors when offline (graceful failure, no notification shown)

🤖 Generated with Claude Code

Checks the latest GitHub release and shows a warning in the sidebar
bottom when the deployed version is outdated. Only visible to admins.
Backend caches the check result for 1 hour.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🚀 Preview Deployment

URL https://pr-719-6e7e211.preview.getnao.io
Commit 6e7e211

⚠️ No LLM API keys configured - you'll see the API key setup flow when trying to chat.


Preview will be automatically removed when this PR is closed.

@ClaireGz ClaireGz changed the title feat: add version update notification for admins feat: add notification for admins when they are not on latest nao version May 4, 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.

Add a notification in nao UI when user is not on the latest version

1 participant