Skip to content

Iris: Match citations to versions of slides and videos - #13441

Open
vivienxr wants to merge 13 commits into
developfrom
bugfix/iris/match-citations-to-versions-of-slides-and-videos
Open

Iris: Match citations to versions of slides and videos#13441
vivienxr wants to merge 13 commits into
developfrom
bugfix/iris/match-citations-to-versions-of-slides-and-videos

Conversation

@vivienxr

@vivienxr vivienxr commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Iris citations link to a specific slide page or video timestamp, but kept pointing at the same page or timestamp after slide re-upload or vidoes re-transcription — so a citation would look correct while silently landing on unrelated content (e.g. changed pages). This PR pins every citation to the version of the material it was generated from, re-checks it against the material's current state on click, and opens the lecture unit accordingly instead of jumping to a page or timestamp that possibly no longer means anything.

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines and the REST API guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • 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 guidelines.
  • I strictly followed the AET UI-UX guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Vitest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

A citation's coordinates (e.g. page 7, timestamp 2:14) are only meaningful relative to one particular revision of the material. Chat messages with citations are kept forever, while lecture material is mutable: a lecturer inserting a single slide shifts every page number after it, and a re-transcribed video shifts every timestamp. Until now nothing recorded which revision an answer was written against, so there was no way to tell a citation that is still accurate from one that has quietly gone stale.

The failure mode is worse than a dead link. The citation still resolves, the student lands on a real page or a real timestamp, and nothing signals that this is no longer the passage Iris was talking about — which might costs trust. Slides could already be told apart via Attachment#version, but the video side had no equivalent: a cited timestamp comes from a transcription segment, and the existing video_source_hash only notices a changed URL, so re-transcribing a different video from the same link invalidates every timestamp without leaving any trace.

Description

