Add URL pattern matching for automatic profile selection#120
Conversation
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
NoelLH
left a comment
There was a problem hiding this comment.
@copilot This looks promising at first glance but 4 new tests are failing, can you check these before finishing work?
ERROR: 'Error matching pattern:', Object{pattern: '[invalid(regex', enabled: true, type: 'regex'}, SyntaxError: Invalid regular expression: /[invalid(regex/: Unterminated character class
SyntaxError: Invalid regular expression: /[invalid(regex/: Unterminated character class
at new RegExp (<anonymous>)
Chrome 132.0.0.0 (Linux 0.0.0) ImportService parseSitePatterns should skip disabled patterns FAILED
TypeError: Cannot read properties of undefined (reading 'attributes')
at ImportService2.parseSitePatterns (src/app/import.service.ts:386:21)
Chrome 132.0.0.0 (Linux 0.0.0) ImportService parseSitePatterns should parse regex patterns from RDF FAILED
TypeError: Cannot read properties of undefined (reading 'attributes')
at ImportService2.parseSitePatterns (src/app/import.service.ts:386:21)
Chrome 132.0.0.0 (Linux 0.0.0) ImportService parseSitePatterns should parse wildcard patterns from RDF FAILED
TypeError: Cannot read properties of undefined (reading 'attributes')
at ImportService2.parseSitePatterns (src/app/import.service.ts:386:21)
at UserContext.<anonymous> (src/app/import.service.spec.ts:38:51)
...
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
Fixed in commit 38c02d2. All 56 tests now passing. Issues resolved:
All tests verified passing with 100% success rate. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
NoelLH
left a comment
There was a problem hiding this comment.
@copilot Thanks, looking good! I think the only essential thing I'd like to change is to match more things when 'domain only' is checked on the profile. I would expect that to consider only the domain part of my input when comparing to the site list.
So if that is checked and my input is https://test.example.org/asdf then it should match *.example.org
Can you adjust the matching to work like that please?
Co-authored-by: NoelLH <3274454+NoelLH@users.noreply.github.com>
Implemented in commit 468ad85. Pattern matching now extracts the domain from input URLs when Behavior:
Added 2 new tests to verify this behavior. All 58 tests passing. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Implementation Complete: "Use With Sites" Feature ✅
Summary
Successfully implemented the "Use With Sites" feature for PasswordMaker, allowing users to configure site-specific URL patterns that automatically switch profiles based on pattern matching. This feature is compatible with Chrome PasswordMaker Pro's RDF export format.
Latest Updates
domain_onlychecked, patterns now match against the extracted domain from URLshttps://test.example.org/asdfwith pattern*.example.orgnow matches correctlyImplementation Checklist
1. Model Changes
2. Profile Settings UI
3. Import Service
4. Export Service
5. Home Page - Auto Profile Selection
6. Testing
7. Quality Assurance
Test Results
✅ 100% test pass rate (58/58 tests passing)
Files Changed
Key Features
✅ Wildcard pattern matching (case-insensitive):
*.google.com✅ Regex pattern matching:
/https?://.*\.example\.com/.*/✅ Auto-profile selection on URL/domain input
✅ Domain extraction for domain_only profiles:
https://test.example.org/asdf→ matches*.example.org✅ Manual override support
✅ RDF import/export compatibility with Chrome extension
✅ Graceful error handling for invalid patterns
✅ 58 unit tests with 100% pass rate
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.