Motivation
Today, the proxy/extension detects and masks all entity types the model emits. Users should be able to opt-in/out of specific entity types (e.g., disable AGE or COMPANYNAME) without disabling masking entirely.
Proposal
Add a configurable entity-type selection menu in the extension options page.
Dynamic configuration
The menu must be built dynamically from the model's label set (the source of truth), not hard-coded. The model's labels live in model/trained/label_mappings.json under pii.label2id, and currently expose 26 entity types (B-/I- pairs collapsed):
SURNAME, FIRSTNAME, BUILDINGNUM, DATEOFBIRTH, EMAIL, PHONENUMBER, CITY, URL, COMPANYNAME, STATE, ZIP, STREET, COUNTRY, SSN, DRIVERLICENSENUM, PASSPORTID, NATIONALID, IDCARDNUM, TAXNUM, LICENSEPLATENUM, PASSWORD, IBAN, AGE, SECURITYTOKEN, CREDITCARDNUMBER, USERNAME
This way, when the model is retrained with a different label set, the UI automatically reflects the new entities without code changes.
Behavior
- The backend exposes the available entity types (read from
label_mappings.json) via an endpoint the extension can query.
- The options page renders a checkbox list of all entity types returned by the backend.
- All entities are enabled by default (existing masking behavior is preserved on first run / upgrade).
- The user's selection is persisted in extension storage.
- On each request, the extension sends the enabled set (or the backend filters by it) so that disabled entities pass through without masking.
Acceptance criteria
Motivation
Today, the proxy/extension detects and masks all entity types the model emits. Users should be able to opt-in/out of specific entity types (e.g., disable
AGEorCOMPANYNAME) without disabling masking entirely.Proposal
Add a configurable entity-type selection menu in the extension options page.
Dynamic configuration
The menu must be built dynamically from the model's label set (the source of truth), not hard-coded. The model's labels live in
model/trained/label_mappings.jsonunderpii.label2id, and currently expose 26 entity types (B-/I- pairs collapsed):SURNAME,FIRSTNAME,BUILDINGNUM,DATEOFBIRTH,EMAIL,PHONENUMBER,CITY,URL,COMPANYNAME,STATE,ZIP,STREET,COUNTRY,SSN,DRIVERLICENSENUM,PASSPORTID,NATIONALID,IDCARDNUM,TAXNUM,LICENSEPLATENUM,PASSWORD,IBAN,AGE,SECURITYTOKEN,CREDITCARDNUMBER,USERNAMEThis way, when the model is retrained with a different label set, the UI automatically reflects the new entities without code changes.
Behavior
label_mappings.json) via an endpoint the extension can query.Acceptance criteria
label_mappings.json.chrome-extension/options.html/options.js) renders the list dynamically.