Videos now have a version number. Slides already had one (Attachment#version), videos had nothing. This PR adds two columns to lecture_unit_processing_state (Liquibase 20260729121844): transcription_version and transcription_content_hash. The version counts up whenever a unit's transcription changes. The hash is how we detect that it actually changed. Both are needed:

  • Without the hash, the version would climb during a single transcription run, because Pyris sends several checkpoints while it works. A re-run producing the exact same text would bump it too, and invalidate citations that are still correct.
  • The columns sit on the processing state and not on LectureTranscription, because that row is deleted and recreated whenever the video changes. A counter stored there would restart at 1 every time, so a citation pinned to version 1 would look current forever.
    This is the same slide attachments already use: the hash detects the change, the version is the number that gets pinned.

Every citation records the version it was written against. Just before an assistant message is saved IrisCitationService.stampCitationVersions appends two fields to each citation:

  • [cite:L:42:7:::Keyword:Summary:3:] -> slide citation, version 3
  • [cite:L:42::120:180:Keyword:Summary::2] -> video citation, version 2
    Only one of the two slots is ever filled. That is also how the client later knows whether a citation is about slides or a video, so it never has to work that out for itself.
    A citation is only stamped once its unit finished processing (ProcessingPhase.DONE), read via findIngestedVersionsByIds. While a unit is being reprocessed, Iris still answers from the previous revision, so the current version numbers would describe the wrong material. If a citation cannot be stamped — unknown unit, or material with no version yet — it is left alone and behaves exactly as before.

The check happens when the citation is clicked. A new endpoint GET lecture-units/{lectureUnitId}/material-versions (restricted to students of the unit) returns the versions the unit has right now. The client calls it on click and compares:

  • same version → jump to the page or timestamp, exactly as before
  • different version → open the lecture unit, show citation.outdated.stale
  • request failed → jump anyway, because a failed check should not cost the student the link
    Asking on click instead of when the chat loads means the answer reflects the material at that moment. Citations written before this PR carry no version fields, navigate straight through, and cause no request.

Existing citations and videos keep working unchanged. Nothing is rewritten and no backfill runs. Stamping happens on the write path only, so every message already in the database stays exactly as it is.

  • A citation without version fields parses as it always did: the summary is still everything after the keyword. Rendering, label and tooltip are identical.
  • Clicking one skips the version check completely. No request to the new endpoint is made, and it jumps to the page or timestamp as before.
  • Old and new citations can sit side by side in the same conversation. Each marker is decided on its own; there is no per-session or per-course switch.
  • Units transcribed before this PR have transcription_version = NULL. New video citations for them are left unstamped rather than pinned to a guessed number, so they behave like old citations until the unit is processed again, which sets the version to 1. Both new columns are nullable and added without a default, so existing rows are untouched.
  • On a revert, markers that were already stamped stay in the database. The old parser folds the trailing fields into the summary, so it would render as Summary:3:. Cosmetic only, but worth knowing.

A cited unit or material that is gone is reported by the page that knows it. Every citation navigation carries deepLink=true — stamped ones and unstamped ones alike, since the version check is skipped for the latter but the navigation is not. When the lecture page cannot find the requested unit among its own, it says so (lectureUnit.deepLink.unitGone) instead of silently dropping the target as it did before. So a citation written before this PR, which makes no request and pins nothing, still reports a unit that no longer exists; and a stamped citation whose unit is gone stays quiet on click (the version endpoint answers 403/404 there) and lets the lecture page do the talking, so the same situation is never worded twice in two different ways. It is deliberately phrased for the deep-link mechanism rather than for Iris, since a citation is only one way to arrive with a unit id.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Course with Iris enabled and ingested slides and videos
  1. Talk to Iris about the ingested materials and make sure it cites from those
  2. Click the citations and make sure they bring you to a page / timestamp
  3. Replace the slides / video with new slides / video
  4. Click the citations again and make sure they bring you only to the unit and a warning appears
  5. Remove the unit with the ingested material
  6. Click the citations again and make sure there is a warning

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Performance Review

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Note: Some tests in the Test job did not pass (failure). Coverage below may be partial.

Client

Class/File Line Coverage Lines Expects Ratio
iris-citation-material-version.service.ts 66.66% 15 ? ?
iris-citation-text.component.ts 94.44% 388 81 20.9
iris-citation-text.model.ts not found (modified) 21 ? ?
iris-citation-text.util.ts 94.69% 180 ? ?
course-lecture-details.component.ts 98.38% 372 103 27.7

Server

Class/File Line Coverage Lines
IrisCitationService.java 94.44% 165
AbstractIrisChatSessionService.java 90.72% 384
LectureUnitRepositoryApi.java 63.64% 48
LectureUnitProcessingState.java 91.43% 162
LectureUnitIngestedVersionsDTO.java 100.00% 6
LectureUnitMaterialVersionsDTO.java 100.00% 6
LectureUnitRepository.java 25.00% 116
LectureContentProcessingService.java 91.02% 266
ProcessingStateCallbackService.java 86.25% 370
LectureUnitResource.java 88.76% 209

Last updated: 2026-08-17 13:55:00 UTC

Screenshots

Summary by CodeRabbit

New Features

  • Iris citations now include attachment or video versions, tying references to specific lecture content.
  • Citation navigation verifies that referenced material is current and available.
  • Transcription versions remain consistent across updates and processing retries.

Bug Fixes

  • Outdated, removed, or unverifiable material now displays clear warnings.
  • Exact page or timestamp navigation is omitted when content cannot be validated.
  • Invalid lecture-unit deep links now show an alert and open the available lecture.

Localization

  • Added English and German messages for citation and deep-link issues.

@github-project-automation github-project-automation Bot moved this to Work In Progress in Artemis Development Aug 8, 2026
@github-actions github-actions Bot added tests server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. iris Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module labels Aug 8, 2026
@vivienxr
vivienxr had a problem deploying to playwright-e2e-tests August 8, 2026 13:34 — with GitHub Actions Error
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

End-to-End Test Results

Phase Status Details
All Tests ❌ Failed
TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
All E2E Tests Report (PR)372 ran359 passed8 skipped5 failed39m 35s
❌ Failed Tests
  • Quiz Exercise Participation › DnD Quiz participation › View auto-scrolls when student drags an item to the top of the scroll container (53s)
  • Exam submission recovery after a failed save › restores and re-sends a not-yet-saved quiz answer after a failed save and reload (1m 26s)
  • Programming exercise advanced participation › Programming exercise participation using secure git › Programming exercise participation using SSH › Makes a git submission using SSH with RSA key (12m 18s)
  • Programming exercise advanced participation › Programming exercise team participation › Students of other teams have their own submission (46s)
  • Programming exercise advanced participation › Programming exercise team participation › Check team participation › Instructor checks the participation (5m 57s)

Test Strategy: Running all tests (configuration or infrastructure changes detected)

Overall: ❌ E2E: real (non-flaky) test failure

🔗 Workflow Run · 📊 Test Report

@vivienxr
vivienxr temporarily deployed to playwright-e2e-tests August 8, 2026 14:19 — with GitHub Actions Inactive
@vivienxr
vivienxr had a problem deploying to playwright-e2e-tests August 8, 2026 15:17 — with GitHub Actions Error
@vivienxr
vivienxr marked this pull request as ready for review August 8, 2026 15:31
@vivienxr
vivienxr requested review from a team and krusche as code owners August 8, 2026 15:31
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Iris citations now include attachment and transcription versions. Backend processing tracks transcription revisions and stamps chat results. The frontend parses pinned versions, validates current material versions, and handles stale or unavailable lecture content. Deep-link navigation reports missing lecture units.

Changes

Citation version tracking and backend stamping

Layer / File(s) Summary
Material version tracking and APIs
src/main/java/de/tum/cit/aet/artemis/lecture/..., src/test/java/de/tum/cit/aet/artemis/lecture/...
Processing states track transcription hashes and versions. Repository queries and student-authorized APIs expose ingested and current material versions.
Backend citation stamping
src/main/java/de/tum/cit/aet/artemis/iris/..., src/test/java/de/tum/cit/aet/artemis/iris/...
Iris results are stamped with positional attachment or video versions. Existing, invalid, unresolved, and unavailable citations remain unchanged.
Frontend parsing and navigation
src/main/webapp/app/iris/overview/citation-text/..., src/main/webapp/i18n/*/iris.json
The frontend parses version fields, validates pinned material before routing, omits exact positions for stale or missing content, and displays localized warnings.
Missing lecture-unit deep links
src/main/webapp/app/lecture/overview/course-lectures/details/..., src/main/webapp/i18n/*/lectureUnit.json
Deep-linked missing units trigger localized alerts and clear invalid unit, timestamp, and page targets.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IrisChatSession
  participant IrisCitationService
  participant LectureUnitRepository
  participant IrisCitationTextComponent
  participant IrisCitationMaterialVersionService
  participant LectureUnitResource
  IrisChatSession->>IrisCitationService: stampCitationVersions(text)
  IrisCitationService->>LectureUnitRepository: findIngestedVersionsByIds(ids)
  LectureUnitRepository-->>IrisCitationService: ingested material versions
  IrisCitationService-->>IrisChatSession: stamped citation text
  IrisCitationTextComponent->>IrisCitationMaterialVersionService: getMaterialVersions(lectureUnitId)
  IrisCitationMaterialVersionService->>LectureUnitResource: GET material-versions
  LectureUnitResource-->>IrisCitationTextComponent: current material versions
  IrisCitationTextComponent->>IrisCitationTextComponent: validate versions before routing
Loading

Possibly related PRs

Suggested labels: user interface, user-experience

Suggested reviewers: krusche, bassner, claudia-anthropica

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: associating Iris citations with specific slide and video material versions.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/iris/match-citations-to-versions-of-slides-and-videos

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/de/tum/cit/aet/artemis/iris/service/IrisCitationService.java`:
- Line 195: Update the citation stamping lookup around ingestedVersions and
extractEntityIds to handle oversized matched entity IDs before Long.parseLong;
when parsing fails or the ID cannot fit in a long, preserve and return the
original citation while continuing valid citations. Add a regression test
covering mixed valid and oversized IDs.

In
`@src/main/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackService.java`:
- Around line 465-468: The canonical serialization built in the segment loop
must be unambiguous when any field, especially
LectureTranscriptionSegment.text(), contains separators or line breaks. Replace
the delimiter-only appends in the canonical hashing flow with length-delimited
or structured encoding for every segment field, and add test coverage for
separator and newline content producing distinct hashes.

In
`@src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.ts`:
- Around line 311-316: Update the pinned-version checks in the citation
attribute-building logic around videoVersion and attachmentVersion to test
explicitly for undefined, preserving version 0 and selecting the correct pinned
kind. Add a regression test covering a video or attachment version of 0 and
verifying both pinned attributes are emitted.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e1aeb787-dc85-4a97-b1a4-01f307fe8812

📥 Commits

Reviewing files that changed from the base of the PR and between 5098197 and 7cab0e3.

⛔ Files ignored due to path filters (2)
  • src/main/resources/config/liquibase/changelog/20260729121844_changelog.xml is excluded by !**/*.xml
  • src/main/resources/config/liquibase/master.xml is excluded by !**/*.xml
📒 Files selected for processing (19)
  • src/main/java/de/tum/cit/aet/artemis/iris/service/IrisCitationService.java
  • src/main/java/de/tum/cit/aet/artemis/iris/service/session/AbstractIrisChatSessionService.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/api/LectureUnitRepositoryApi.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/domain/LectureUnitProcessingState.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/dto/LectureUnitIngestedVersionsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/dto/LectureUnitMaterialVersionsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/repository/LectureUnitRepository.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackService.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureUnitResource.java
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-material-version.service.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.spec.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.model.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.util.ts
  • src/main/webapp/i18n/de/iris.json
  • src/main/webapp/i18n/en/iris.json
  • src/test/java/de/tum/cit/aet/artemis/iris/service/IrisCitationServiceTest.java
  • src/test/java/de/tum/cit/aet/artemis/lecture/LectureUnitIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackServiceClassificationTest.java

Comment thread src/main/java/de/tum/cit/aet/artemis/iris/service/IrisCitationService.java Outdated
Comment thread src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.ts Outdated
@github-project-automation github-project-automation Bot moved this from Work In Progress to Ready For Review in Artemis Development Aug 8, 2026
@vivienxr
vivienxr had a problem deploying to playwright-e2e-tests August 8, 2026 15:40 — with GitHub Actions Error

@Claudia-Anthropica Claudia-Anthropica left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vivienxr Changes are requested because the new transcription revision state is not preserved by the existing manual-retry path; the inline comment describes the resulting stale-citation failure. The unresolved CodeRabbit findings on oversized citation IDs and ambiguous transcription hashing are also reproducible on this head and still need fixes. The captured required-CI aggregate is failing, while the replacement server and client test jobs were still in progress, so this snapshot does not provide a clean required-CI result.

* <p>
* Iris citations pin this value so that a cited video timestamp can be checked against the transcription it was generated from.
* It lives here rather than on {@link LectureTranscription} because that row is deleted and recreated when the video changes,
* which would reset a per-row counter; this row survives.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vivienxr [medium] This row does not always survive: LectureContentProcessingService.retryProcessing deletes a failed processing state and creates a fresh one, discarding both the transcription version and its hash. An ingestion failure followed by manual retry therefore loses the current revision; after another video change the counter can restart at 1, causing an old version-1 citation to be treated as current and jump to an unrelated timestamp. Preserve both fields when replacing the failed state (or reuse the existing row), and cover the retry sequence with a regression test.

🤖 Prompt for AI agents

In src/main/java/de/tum/cit/aet/artemis/lecture/domain/LectureUnitProcessingState.java, the supposedly monotonic transcription version and content hash are lost when manual retry replaces the processing-state row, allowing version reuse and stale citations to appear current. Preserve both values across manual retries or reuse the existing row, and add a regression test covering failure, retry, and a later transcription change.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 9, 2026

@Claudia-Anthropica Claudia-Anthropica left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vivienxr The previous retry-state, checkpoint-versioning, citation-format, and lecture-transition defects are resolved on this head. Two correctness gaps remain: pending transcription rows can expose an old version as current, and verified video citations can still navigate to an independently stale PDF page.

if (timestamp) {
queryParams.timestamp = timestamp;
}
if (page) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vivienxr [medium] A video marker can carry both a timestamp and its companion page, but the server intentionally pins only the transcription version. Once that version matches, this method copies both coordinates; if the PDF changed independently, the PDF viewer still jumps to the now-unverified page alongside the valid video timestamp. For stamped citations, include only the coordinate belonging to the pinned material kind (or validate both materials), while preserving legacy behavior for unpinned citations.

🤖 Prompt for AI agents

In src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.ts, verified video citations also forward an unverified companion PDF page, allowing navigation to a stale slide when only the transcription version matches. Pass the pinned kind into navigation and include only the timestamp for video citations or only the page for attachment citations, preserving legacy unpinned navigation, and add a regression test.

@vivienxr
vivienxr had a problem deploying to playwright-e2e-tests August 9, 2026 20:36 — with GitHub Actions Error
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 9, 2026

@Claudia-Anthropica Claudia-Anthropica left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vivienxr The latest commit resolves both remaining correctness issues: material-version lookup now excludes pending transcriptions, and verified video citations forward only the coordinate tied to the checked material. The surrounding lifecycle, parsing, authorization, migration, and regression coverage are consistent with the intended behavior. No required checks were configured in the captured CI snapshot, and no completed relevant check failed.

@vivienxr
vivienxr temporarily deployed to playwright-e2e-tests August 9, 2026 21:08 — with GitHub Actions Inactive
@vivienxr
vivienxr temporarily deployed to playwright-e2e-tests August 10, 2026 07:08 — with GitHub Actions Inactive
@helios-aet
helios-aet Bot temporarily deployed to artemis-test1.artemis.cit.tum.de August 10, 2026 14:02 Inactive
@helios-aet
helios-aet Bot temporarily deployed to artemis-test5.artemis.cit.tum.de August 10, 2026 14:19 Inactive
@helios-aet
helios-aet Bot temporarily deployed to artemis-test3.artemis.cit.tum.de August 10, 2026 15:04 Inactive
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/main/webapp/app/iris/overview/citation-text/iris-citation-text.util.ts (1)

238-246: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use an arrow function for parseTrailingVersion.

Convert the new helper to an arrow function without changing its behavior.

Proposed refactor
-function parseTrailingVersion(parts: string[]): IrisCitationVersion | undefined {
+const parseTrailingVersion = (parts: string[]): IrisCitationVersion | undefined => {
     if (parts.length < CITE_AMOUNT_PARTS_WITH_VERSION) {
         return undefined;
     }
     const match = CITATION_VERSION_FIELD_REGEX.exec(parts[parts.length - 1]);
     if (!match) {
         return undefined;
     }
     return { kind: match[1] === 't' ? 'video' : 'attachment', version: match[2] };
-}
+};

As per path instructions, src/main/webapp/**/*.ts requires code_style:arrow_funcs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/webapp/app/iris/overview/citation-text/iris-citation-text.util.ts`
around lines 238 - 246, Convert the parseTrailingVersion helper from a function
declaration to an arrow-function assignment, preserving its existing parameter
type, return type, validation, regex matching, and result behavior.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/main/webapp/app/iris/overview/citation-text/iris-citation-text.util.ts`:
- Around line 238-246: Convert the parseTrailingVersion helper from a function
declaration to an arrow-function assignment, preserving its existing parameter
type, return type, validation, regex matching, and result behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 910fec2b-af6b-4529-b15d-933df0508743

📥 Commits

Reviewing files that changed from the base of the PR and between 71da16f and 05bdc31.

⛔ Files ignored due to path filters (2)
  • src/main/resources/config/liquibase/changelog/20260729121844_changelog.xml is excluded by !**/*.xml
  • src/main/resources/config/liquibase/master.xml is excluded by !**/*.xml
📒 Files selected for processing (25)
  • src/main/java/de/tum/cit/aet/artemis/iris/service/IrisCitationService.java
  • src/main/java/de/tum/cit/aet/artemis/iris/service/session/AbstractIrisChatSessionService.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/api/LectureUnitRepositoryApi.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/domain/LectureUnitProcessingState.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/dto/LectureUnitIngestedVersionsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/dto/LectureUnitMaterialVersionsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/repository/LectureUnitRepository.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/service/LectureContentProcessingService.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackService.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureUnitResource.java
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-material-version.service.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.spec.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.model.ts
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.util.ts
  • src/main/webapp/app/lecture/overview/course-lectures/details/course-lecture-details.component.spec.ts
  • src/main/webapp/app/lecture/overview/course-lectures/details/course-lecture-details.component.ts
  • src/main/webapp/i18n/de/iris.json
  • src/main/webapp/i18n/de/lectureUnit.json
  • src/main/webapp/i18n/en/iris.json
  • src/main/webapp/i18n/en/lectureUnit.json
  • src/test/java/de/tum/cit/aet/artemis/iris/service/IrisCitationServiceTest.java
  • src/test/java/de/tum/cit/aet/artemis/lecture/LectureUnitIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/LectureContentProcessingServiceTest.java
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackServiceClassificationTest.java
🚧 Files skipped from review as they are similar to previous changes (24)
  • src/main/webapp/i18n/en/lectureUnit.json
  • src/main/webapp/i18n/en/iris.json
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/LectureContentProcessingServiceTest.java
  • src/main/java/de/tum/cit/aet/artemis/iris/service/session/AbstractIrisChatSessionService.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/api/LectureUnitRepositoryApi.java
  • src/main/webapp/i18n/de/lectureUnit.json
  • src/main/java/de/tum/cit/aet/artemis/lecture/dto/LectureUnitIngestedVersionsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/service/LectureContentProcessingService.java
  • src/main/webapp/app/lecture/overview/course-lectures/details/course-lecture-details.component.spec.ts
  • src/main/java/de/tum/cit/aet/artemis/lecture/dto/LectureUnitMaterialVersionsDTO.java
  • src/main/webapp/i18n/de/iris.json
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.spec.ts
  • src/main/java/de/tum/cit/aet/artemis/lecture/domain/LectureUnitProcessingState.java
  • src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureUnitResource.java
  • src/main/webapp/app/lecture/overview/course-lectures/details/course-lecture-details.component.ts
  • src/main/java/de/tum/cit/aet/artemis/lecture/repository/LectureUnitRepository.java
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-material-version.service.ts
  • src/main/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackService.java
  • src/test/java/de/tum/cit/aet/artemis/iris/service/IrisCitationServiceTest.java
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/ProcessingStateCallbackServiceClassificationTest.java
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.component.ts
  • src/test/java/de/tum/cit/aet/artemis/lecture/LectureUnitIntegrationTest.java
  • src/main/webapp/app/iris/overview/citation-text/iris-citation-text.model.ts
  • src/main/java/de/tum/cit/aet/artemis/iris/service/IrisCitationService.java

@vivienxr
vivienxr temporarily deployed to playwright-e2e-tests August 12, 2026 21:26 — with GitHub Actions Inactive

@Claudia-Anthropica Claudia-Anthropica left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vivienxr The current head correctly preserves citation versioning and unit-target navigation after removing the redundant deepLink parameter. The lifecycle, parsing, authorization, migration, and regression coverage remain consistent with the intended behavior. No required checks were configured in the captured CI snapshot, and no completed relevant check failed.

@vivienxr
vivienxr temporarily deployed to playwright-e2e-tests August 13, 2026 16:37 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

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!) database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. iris Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module server Pull requests that update Java code. (Added Automatically!) stale tests

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

2 participants