Skip to content

Render managed auth field input modes - #29

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

Render managed auth field input modes#29
masnwilliams wants to merge 5 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
Auth form input typing and autofill hints only; behavior is more permissive for identifiers and remains backward compatible when input_mode is omitted.

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

Identifier fields are no longer mapped to type="email" or type="tel" from ref; they render as type="text" so combined login fields (e.g. “mobile, username, or email”) are not subject to browser-native format validation. Hints come from React’s inputMode prop instead, with autoComplete driven by input_mode for dedicated email/phone fields while mixed identifiers with input_mode: "text" skip inferred email autofill. One-time-code fields still take one-time-code over keyboard hints.

Tests cover autocomplete precedence, mixed-identifier behavior, and that email hints use inputMode="email" with type="text".

Reviewed by Cursor Bugbot for commit bf2f95e. 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 (UTC)
managed-auth-react-demo Ready Ready Preview Aug 31, 2026 11:06pm

@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