Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

πŸ’„ Keep password managers out of inputs that collect other people's details (#3235)

Luke Vellaaab791da5177
diff --git a/CLAUDE.md b/CLAUDE.md
index 93aa6c83f..ce0dd5171 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -159,6 +159,9 @@ Always use gitmoji prefixes in commit messages. Follow the gitmoji convention (h
- **Headings and dialog titles are not exempt.** Title Case has no single agreed rule (Chicago, AP and APA disagree), so it cannot be applied consistently; it degrades screen reader pronunciation and removes word-shape cues used by readers with dyslexia and low vision; and the same string often serves as both a button label and a dialog title, so a position-based rule would force two strings for one concept.
- **Changing `defaults` alone is not enough.** `pnpm i18n:scan` will not overwrite an existing key's value β€” the UI keeps rendering the old copy. Run `pnpm --filter @rallly/web i18n:sync` (`--sync-primary`; there is no root script) to push changed English values through. Never run `--sync-all`; it clears other locales' translations.
+### Password Managers
+An input that collects something other than the user's own credentials or contact details (someone else's email, a confirmation phrase, a display name) spreads `passwordManagerIgnoreProps` from `@rallly/ui`. `autocomplete="off"` is ignored by every manager; the constant carries each vendor's own opt-out attribute. Never write `data-1p-ignore` or its siblings inline.
+
### Permission-Gated UI
Choose the presentation by **why the user lacks the capability**, never ad hoc per surface:
- **Role or ownership** (another member could act; the user has no self-serve path) β†’ **hide** the control, nav item, or tile β€” including inline controls and destructive menu items (per-row: omit inapplicable items; omit the menu when empty). If a whole page exists for the capability, show a read-only view of the current values (general settings pattern) or a denied state naming who can act (billing settings pattern). Deep links get the denied state, never a silent 404.
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/members/components/invite-member-dialog.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/members/components/invite-member-dialog.tsx
index d88aea29a..86ea83982 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/members/components/invite-member-dialog.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/members/components/invite-member-dialog.tsx
@@ -1,6 +1,7 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import type { DialogProps } from "@rallly/ui/dialog";
import {
@@ -213,7 +214,7 @@ export function InviteMemberForm({ onSuccess }: { onSuccess?: () => void }) {
<Input
{...field}
placeholder={t("emailPlaceholder")}
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
/>
</FormControl>
<FormMessage />
diff --git a/apps/web/src/app/[locale]/(space)/settings/general/components/delete-space-button.tsx b/apps/web/src/app/[locale]/(space)/settings/general/components/delete-space-button.tsx
index 1b13f4c04..3fe7291d8 100644
--- a/apps/web/src/app/[locale]/(space)/settings/general/components/delete-space-button.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/general/components/delete-space-button.tsx
@@ -1,5 +1,6 @@
"use client";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import type { DialogProps } from "@rallly/ui/dialog";
import {
@@ -115,7 +116,7 @@ function DeleteSpaceDialog({
<FormControl>
<Input
autoComplete="off"
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
placeholder={spaceName}
{...field}
/>
diff --git a/apps/web/src/app/[locale]/(space)/settings/general/components/leave-space-button.tsx b/apps/web/src/app/[locale]/(space)/settings/general/components/leave-space-button.tsx
index ea22f1941..c74d969bb 100644
--- a/apps/web/src/app/[locale]/(space)/settings/general/components/leave-space-button.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/general/components/leave-space-button.tsx
@@ -1,5 +1,6 @@
"use client";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import type { DialogProps } from "@rallly/ui/dialog";
import {
@@ -108,7 +109,7 @@ function LeaveSpaceDialog({
<FormControl>
<Input
autoComplete="off"
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
placeholder={spaceName}
{...field}
/>
diff --git a/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-dialog.tsx b/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-dialog.tsx
index 0e10f8c1b..67c955838 100644
--- a/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-dialog.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/profile/components/delete-account-dialog.tsx
@@ -1,4 +1,5 @@
"use client";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import {
Dialog,
@@ -190,7 +191,7 @@ function InstantDeleteAccountDialog({
<FormItem>
<Input
autoComplete="off"
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
placeholder={user.email}
{...field}
/>
diff --git a/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.test.tsx b/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.test.tsx
index 2053eca24..476c784ae 100644
--- a/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.test.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.test.tsx
@@ -37,6 +37,8 @@ describe("LeaveSpaceDialog", () => {
expect(input).toBeInTheDocument();
expect(input).toHaveAttribute("autoComplete", "off");
expect(input).toHaveAttribute("data-1p-ignore", "true");
+ expect(input).toHaveAttribute("data-lpignore", "true");
+ expect(input).toHaveAttribute("data-form-type", "other");
});
it("renders cancel and leave space buttons", () => {
diff --git a/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.tsx b/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.tsx
index 765ca95f2..3e693acc9 100644
--- a/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/spaces/components/leave-space-dialog.tsx
@@ -1,6 +1,7 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import type { DialogProps } from "@rallly/ui/dialog";
import {
@@ -97,7 +98,7 @@ export function LeaveSpaceDialog({
<FormControl>
<Input
autoComplete="off"
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
placeholder={spaceName}
{...field}
/>
diff --git a/apps/web/src/app/[locale]/setup/components/setup-form.tsx b/apps/web/src/app/[locale]/setup/components/setup-form.tsx
index e19006cb0..6d532be15 100644
--- a/apps/web/src/app/[locale]/setup/components/setup-form.tsx
+++ b/apps/web/src/app/[locale]/setup/components/setup-form.tsx
@@ -1,6 +1,7 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import { ButtonGroup, ButtonGroupItem } from "@rallly/ui/button-group";
import {
@@ -196,7 +197,7 @@ export function SetupForm({
<Input
{...field}
autoComplete="name"
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
placeholder={t("namePlaceholder", {
defaultValue: "Jessie Smith",
})}
@@ -313,7 +314,7 @@ export function SetupForm({
<FormControl>
<Input
{...field}
- data-1p-ignore
+ {...passwordManagerIgnoreProps}
autoFocus={true}
placeholder={t("organizationNamePlaceholder", {
defaultValue: "e.g. Acme Corp",
diff --git a/apps/web/src/features/poll/components/comments-sheet.tsx b/apps/web/src/features/poll/components/comments-sheet.tsx
index 75e6b6119..6768eb322 100644
--- a/apps/web/src/features/poll/components/comments-sheet.tsx
+++ b/apps/web/src/features/poll/components/comments-sheet.tsx
@@ -1,4 +1,5 @@
"use client";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Badge } from "@rallly/ui/badge";
import { Button } from "@rallly/ui/button";
import { useDialog } from "@rallly/ui/dialog";
@@ -134,7 +135,7 @@ function NewCommentForm({ onSubmitted }: { onSubmitted: () => void }) {
<InputGroupInput
placeholder={t("yourName")}
maxLength={MAX_COMMENT_AUTHOR_NAME_LENGTH}
- data-1p-ignore="true"
+ {...passwordManagerIgnoreProps}
aria-invalid={!!formState.errors.authorName}
{...field}
/>
diff --git a/apps/web/src/features/poll/components/invite-by-email.tsx b/apps/web/src/features/poll/components/invite-by-email.tsx
index c8fedc973..2af7fc37d 100644
--- a/apps/web/src/features/poll/components/invite-by-email.tsx
+++ b/apps/web/src/features/poll/components/invite-by-email.tsx
@@ -1,6 +1,7 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import {
InputGroup,
@@ -247,6 +248,7 @@ export function InviteByEmail() {
type="email"
inputMode="email"
autoComplete="off"
+ {...passwordManagerIgnoreProps}
placeholder="[email protected]"
disabled={!isOpen}
aria-invalid={form.formState.errors.email ? true : undefined}
diff --git a/apps/web/src/features/poll/components/new-participant-modal.tsx b/apps/web/src/features/poll/components/new-participant-modal.tsx
index f5d870323..64f2459f8 100644
--- a/apps/web/src/features/poll/components/new-participant-modal.tsx
+++ b/apps/web/src/features/poll/components/new-participant-modal.tsx
@@ -1,7 +1,7 @@
import { zodResolver } from "@hookform/resolvers/zod";
import type { VoteType } from "@rallly/database";
import { posthog } from "@rallly/posthog/client";
-import { buttonVariants, cn } from "@rallly/ui";
+import { buttonVariants, cn, passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import {
DialogDescription,
@@ -291,7 +291,7 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {
<FormControl>
<Input
className="w-full"
- data-1p-ignore="true"
+ {...passwordManagerIgnoreProps}
autoFocus={true}
disabled={formState.isSubmitting}
placeholder={t("namePlaceholder")}
diff --git a/apps/web/src/features/space/components/create-space-dialog.tsx b/apps/web/src/features/space/components/create-space-dialog.tsx
index a0c6d30c2..e5dde2b56 100644
--- a/apps/web/src/features/space/components/create-space-dialog.tsx
+++ b/apps/web/src/features/space/components/create-space-dialog.tsx
@@ -1,5 +1,6 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
+import { passwordManagerIgnoreProps } from "@rallly/ui";
import { Button } from "@rallly/ui/button";
import type { DialogProps } from "@rallly/ui/dialog";
import {
@@ -69,7 +70,7 @@ export function CreateSpaceDialog(props: DialogProps) {
</FormLabel>
<FormControl>
<Input
- data-1p-ignore="true"
+ {...passwordManagerIgnoreProps}
placeholder="e.g. Acme Corp"
{...field}
/>
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index be7d3aa4f..92dd198bb 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -1,2 +1,3 @@
export { buttonVariants } from "./button-variants";
+export { passwordManagerIgnoreProps } from "./lib/password-manager-ignore";
export { cn } from "./lib/utils";
diff --git a/packages/ui/src/lib/password-manager-ignore.ts b/packages/ui/src/lib/password-manager-ignore.ts
new file mode 100644
index 000000000..0090cbd0b
--- /dev/null
+++ b/packages/ui/src/lib/password-manager-ignore.ts
@@ -0,0 +1,14 @@
+/**
+ * Spread onto an input that should never attract a password manager, e.g. a
+ * field that collects someone else's email or a confirmation phrase. There is
+ * no standard: autocomplete="off" is ignored by every manager, so each vendor
+ * gets its own attribute. Must be present on first render; 1Password caches
+ * the classification when the field is first focused.
+ */
+export const passwordManagerIgnoreProps = {
+ "data-1p-ignore": "true",
+ "data-lpignore": "true",
+ "data-form-type": "other",
+ "data-protonpass-ignore": "true",
+ "data-bwignore": "true",
+} as const;