Skip to content

fix: fixed rendering sensitive inputs#55

Merged
gitsad merged 1 commit into
mainfrom
fix/sensitive-rendering
Jul 16, 2026
Merged

fix: fixed rendering sensitive inputs#55
gitsad merged 1 commit into
mainfrom
fix/sensitive-rendering

Conversation

@gitsad

@gitsad gitsad commented Jul 16, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Fixes sensitive-field rendering in the default form renderer of @mobile-reality/mdma-renderer-react. Fields marked sensitive: true were rendering their values in plaintext while the user typed, only masking pre-filled values — the opposite of the intended behavior. Two accompanying CSS defects made it worse: masked inputs switch to type="password", which had no matching style rule and collapsed to an unstyled native box, and the reveal/mask toggle button wrapped onto its own line below the input instead of sitting inside it.

The bug lived entirely in the shipped default component (not the ag-ui integration example, which just consumes it with no overrides), so it affected every consumer using the default form renderer for sensitive fields.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing behavior to change)
  • Refactor (no functional change)
  • Documentation
  • CI / tooling

Packages Affected

  • @mobile-reality/mdma-spec
  • @mobile-reality/mdma-parser
  • @mobile-reality/mdma-runtime
  • @mobile-reality/mdma-attachables-core
  • @mobile-reality/mdma-renderer-react
  • @mobile-reality/mdma-prompt-pack
  • Blueprint: ___________

Checklist

  • I have read the CONTRIBUTING guide.
  • My code follows the existing code style (pnpm format and pnpm lint pass).
  • I have added or updated tests that cover my changes.
  • All tests pass (pnpm test).
  • Type-checking passes (pnpm typecheck).
  • I have added a changeset (pnpm changeset) if this change affects published packages.
  • New or changed MDMA schemas are backwards-compatible (or marked as breaking).
  • Sensitive fields are marked with sensitive: true where appropriate.

Screenshots / Examples

Before: typing into a sensitive field showed plaintext (asdasda), and the mask toggle rendered below the input; masked state collapsed the input to a narrow native box.

After: sensitive fields mask from the first keystroke (•••), with the 👁/🔒 toggle overlaid inside a full-width input.

@gitsad
gitsad merged commit 0f019f5 into main Jul 16, 2026
1 check passed
@gitsad
gitsad deleted the fix/sensitive-rendering branch July 16, 2026 13:36
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