Skip to content

Add About section to settings page with version info and tests#119

Merged
tiann merged 2 commits intotiann:mainfrom
trustin:about
Jan 30, 2026
Merged

Add About section to settings page with version info and tests#119
tiann merged 2 commits intotiann:mainfrom
trustin:about

Conversation

@trustin
Copy link
Contributor

@trustin trustin commented Jan 29, 2026

Motivation

Users currently have no way to see the application version or protocol version within the web app. This information is useful for troubleshooting, reporting issues, and verifying they are running the expected version.

Modifications

  • Added an "About" section to the settings page displaying:
    • Website link (hapi.run) with proper security attributes (target="_blank", rel="noopener noreferrer")
    • App version (injected via Vite's define at build time)
    • Protocol version (imported from @hapi/protocol)
  • Added i18n keys for the About section in both English and Chinese locales (settings.about.title, settings.about.website, settings.about.appVersion, settings.about.protocolVersion)
  • Set up Vitest testing infrastructure for the web package:
    • Added vitest.config.ts with jsdom environment
    • Added test setup file with jest-dom matchers
    • Added __APP_VERSION__ global type declaration
    • Configured Vite to define __APP_VERSION__ from package.json
  • Added comprehensive tests for the About section verifying:
    • Section renders correctly
    • Version values display properly
    • Website link has correct URL and security attributes
    • Correct i18n keys are used

Result

  • Users can now view the app version and protocol version in Settings > About
  • Users can click the website link to visit hapi.run in a new tab
  • The web package now has a testing infrastructure for writing component tests

🤖 Generated with Claude Code

- Add website link to hapi.run
- Display app version from CLI package
- Display protocol version from shared module
- Add Vitest testing setup with settings page tests

🤖 Generated with Claude Code
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Findings

  • None.

Summary

  • No issues found in diff.
  • Residual risk: About section tests cover render/version strings only; no coverage for website link or localization variants.

Testing

  • Not run (automation).

HAPI Bot

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Findings

  • None.

Summary

  • No issues found in diff.
  • Residual risk: About section tests cover render/version strings only; no coverage for website link or localization variants.

Testing

  • Not run (automation).

HAPI Bot

@trustin
Copy link
Contributor Author

trustin commented Jan 29, 2026

Addressed the residual risks mentioned in the review:

  • Added test for website link URL and security attributes (target="_blank", rel="noopener noreferrer")
  • Added test verifying correct i18n keys are used for the About section via spy function

🤖 Generated with Claude Code

Address residual risks mentioned in PR review:
- Test website link URL and security attributes (target, rel)
- Verify correct i18n keys are used for About section via spy

Simplify test setup by using real I18nProvider and en locale.

🤖 Generated with Claude Code
@tiann tiann merged commit 7cad11c into tiann:main Jan 30, 2026
1 check passed
@trustin trustin deleted the about branch January 30, 2026 03:06
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