Skip to content

Refine(autofill): Give bonus for exact host match#515

Open
maederm wants to merge 1 commit intokeepassium:masterfrom
maederm:feature/autofill-prefer-full-match
Open

Refine(autofill): Give bonus for exact host match#515
maederm wants to merge 1 commit intokeepassium:masterfrom
maederm:feature/autofill-prefer-full-match

Conversation

@maederm
Copy link

@maederm maederm commented Mar 20, 2026

Hi @keepassium

I know that you don't accept PRs, but maybe this inspires you to add a ranking bonus for exact domain matches.
This PR doesn't account for protocol.

  • Move howSimiliar into library to make it unit testable
  • Add unit tests for different matching cases
  • Add build/ folder to .gitignore

Fixes #480

Disclaimer: The code changes were mostly generated with AI tooling. I verified the output of the addition to the similarity logic. The unit tests look good to me, but I’m not sure if you’d write them like that. In pytest I would use parametrize for example. I ran the unit tests successfully in the simulator and also verified that they fail if I change the code.
I didn’t change the copyright headers as most of the logic was already there.

- Move howSimiliar into library to make it unit testable
- Add unit tests for different matching cases
- Add build/ folder to .gitignore

Fixes keepassium#480
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

AutoFill similarity scoring does not distinguish subdomains

2 participants