Skip to content

Render managed auth field input modes - #29

Open
masnwilliams wants to merge 7 commits into
mainfrom
hypeship/render-field-input-mode
Open

Render managed auth field input modes#29
masnwilliams wants to merge 7 commits into
mainfrom
hypeship/render-field-input-mode

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

summary

  • preserve optional canonical field input_mode values in the existing UI model
  • apply the hint through React’s inputMode prop while keeping identifier inputs as type="text"
  • retain compatibility with API events that omit the new field

dependencies

  • depends on Render generic identifiers as text inputs #28, which keeps canonical identifiers free of browser-native format validation
  • merge after kernel/kernel#3693 is deployed; older API responses remain compatible but do not carry input modes
  • kernel/managed-auth-agent#87 begins emitting host-observed hints

testing

  • bun test
  • bun run build
  • bun run typecheck
  • bun run format:check

Note

Low Risk
UI-only input typing and autofill hints for login forms; backward compatible when input_mode is omitted.

Overview
Adds optional input_mode on canonical managed-auth fields and threads it through normalization into DiscoveredField, exporting the new InputMode type from the package.

Identifier handling: canonical identifier fields always render as type="text" (no more inferring email/tel from ref), so combined login fields accept any format without browser-native validation. inputMode and autoComplete now follow input_mode when set (email/tel), while OTP fields still prefer one-time-code; mixed identifier fields with input_mode: "text" no longer get email autofill.

UnifiedAuthForm passes inputMode on password and text inputs. Tests cover autocomplete precedence, DOM props, and state projection.

Reviewed by Cursor Bugbot for commit a157e0b. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
managed-auth-react-demo Ready Ready Preview Sep 10, 2026 6:43pm UTC

@masnwilliams
masnwilliams changed the base branch from hypeship/render-identifiers-as-text to main August 31, 2026 22:16
@masnwilliams
masnwilliams changed the base branch from main to hypeship/render-identifiers-as-text August 31, 2026 22:16
@masnwilliams masnwilliams changed the title hypeship/render field input mode Render managed auth field input modes Aug 31, 2026
@masnwilliams
masnwilliams changed the base branch from hypeship/render-identifiers-as-text to main August 31, 2026 22:39
Comment thread packages/managed-auth-react/src/session/state.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0770c2a. Configure here.

Comment thread packages/managed-auth-react/src/components/UnifiedAuthForm.tsx Outdated

@akxue akxue left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

reviewed — lgtm, approve. two non-blockers:

  • packages/managed-auth-react/src/components/UnifiedAuthForm.test.ts — worth adding a test pinning the ordering: input_mode should take precedence over the ref-based username heuristic (e.g. ref: "username" + input_mode: "email""email"), so the precedence is deliberate rather than emergent
  • packages/managed-auth-react/src/session/state.ts:68 — nit: ...(field.input_mode ? { input_mode: field.input_mode } : {}) can just be input_mode: field.input_mode since the prop is already optional

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