Add health endpoint

This commit is contained in:
Jack Kingsman
2026-03-12 19:47:21 -07:00
parent 338f632514
commit 2710cafb21
18 changed files with 607 additions and 73 deletions
@@ -278,11 +278,6 @@ export function ContactInfoPane({
<span className="text-[10px] uppercase tracking-wider px-1.5 py-0.5 rounded bg-muted text-muted-foreground font-medium">
{CONTACT_TYPE_LABELS[contact.type] ?? 'Unknown'}
</span>
{contact.on_radio && (
<span className="text-[10px] uppercase tracking-wider px-1.5 py-0.5 rounded bg-primary/10 text-primary font-medium">
On Radio
</span>
)}
</div>
</div>
</div>
@@ -113,6 +113,19 @@ export function SettingsAboutSection({ className }: { className?: string }) {
</a>
</p>
</div>
<Separator />
<div className="text-center">
<a
href="/api/debug"
target="_blank"
rel="noopener noreferrer"
className="text-xs text-muted-foreground hover:text-primary hover:underline"
>
Open debug support snapshot
</a>
</div>
</div>
</div>
);
@@ -0,0 +1,23 @@
import { render, screen } from '@testing-library/react';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { SettingsAboutSection } from '../components/settings/SettingsAboutSection';
describe('SettingsAboutSection', () => {
beforeEach(() => {
vi.stubGlobal('__APP_VERSION__', '3.2.0-test');
vi.stubGlobal('__COMMIT_HASH__', 'deadbeef');
});
afterEach(() => {
vi.unstubAllGlobals();
});
it('renders the debug support snapshot link', () => {
render(<SettingsAboutSection />);
const link = screen.getByRole('link', { name: /Open debug support snapshot/i });
expect(link).toHaveAttribute('href', '/api/debug');
expect(link).toHaveAttribute('target', '_blank');
});
});