Skip to content

Development: Port new gender contracts - #2638

Open
ge94zec wants to merge 12 commits into
bugfix/2379-fix-excessive-api-requests-triggering-genderdecoderfrom
feat/2637-port-new-gender-contracts
Open

Development: Port new gender contracts#2638
ge94zec wants to merge 12 commits into
bugfix/2379-fix-excessive-api-requests-triggering-genderdecoderfrom
feat/2637-port-new-gender-contracts

Conversation

@ge94zec

@ge94zec ge94zec commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the client coding and design guidelines.

Motivation and Context

This PR ports the Gender Decoder integration to the new BiasedIssue / JobAnalysisDTO contracts ahead of the dependent PRs being merged, so the required compatibility changes are already prepared and don’t block on merge order.
Fixes: #2637 resulting from #2630 and #2465 will collide head-on.

Description

The editor no longer subscribes to GenderBiasAnalysisService.getAnalysisForField(). It receives findings through a new biasedAnalysis input instead, so the removed endpoint is no longer referenced from the atom. toObservable, fieldIdChanges$ and the service injection are gone; genderBiasHighlights now derives from the input.

Contract migration

  • GenderBiasAnalysisResponse / BiasedWordDTOBiasedIssueDTO
  • coding string values ('non-inclusive-coded', 'inclusive-coded') →
    computeCodingStatus() returning 'NON_INCLUSIVE' / 'INCLUSIVE' / 'NEUTRAL'
  • type: 'non-inclusive'BiasedIssueDTOTypeEnum.NON_INCLUSIVE
  • ComplianceIssueComplianceIssueDTO in the assistant card and filter types

Prerequisites:

  1. Log in to DocApply
  2. Nav to Create position
  3. Type a description containing non-inclusive wording, the pill count and the balance pointer update, and the wording is underlined in the editor
  4. Select the Gender Decoder filter; only gender-bias highlights remain visible
  5. Save and reload, the persisted description contains no highlight spans

Review Progress

Code Review

  • Code Review 1

Manual Tests

  • Test 1

Screenshots

Test Coverage

Warning: Some tests failed in the PR check. Coverage may be incomplete. Please check the workflow logs.

Client

Class/File Line Coverage Lines Expects Ratio
job-creation-form.component.ts 73.93% 1317 103 7.8
editor.component.ts 79.55% 379 28 7.4
ai-assistant-card.component.ts 90.76% 137 11 8.0
gender-bias-analysis.utils.ts 100.00% 16 2 12.5

Last updated: 2026-08-22 10:51:49 UTC

ge94zec and others added 10 commits August 4, 2026 13:31
- display gender decoder results and balance indicator in the AI sidebar
- reuse status pills with counts, loading state, and active styling
- highlight non-inclusive wording with wavy underlines in the editor
- allow filtering between gender and compliance highlights
- deduplicate and sanitize non-inclusive words in a shared utility
- add English and German translations for the gender pill
- remove unrelated background process and analysis pause changes
- simplify tests
…accuracy-using-ai' into feat/2378-improve-genderdecoder-accuracy-using-ai
- strip compliance and gender highlight markup from editor values
- track gender analysis loading independently per editor field
- bind the gender pill to its dedicated loading state
- center the gender balance indicator without fixed offsets
- cover editor event handling and pill loading states
… feat/2637-port-new-gender-contracts

# Conflicts:
#	src/main/webapp/app/job/job-creation-form/job-creation-form.component.html
#	src/main/webapp/app/job/job-creation-form/job-creation-form.component.ts
#	src/main/webapp/app/shared/components/atoms/editor/editor.component.ts
#	src/main/webapp/app/shared/components/molecules/ai-assistant-card/ai-assistant-card.component.ts
#	src/main/webapp/app/shared/gender-bias-analysis/gender-bias-analysis.ts
#	src/main/webapp/app/shared/gender-bias-analysis/gender-bias-analysis.utils.ts
#	src/test/webapp/app/shared/components/atoms/editor/editor.component.spec.ts
#	src/test/webapp/util/gender-bias-analysis.service.mock.ts
@ge94zec ge94zec linked an issue Aug 22, 2026 that may be closed by this pull request
8 tasks
@github-actions github-actions Bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) tests database job Code changes in job module. labels Aug 22, 2026
@codacy-production

codacy-production Bot commented Aug 22, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium · 3 minor

Alerts:
⚠ 4 issues (≤ 0 issues of at least minor severity)

Results:
4 new issues

Category Results
ErrorProne 1 medium
CodeStyle 3 minor

View in Codacy

🟢 Metrics 17 complexity

Metric Results
Complexity 17

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

- replace the removed gender-bias analysis response with BiasedIssueDTO arrays
- derive inclusive, non-inclusive, and neutral states from biased issue types
- update the editor highlights, analysis dialog, assistant card, and review count
- source gender findings and loading state from the existing job analysis workflow
- remove client-side gender-bias analysis service and test mock
- update affected component and utility tests for the new contracts
@ge94zec
ge94zec changed the base branch from main to bugfix/2379-fix-excessive-api-requests-triggering-genderdecoder August 22, 2026 10:46
@ge94zec ge94zec changed the title Feat/2637 port new gender contracts Development: Port new gender contracts Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

pnpm run test:ci
open build/test-results/vitest/coverage/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions github-actions Bot removed server Pull requests that update Java code. (Added Automatically!) database job Code changes in job module. labels Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

@ge94zec
ge94zec marked this pull request as ready for review August 22, 2026 11:00
@ge94zec
ge94zec requested a review from az108 as a code owner August 22, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests that update TypeScript code. (Added Automatically!) ready for review tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port new gender contracts

1 participant