Skip to content

Development: Add compliance checker UI and popover#2317

Merged
az108 merged 50 commits intomainfrom
feat/2062-feature-add-new-compliance-tab-in-sidebar
Apr 19, 2026
Merged

Development: Add compliance checker UI and popover#2317
az108 merged 50 commits intomainfrom
feat/2062-feature-add-new-compliance-tab-in-sidebar

Conversation

@ge94zec
Copy link
Copy Markdown
Contributor

@ge94zec ge94zec commented Apr 18, 2026

❗️DO NOT MERGE BEFORE #2064 ❗️

Checklist

General

Server

  • I documented the Java code using JavaDoc style.

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 principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

Closes: #2062

Description

Steps for Testing

Prerequisites:

  1. Log in to TUMApply
  2. Navigate to Create Position
  3. Verify if analysis works for title and job description
  4. Verify if popover are correct across language switches and if category count works correct

Review Progress

Code Review

  • Code Review 1

Manual Tests

  • Test 1

Screenshots

Bildschirmfoto 2026-04-19 um 02 32 32 Bildschirmfoto 2026-04-19 um 02 32 10 Bildschirmfoto 2026-04-19 um 02 31 46

Test Coverage

Client

Class/File Line Coverage Lines Expects Ratio
job-creation-form.component.ts 61.84% 1138 124 10.9
base-input.component.ts 97.29% 101 ? ?
editor.component.ts 76.19% 326 56 17.2
status-pill.component.ts 100.00% 18 ? ?
ai-assistant-card.component.ts 90.74% 106 9 8.5
ai-compliance-popover.component.ts 100.00% 14 ? ?

Server

Class/File Line Coverage Lines
AiService.java 8.62% 226
AiResource.java 50.00% 71

Last updated: 2026-04-19 17:32:11 UTC

ge94zec and others added 30 commits March 17, 2026 13:18
added endpoint for compliance
added ComplianceIssueDTO for later on highlighting
added ComplianceIssueDTO[]
…side' into feat/2063-add-compliance-server-side
- refactored prompt
- moved enum to constants
- changed endpoint to POST temporary
- removed unused imports
…nce-server-side

# Conflicts:
#	openapi/openapi.yaml
#	src/main/java/de/tum/cit/aet/ai/service/AiService.java
#	src/main/java/de/tum/cit/aet/ai/web/AiResource.java
#	src/main/webapp/app/generated/.openapi-generator/FILES
#	src/main/webapp/app/generated/api/aiResourceApi.service.ts
#	src/main/webapp/app/generated/model/models.ts
…ith dual-language support

- Move score calculation from frontend to backend (AiService) to persist across navigation
- Add genderBiasScore and complianceAnalysis fields to Job entity with Liquibase migration
- Calculate combined inclusivity score as average of DE and EN gender bias analyses
- Strip HTML tags via Jsoup before analysis to fix zero-score bug
- Adjust autosave timer to prevent premature translation triggering to 5s debounce
- Read persisted score from JobDTO/JobFormDTO instead of recomputing on frontend
- Fix AiScoreRingComponent animation to only animate on first render or actual score change
- Add TranslateComplianceDTO wrapper to avoid multiple @RequestBody parameters
- Update analyzeCurrentJobDescription and translateAndPersistJobDescription to use plain text
- added sanitization -> write + read in Job-Description
- adjusted tests
…side' into feat/2063-add-compliance-server-side

# Conflicts:
#	openapi/openapi.yaml
#	src/main/webapp/app/generated/api/ai-resource-api.ts
# Conflicts:
#	openapi/openapi.yaml
#	src/main/java/de/tum/cit/aet/ai/service/AiService.java
#	src/main/java/de/tum/cit/aet/job/dto/JobFormDTO.java
#	src/main/java/de/tum/cit/aet/job/service/JobService.java
#	src/main/resources/config/liquibase/master.xml
#	src/main/webapp/app/generated/model/job.ts
…side' into feat/2063-add-compliance-server-side
…side' into feat/2063-add-compliance-server-side
…side' into feat/2063-add-compliance-server-side
-added server tests
-prettier
@ge94zec ge94zec linked an issue Apr 18, 2026 that may be closed by this pull request
3 tasks
@github-actions
Copy link
Copy Markdown
Contributor

📊 Server Test Coverage Too Low

🔍 View coverage locally:

./gradlew test jacocoTestReport
open build/reports/jacoco/test/html/index.html

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

@github-actions
Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

@ge94zec ge94zec marked this pull request as ready for review April 19, 2026 00:42
@ge94zec ge94zec requested a review from az108 as a code owner April 19, 2026 00:42
@github-actions
Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

Copy link
Copy Markdown
Contributor

@Cathy0123456789 Cathy0123456789 left a comment

Choose a reason for hiding this comment

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

Thank you, small comment while flying over the code

Comment thread src/main/webapp/i18n/de/job.json Outdated
…-new-compliance-tab-in-sidebar

# Conflicts:
#	src/main/resources/config/liquibase/changelog/00000000000033_add_ai_compliance_to_jobs.xml
#	src/main/resources/prompts/AnalyzeComplianceText.st
#	src/main/webapp/app/job/job-creation-form/job-creation-form.component.ts
#	src/main/webapp/app/shared/components/atoms/editor/editor.component.ts
@github-actions
Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Copy Markdown
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm 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
Copy link
Copy Markdown
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm 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

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm 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

🤖 OpenAPI spec and client code auto-updated and committed.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 19, 2026

Not up to standards ⛔

🔴 Issues 2 high · 2 minor

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

Results:
4 new issues

Category Results
Security 2 high
CodeStyle 2 minor

View in Codacy

🟢 Metrics 16 complexity

Metric Results
Complexity 16

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@github-actions
Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Copy Markdown
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm 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.

@helios-aet helios-aet bot deployed to test-server April 19, 2026 16:55 Active
@github-actions
Copy link
Copy Markdown
Contributor

🤖 No OpenAPI or client changes needed.

Copy link
Copy Markdown
Collaborator

@az108 az108 left a comment

Choose a reason for hiding this comment

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

Code + Tested 👍

@az108 az108 merged commit 4c9a67a into main Apr 19, 2026
15 of 16 checks passed
@az108 az108 deleted the feat/2062-feature-add-new-compliance-tab-in-sidebar branch April 19, 2026 17:33
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 server Pull requests that update Java code. (Added Automatically!) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add new compliance tab in sidebar

3 participants