vercel-labs / vercel-labs/native

Add secure/password mode for canvas text fields

Open
#237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Zig
Stars
7.7k
Forks
314
Avg merge
5h
Merged PRs (30d)
13

Description

Problem

Canvas <text-field> has no password/secure-input mode. Apps that accept API keys or tokens must either render plaintext or keep a second masked buffer whose value intentionally diverges from the editor model.

That workaround can break normal caret/selection/IME reconciliation and cannot provide native protected-text accessibility semantics.

Requested API

A markup/API flag such as:

<text-field secure=true text={secret} on-input=secret_edit />

Expected behavior:

  • render a mask instead of the value;
  • expose protected/password semantics through accessibility bridges;
  • redact the value from automation snapshots, journals, diagnostics, and clipboard copy/cut;
  • keep paste and normal TextInputEvent editing functional;
  • never serialize the plaintext as display-list text.

Current application workaround

Applications currently need to maintain a separate masked buffer whose value diverges from the editor model. This is limited, can break caret/selection/IME reconciliation, and cannot provide protected accessibility semantics.

Native SDK 0.6.3 on Windows 11.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the canvas implementation and its TextInputEvent, accessibility, automation, journal, diagnostics, clipboard, and display-list paths. Define the secure=true behavior against the requested API and verify that masking, protected accessibility semantics, functional editing, redaction, and plaintext exclusion all work together.

Written by the indexing model from the issue text.

Assessment

Tech stack
zig
Domain
accessibility, desktop, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.