diff --git a/frontend-modern/browser-verification/fbe1702c20820db4.json b/frontend-modern/browser-verification/fbe1702c20820db4.json
new file mode 100644
index 0000000000..25adab9a0c
--- /dev/null
+++ b/frontend-modern/browser-verification/fbe1702c20820db4.json
@@ -0,0 +1,37 @@
+{
+ "version": 1,
+ "base_sha": "1bf7be29811cbb40eddbd105d671971276743940",
+ "verified_at": "2026-11-20T09:39:32Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Login.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Login.tsx": "405c92eeac595ce065d1fd9cbcc18b1c818f3cee4c869d7a165193f502c5fc9d"
+ },
+ "routes": [
+ "/login",
+ "/docs/TROUBLESHOOTING"
+ ],
+ "viewports": [
+ {
+ "width": 1366,
+ "height": 820
+ },
+ {
+ "width": 320,
+ "height": 700
+ }
+ ],
+ "states": [
+ "Real Pulse App at /login with local fixture replies to the existing security-status, health and demo login requests; Playwright 1.56.1, desktop Chromium 141 light and narrow WebKit 26 dark.",
+ "Matched native pixel review: the empty sign-in card now explains the hidden local form and unlisted SSO choices without obscuring keyboard-focusable Help.",
+ "Pending Demo Mode and SSO-only views are unchanged in both pairs. After a demo refusal, the banner names the incomplete attempt and qualifies the already visible manual instructions. After reload it gives only the qualified instructions.",
+ "Ten desktop and narrow before/after pairs, no horizontal overflow. Ordinary local fields remain available when offered; no real IdP, installed sign-in or release exercised."
+ ],
+ "interactions": [
+ "198 baseline and 208 candidate browser assertions. Tab and Enter reach the Troubleshooting route from the empty chooser.",
+ "A held demo POST renders the existing progress. Its synthetic 401 replaces progress in the same live region without showing raw reply text or stealing focus from Help. Reload in the same tab does not submit again.",
+ "Tab and Enter activate the advertised local SSO fixture URL. No local password form or credential POST is added when it is hidden."
+ ]
+}
diff --git a/frontend-modern/src/components/Login.tsx b/frontend-modern/src/components/Login.tsx
index a5c42ce268..0a10c67100 100644
--- a/frontend-modern/src/components/Login.tsx
+++ b/frontend-modern/src/components/Login.tsx
@@ -518,23 +518,25 @@ const LoginForm: Component<{
Demo Mode
-
- Login with{' '}
-
- demo
- {' '}
- /{' '}
-
- demo
-
-
- }
- >
-
- Signing you in to the demo…
+
+ {demoAutoLogin()
+ ? 'Signing you in to the demo…'
+ : !showLocalLogin && error()
+ ? 'Automatic demo sign-in didn’t complete.'
+ : ''}
+
+
+
+ {showLocalLogin
+ ? 'Login with'
+ : 'The local sign-in form is hidden. If your administrator offers local sign-in, use'}{' '}
+
+ demo
+ {' '}
+ /{' '}
+
+ demo
+
@@ -563,6 +565,15 @@ const LoginForm: Component<{
class="mt-8 space-y-6 bg-surface rounded-md p-8 shadow-xs border border-border animate-slide-up"
onSubmit={handleSubmit}
>
+
+
+
No sign-in options on this page
+
+ The local sign-in form is hidden and Pulse didn’t list a single sign-on provider.
+ Ask your Pulse administrator how to sign in.
+
+
+
{/* Multi-Provider SSO Section */}
0}>
diff --git a/frontend-modern/src/components/__tests__/Login.test.tsx b/frontend-modern/src/components/__tests__/Login.test.tsx
index 8c5bf7e165..abc5531ea2 100644
--- a/frontend-modern/src/components/__tests__/Login.test.tsx
+++ b/frontend-modern/src/components/__tests__/Login.test.tsx
@@ -125,6 +125,32 @@ describe('Login', () => {
'href',
'/docs/TROUBLESHOOTING',
);
+ expect(screen.queryByRole('heading', { name: 'No sign-in options on this page' })).toBeNull();
+ });
+
+ it('explains a discovered hidden form without guessing a provider or offering setup', async () => {
+ mockFetch.mockResolvedValueOnce(
+ new Response(JSON.stringify({ hasAuthentication: true, hideLocalLogin: true }), {
+ status: 200,
+ headers: { 'Content-Type': 'application/json' },
+ }),
+ );
+ const onLogin = vi.fn();
+ render(() => );
+
+ expect(
+ await screen.findByRole('heading', { name: 'No sign-in options on this page' }),
+ ).toBeVisible();
+ expect(screen.getByText(/Ask your Pulse administrator how to sign in/)).toBeVisible();
+ expect(screen.queryByPlaceholderText('Username')).toBeNull();
+ expect(screen.queryByRole('button')).toBeNull();
+ expect(screen.getByRole('link', { name: 'Can’t sign in?' })).toHaveAttribute(
+ 'href',
+ '/docs/TROUBLESHOOTING',
+ );
+ expect(mockFetch).toHaveBeenCalledTimes(1);
+ expect(mockFetch.mock.calls[0][0]).toBe('/api/security/status');
+ expect(onLogin).not.toHaveBeenCalled();
});
it('shows local login form when show_local=true is in URL even if hideLocalLogin is true', async () => {
@@ -184,14 +210,14 @@ describe('Login', () => {
expect(mockFetch).not.toHaveBeenCalledWith('/api/security/status');
});
- it('shows demo credentials when the visitor has signed out of the demo', async () => {
+ it.each([false, true])('shows demo credentials after sign-out (hidden=%s)', async (hidden) => {
// A sign-out marks the tab so the page does not sign the visitor straight
// back in; the printed credentials are the way back.
window.sessionStorage.setItem(SESSION_STORAGE_KEYS.DEMO_AUTO_LOGIN, 'suppressed');
const mockOnLogin = vi.fn();
const securityStatus = {
hasAuthentication: true,
- hideLocalLogin: false,
+ hideLocalLogin: hidden,
sessionCapabilities: { demoMode: true },
};
@@ -201,11 +227,17 @@ describe('Login', () => {
expect(await screen.findByText('Demo Mode')).toBeInTheDocument();
expect(screen.getAllByText('demo')).toHaveLength(2);
+ expect(screen.queryByText('Signing you in to the demo…')).toBeNull();
+ if (hidden) {
+ expect(screen.getByRole('status')).toBeEmptyDOMElement();
+ expect(screen.getByText(/The local sign-in form is hidden/)).toBeVisible();
+ expect(screen.queryByPlaceholderText('Username')).toBeNull();
+ }
expect(mockFetch).not.toHaveBeenCalledWith('/api/login', expect.anything());
expect(mockOnLogin).not.toHaveBeenCalled();
});
- it('signs the visitor in with the demo credentials when the runtime is in demo mode', async () => {
+ it.each([false, true])('signs in to the demo (hidden=%s)', async (hidden) => {
const mockOnLogin = vi.fn();
mockFetch.mockResolvedValueOnce(
new Response(JSON.stringify({ success: true }), {
@@ -215,7 +247,7 @@ describe('Login', () => {
);
const securityStatus = {
hasAuthentication: true,
- hideLocalLogin: false,
+ hideLocalLogin: hidden,
presentationPolicy: { demoMode: true },
};
@@ -258,6 +290,48 @@ describe('Login', () => {
expect(mockOnLogin).not.toHaveBeenCalled();
});
+ it('keeps hidden-form demo progress and refusal in one live region without exposing the reply', async () => {
+ let finish!: (response: Response) => void;
+ mockFetch.mockReturnValueOnce(
+ new Promise((resolve) => {
+ finish = resolve;
+ }),
+ );
+ const onLogin = vi.fn();
+ const securityStatus = {
+ hasAuthentication: true,
+ hideLocalLogin: true,
+ presentationPolicy: { demoMode: true },
+ };
+ render(() => );
+ const status = screen.getByRole('status');
+ const help = screen.getByRole('link', { name: 'Can’t sign in?' });
+ help.focus();
+
+ expect(screen.getByText('Demo Mode')).toBeVisible();
+ expect(status).toHaveTextContent('Signing you in to the demo…');
+ expect(screen.queryByRole('heading', { name: 'No sign-in options on this page' })).toBeNull();
+ expect(screen.queryByText(/^demo$/)).toBeNull();
+
+ finish(
+ new Response(JSON.stringify({ success: false, message: 'Synthetic provider detail' }), {
+ status: 401,
+ }),
+ );
+
+ await waitFor(() =>
+ expect(status).toHaveTextContent('Automatic demo sign-in didn’t complete.'),
+ );
+ expect(screen.getByRole('status')).toBe(status);
+ expect(screen.getByText(/The local sign-in form is hidden/)).toBeVisible();
+ expect(screen.getAllByText('demo')).toHaveLength(2);
+ expect(screen.queryByText('Synthetic provider detail')).toBeNull();
+ expect(screen.queryByPlaceholderText('Username')).toBeNull();
+ expect(help).toHaveFocus();
+ expect(mockFetch.mock.calls.filter(([url]) => url === '/api/login')).toHaveLength(1);
+ expect(onLogin).not.toHaveBeenCalled();
+ });
+
it('does not restart demo sign-in when pending settles and the tab marker cannot be saved', async () => {
const setItem = vi.spyOn(Storage.prototype, 'setItem').mockImplementationOnce(() => {
throw new Error('storage unavailable');