Skip to content

fix: add ignore attributes for password managers to input fields#2466

Merged
serhalp merged 1 commit intonpmx-dev:mainfrom
t128n:main
Apr 10, 2026
Merged

fix: add ignore attributes for password managers to input fields#2466
serhalp merged 1 commit intonpmx-dev:mainfrom
t128n:main

Conversation

@t128n
Copy link
Copy Markdown
Contributor

@t128n t128n commented Apr 10, 2026

🔗 Linked issue

Resolves #2465

🧭 Context

Currently, the Proton Pass extension (and potentially other password managers) is being triggered by the CommandPalette.client.vue component on /package/<package> pages.
This introduces a minor visual disturbance for users with those extensions installed.
As outlined in https://stackoverflow.com/a/51272839, password managers are notorious for ignoring hints such as autocomplete and autocorrect.

Added the property no-password-manager to prevent password managers from auto-filling input fields that don't require it.

📚 Description

To fix this issue, I introduced (similar to the existing noCorrect object export in ~/utils/input) a noPasswordManager object with a collection of data-x attributes to silence password managers.
This object is conditionally bound to ~/components/Input/Base.vue based on the added attribute

    //...
    /**
     * Prevents most common password managers from recognizing the input as a password field.
     * Note: This is not a standard HTML attribute but vendor-specific data-* attributes.
     * @default false
     */
    noPasswordManager?: boolean
    // ...

and then activated for CommandPalette.client.vue by default by passing no-password-manager to it.

I'm unsure if a "workaround" like this would qualify to be merged, but I guessed that it (hopefully) won't hurt to submit a PR to potentially fix this.

Copilot AI review requested due to automatic review settings April 10, 2026 20:46
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev (canary) Ready Ready Preview, Comment Apr 10, 2026 8:49pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 10, 2026 8:49pm
npmx-lunaria Ignored Ignored Apr 10, 2026 8:49pm

Request Review

@github-actions
Copy link
Copy Markdown

Hello! Thank you for opening your first PR to npmx, @t128n! 🚀

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@t128n t128n changed the title fix: add ignore attributes for password managers to command palette fix: add ignore attributes for password managers to input fields Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds vendor-specific data-* ignore attributes to the command palette input to prevent password managers (e.g., Proton Pass) from attempting to autofill and causing UI distractions on package pages.

Changes:

  • Added a reusable noPasswordManager attribute object in app/utils/input.ts.
  • Extended InputBase to optionally apply password-manager ignore attributes via a new noPasswordManager prop.
  • Enabled no-password-manager on the command palette input by default.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
app/utils/input.ts Introduces noPasswordManager attribute map for password-manager suppression.
app/components/Input/Base.vue Adds noPasswordManager prop and binds merged input attribute sets (noCorrect + noPasswordManager).
app/components/CommandPalette.client.vue Enables no-password-manager on the command palette input.

Comment on lines 19 to +49
@@ -36,13 +42,18 @@ defineExpose({
focus: () => el.value?.focus(),
blur: () => el.value?.blur(),
})

const inputAttrs = computed(() => ({
...(props.noCorrect ? noCorrect : {}),
...(props.noPasswordManager ? noPasswordManager : {}),
}))
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

New noPasswordManager behavior is introduced here but isn’t covered by the existing Nuxt/Vitest component tests for InputBase (see test/nuxt/components/Input/Base.spec.ts, which currently covers noCorrect). Please add a test that verifies the expected data-* attributes are present when noPasswordManager is true and absent when false, so this behavior doesn’t regress silently.

Copilot generated this review using guidance from repository custom instructions.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

The changes introduce password-manager suppression attributes to prevent browser extensions and password-manager tools from triggering on the command palette input field. A new utility constant containing data attributes targeting Proton Pass, LastPass, 1Password, and Bitwarden was added. The base input component was extended with a new noPasswordManager boolean property that conditionally applies these suppression attributes when enabled. The command palette component now uses this property to opt out of password-manager detection.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly relates to the changeset, explaining the problem (Proton Pass triggering on CommandPalette) and detailing the solution (adding noPasswordManager attributes).
Linked Issues check ✅ Passed The PR fully addresses the linked issue #2465 by preventing password managers from recognizing the CommandPalette input as a credential field through vendor-specific data attributes.
Out of Scope Changes check ✅ Passed All changes are directly scoped to addressing issue #2465: adding noPasswordManager utility, extending Input/Base.vue with the prop, and applying it to CommandPalette.client.vue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/components/Input/Base.vue (1)

46-56: Consider adding a focused component test for attribute toggles.

A small test for noCorrect/noPasswordManager combinations would guard against regressions in emitted input attributes.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9f1678c-9f2d-4334-9555-94befe8b5a68

📥 Commits

Reviewing files that changed from the base of the PR and between 4123e8d and 5616347.

📒 Files selected for processing (3)
  • app/components/CommandPalette.client.vue
  • app/components/Input/Base.vue
  • app/utils/input.ts

Copy link
Copy Markdown
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for opening a PR!

@serhalp serhalp added this pull request to the merge queue Apr 10, 2026
Merged via the queue into npmx-dev:main with commit 0164064 Apr 10, 2026
24 of 25 checks passed
@github-actions
Copy link
Copy Markdown

Thanks for your first contribution, @t128n! 👏

We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role.

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.

Proton Pass being triggered on CommandPallete.client.vue component

3 participants