Skip to content

Conversation

@Hialus
Copy link
Member

@Hialus Hialus commented Sep 19, 2025

Checklist

General

Server

Client

Motivation and Context

We want to hide the long memory creation phase from the user and allow them to chat while it is running.

Description

Soft-linked to ls1intum/edutelligence#260.

I added an internal marker for stages. The UI filters out these stages and does not show them to the user, while still getting info from them.

Steps for Testing

Prerequisites:

  1. Log in to Artemis
  2. Go to the admin menu > Feature toggles
  3. Enable Memiris
  4. Go to User Settings > Learner Profile > Enable memory creation/usage
  5. Go to a course dashboard
  6. Chat with Iris
  7. The Memory Creation stage will never show

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features

    • Stages marked as internal are now excluded from public stage streams and hidden from the chat status bar and stage lists, reducing UI clutter while preserving progress accuracy.
  • Tests

    • Automated tests updated to include the new internal flag and to verify that internal stages are not shown in the UI streams.

@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Sep 19, 2025
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) iris Pull requests that affect the corresponding module labels Sep 19, 2025
@github-actions github-actions bot added the tests label Sep 19, 2025
@Hialus Hialus marked this pull request as ready for review September 19, 2025 16:30
@Hialus Hialus requested a review from a team as a code owner September 19, 2025 16:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 19, 2025

Walkthrough

PyrisStageDTO gained a new boolean component internal (default false). Backend record and its factory methods were updated; Java call sites and tests were adjusted to the new constructor. Frontend model added internal and IrisChatService now filters out internal stages; Angular tests updated accordingly.

Changes

Cohort / File(s) Summary
Backend DTO signature change
src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/dto/status/PyrisStageDTO.java
Added boolean internal component annotated with @JsonProperty(defaultValue = "false"); record signature now has five args. All builder/transition methods propagate internal.
Backend service call-site updates
src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/PyrisPipelineService.java
Updated PyrisStageDTO constructions to pass the new internal boolean (false) for created stages.
Frontend model
src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts
Added public internal: boolean field to IrisStageDTO (marks stages hidden from UI).
Frontend service behavior
src/main/webapp/app/iris/overview/services/iris-chat.service.ts
Introduced filterStages(stages: IrisStageDTO[]) and now emits only non-internal stages for MESSAGE and STATUS websocket payloads.
Frontend tests — service spec
src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
Added test verifying STATUS payloads with internal stages are filtered; updated imports/mocks.
Frontend component tests
src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.spec.ts
Updated test fixtures to include internal: false on IrisStageDTO objects; assertions unchanged.
Java integration & unit tests — constructor updates
src/test/java/.../IrisChatTokenTrackingIntegrationTest.java, .../IrisCompetencyGenerationIntegrationTest.java, .../IrisTutorSuggestionIntegrationTest.java, .../MemirisIntegrationTest.java, .../PyrisFaqIngestionTest.java, .../PyrisRewritingIntegrationTest.java
All PyrisStageDTO instantiations migrated from 4-arg to 5-arg form, passing false as the new final parameter; no logic changes.
Lecture ingestion test — constructor and message text
src/test/java/.../PyrisLectureIngestionTest.java
Migrated PyrisStageDTO calls to 5-arg form (false). Also updated some in-progress status message strings (German → English) in test expectations.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant BE as Backend (Pyris)
  participant WS as WebSocket
  participant SVC as IrisChatService
  participant UI as ChatStatusBar

  BE->>WS: Push payload { stages[] } (some stages may have internal=true)
  WS-->>SVC: MESSAGE / STATUS payload
  rect rgb(235,245,255)
    note right of SVC: New filtering step
    SVC->>SVC: filterStages(stages) => stages.filter(stage => !stage.internal)
  end
  SVC-->>UI: stages (internal filtered out)
  UI->>UI: Render progress and stage names from received stages
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review attention:
    • PyrisStageDTO record signature, @JsonProperty usage, and all builder/with methods.
    • Backend call sites constructing PyrisStageDTO (ensure correct boolean propagation).
    • Frontend IrisChatService.filterStages logic and tests added/updated.
    • Updated Java tests, plus localized message text changes in PyrisLectureIngestionTest.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The pull request title 'Iris: Support internal stages that are hidden from the user' directly and clearly describes the main feature being added—the ability to mark stages as internal so they are hidden from the user interface. The title is concise, specific, and accurately summarizes the primary objective of the changeset across both backend and frontend modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/iris/support-internal-stages

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (7)
src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts (1)

6-7: Default to false to avoid undefined at runtime

Safer default in case older backends omit the field; keeps client filtering stable.

Apply this diff:

-    // Internal stages are not shown in the UI and are hidden from the user
-    internal: boolean;
+    /** Internal stages are not shown in the UI and are hidden from the user */
+    internal = false;
src/main/webapp/app/iris/overview/services/iris-chat.service.ts (1)

421-423: Be explicit in the filter to handle missing fields

Using an explicit check reads clearer and is resilient if internal is absent or nullable.

Apply this diff:

-    private filterStages(stages: IrisStageDTO[]): IrisStageDTO[] {
-        return stages.filter((stage) => !stage.internal);
-    }
+    private filterStages(stages: IrisStageDTO[]): IrisStageDTO[] {
+        return stages.filter(({ internal }) => internal !== true);
+    }

If you want, I can add a focused unit test for this method (one stage with internal: true is filtered out; undefined/false are kept).

src/test/java/de/tum/cit/aet/artemis/iris/PyrisFaqIngestionTest.java (2)

198-198: Minor wording nit in test strings

The message reads awkwardly (“Stage not broke due to error.”). Consider clearer phrasing to aid future debugging.

Apply this diff pattern at the listed lines:

-        PyrisStageDTO errorStage = new PyrisStageDTO("error", 1, PyrisStageState.ERROR, "Stage not broke due to error.", false);
+        PyrisStageDTO errorStage = new PyrisStageDTO("error", 1, PyrisStageState.ERROR, "Stage failed due to an error.", false);

Also applies to: 211-211, 225-225, 241-241


142-142: Reduce repetition with a small factory helper

Optional: a local helper improves readability and keeps the internal default in one place.

Add inside the test class:

private static PyrisStageDTO stage(String name, int weight, PyrisStageState state, String message) {
    return new PyrisStageDTO(name, weight, state, message, false);
}

Then replace e.g.:

- PyrisStageDTO doneStage = new PyrisStageDTO("done", 1, PyrisStageState.DONE, "Stage completed successfully.", false);
+ PyrisStageDTO doneStage = stage("done", 1, PyrisStageState.DONE, "Stage completed successfully.");

Also applies to: 155-155, 168-169, 183-184

src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/PyrisPipelineService.java (1)

125-127: Avoid null state/message in stage templates (optional)

Consider small helpers/factories to avoid passing null and to centralize default weights/names for “Preparing” and “Executing pipeline”.

Apply (example):

- var preparing = new PyrisStageDTO("Preparing", 10, null, null, false);
- var executing = new PyrisStageDTO("Executing pipeline", 30, null, null, false);
+ var preparing = new PyrisStageDTO("Preparing", 10, PyrisStageState.NOT_STARTED, null, false);
+ var executing = new PyrisStageDTO("Executing pipeline", 30, PyrisStageState.NOT_STARTED, null, false);

Or introduce constants/factories to dedupe literals used across tests.

src/test/java/de/tum/cit/aet/artemis/iris/MemirisIntegrationTest.java (1)

134-135: Use existing static imports for PyrisStageState

You already import IN_PROGRESS/DONE statically; drop the FQNs for consistency/readability.

Apply:

- var executingInProgress = new PyrisStageDTO("Executing pipeline", 30, de.tum.cit.aet.artemis.iris.service.pyris.dto.status.PyrisStageState.IN_PROGRESS, null, false);
- var executingDone = new PyrisStageDTO("Executing pipeline", 30, de.tum.cit.aet.artemis.iris.service.pyris.dto.status.PyrisStageState.DONE, null, false);
+ var executingInProgress = new PyrisStageDTO("Executing pipeline", 30, IN_PROGRESS, null, false);
+ var executingDone = new PyrisStageDTO("Executing pipeline", 30, DONE, null, false);
- var executingInProgress = new PyrisStageDTO("Executing pipeline", 30, de.tum.cit.aet.artemis.iris.service.pyris.dto.status.PyrisStageState.IN_PROGRESS, null, false);
+ var executingInProgress = new PyrisStageDTO("Executing pipeline", 30, IN_PROGRESS, null, false);

Also applies to: 194-194

src/test/java/de/tum/cit/aet/artemis/iris/PyrisLectureIngestionTest.java (1)

233-233: Polish error message grammar (nitpick)

“Stage not broke due to error.” → “Stage failed due to an error.”

Apply:

- PyrisStageDTO errorStage = new PyrisStageDTO("error", 1, PyrisStageState.ERROR, "Stage not broke due to error.", false);
+ PyrisStageDTO errorStage = new PyrisStageDTO("error", 1, PyrisStageState.ERROR, "Stage failed due to an error.", false);

Also applies to: 247-247, 263-263, 279-279

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 429cb09 and 1717a92.

📒 Files selected for processing (12)
  • src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/PyrisPipelineService.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/dto/status/PyrisStageDTO.java (1 hunks)
  • src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.spec.ts (2 hunks)
  • src/main/webapp/app/iris/overview/services/iris-chat.service.ts (1 hunks)
  • src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisChatTokenTrackingIntegrationTest.java (2 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisCompetencyGenerationIntegrationTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisTutorSuggestionIntegrationTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/MemirisIntegrationTest.java (2 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisFaqIngestionTest.java (8 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisLectureIngestionTest.java (10 hunks)
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisRewritingIntegrationTest.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
src/test/java/**/*.java

⚙️ CodeRabbit configuration file

test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

Files:

  • src/test/java/de/tum/cit/aet/artemis/iris/IrisTutorSuggestionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisLectureIngestionTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisRewritingIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisCompetencyGenerationIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/MemirisIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisFaqIngestionTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisChatTokenTrackingIntegrationTest.java
src/main/webapp/**/*.ts

⚙️ CodeRabbit configuration file

angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

Files:

  • src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts
  • src/main/webapp/app/iris/overview/services/iris-chat.service.ts
  • src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.spec.ts
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

Files:

  • src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/PyrisPipelineService.java
  • src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/dto/status/PyrisStageDTO.java
🧠 Learnings (2)
📚 Learning: 2024-10-15T11:33:17.915Z
Learnt from: alexjoham
PR: ls1intum/Artemis#9455
File: src/test/java/de/tum/cit/aet/artemis/iris/IrisTextExerciseChatMessageIntegrationTest.java:401-401
Timestamp: 2024-10-15T11:33:17.915Z
Learning: In the Artemis project, when new fields are added to classes like `PyrisChatStatusUpdateDTO`, corresponding tests may be implemented in separate integration test classes such as `IrisChatTokenTrackingIntegrationTest`.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/iris/IrisTutorSuggestionIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisLectureIngestionTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisRewritingIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisCompetencyGenerationIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/MemirisIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/PyrisFaqIngestionTest.java
  • src/test/java/de/tum/cit/aet/artemis/iris/IrisChatTokenTrackingIntegrationTest.java
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: julian-christl
PR: ls1intum/Artemis#8052
File: src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java:310-310
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Modifications to parameters in `competencyProgressUtilService.createCompetencyProgress` for debugging purposes are considered irrelevant to the test outcomes but helpful for clarity during debugging.

Applied to files:

  • src/test/java/de/tum/cit/aet/artemis/iris/IrisCompetencyGenerationIntegrationTest.java
🧬 Code graph analysis (2)
src/main/webapp/app/iris/overview/services/iris-chat.service.ts (1)
src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts (1)
  • IrisStageDTO (1-10)
src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.spec.ts (1)
src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts (1)
  • IrisStageDTO (1-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (13)
src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.spec.ts (1)

26-26: LGTM — test data updated to new DTO shape

All updated stage literals now include internal: false and keep expectations intact.

Also applies to: 34-34, 42-42, 49-49, 54-54, 68-68

src/main/webapp/app/iris/overview/services/iris-chat.service.ts (1)

409-414: LGTM — emitting only non‑internal stages on WS updates

Filtering on both MESSAGE and STATUS payloads matches the feature intent.

src/test/java/de/tum/cit/aet/artemis/iris/IrisTutorSuggestionIntegrationTest.java (1)

309-309: LGTM — constructor updated to new API

Supplying the internal flag (false) aligns with the new 5‑arg PyrisStageDTO signature.

src/test/java/de/tum/cit/aet/artemis/iris/PyrisFaqIngestionTest.java (1)

142-142: LGTM — all stage constructions migrated to 5‑arg ctor

Consistent use of false for internal across tests.

Also applies to: 155-155, 168-169, 183-184, 198-198, 211-211, 225-225, 241-241

src/test/java/de/tum/cit/aet/artemis/iris/IrisCompetencyGenerationIntegrationTest.java (1)

67-67: 5‑arg PyrisStageDTO usage — LGTM

Constructor update looks correct and aligns with the new API.

src/test/java/de/tum/cit/aet/artemis/iris/PyrisRewritingIntegrationTest.java (1)

65-65: 5‑arg PyrisStageDTO usage — LGTM

Correct adaptation to the new signature.

src/test/java/de/tum/cit/aet/artemis/iris/IrisChatTokenTrackingIntegrationTest.java (2)

133-133: 5‑arg PyrisStageDTO in doneStage — LGTM


185-185: 5‑arg PyrisStageDTO in failedStages — LGTM

src/test/java/de/tum/cit/aet/artemis/iris/MemirisIntegrationTest.java (2)

356-356: Deletion ingestion flow: stage construction — LGTM

Correct 5‑arg usage; semantics unchanged.


385-385: Status text: OK

Message reads naturally; consistent with prior “Stage completed successfully.”

src/main/java/de/tum/cit/aet/artemis/iris/service/pyris/dto/status/PyrisStageDTO.java (2)

7-7: New ‘internal’ flag on stage — verify backward compatibility

Change looks right and NON_EMPTY ensures false isn’t serialized. Please confirm legacy payloads (without “internal”) still deserialize to false with records.

You can add a focused test:

// e.g., PyrisStageDTOJsonTest.java
@Test
void deserializesWithoutInternal_defaultsToFalse() throws Exception {
    var json = """
      {"name":"X","weight":1,"state":"DONE","message":"m"}
    """;
    var dto = new ObjectMapper().readValue(json, PyrisStageDTO.class);
    assertThat(dto.internal()).isFalse();
}

10-27: State-transition helpers preserve ‘internal’ — LGTM

All helpers correctly propagate the new flag.

src/test/java/de/tum/cit/aet/artemis/iris/PyrisLectureIngestionTest.java (1)

171-171: 5‑arg PyrisStageDTO usages — LGTM

All instantiations were updated consistently; no behavior change.

Also applies to: 186-186, 200-201, 216-217, 233-233, 247-247, 263-263, 279-279, 356-356

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 9m 5s 578ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 4s 487ms

@github-actions
Copy link

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.

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 508ms
TestResultTime ⏱
No test annotations available

toukhi
toukhi previously approved these changes Oct 7, 2025
Copy link
Contributor

@toukhi toukhi left a comment

Choose a reason for hiding this comment

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

Code looks good to me. Tested locally and works as expected.

@hakanduranC hakanduranC self-requested a review October 13, 2025 06:00
hakanduranC
hakanduranC previously approved these changes Oct 13, 2025
Copy link
Contributor

@hakanduranC hakanduranC left a comment

Choose a reason for hiding this comment

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

The code review has been completed and approved.

@Hialus Hialus added this to the 8.5.0 milestone Oct 13, 2025
@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de October 13, 2025 21:04 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de October 13, 2025 21:28 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de October 14, 2025 14:39 Inactive
Anishyou
Anishyou previously approved these changes Oct 16, 2025
Copy link
Contributor

@Anishyou Anishyou left a comment

Choose a reason for hiding this comment

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

code lgtm

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 18m 7s 983ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exam/test-exam/TestExamStudentExams.spec.ts
ts.Test Exam - student exams › Check exam participants and their submissions › Search for a student in exams❌ failure6m 8s 244ms

@Hialus Hialus moved this from Work In Progress to Ready For Review in Artemis Development Oct 17, 2025
@krusche krusche modified the milestones: 8.4.3, 8.4.4 Oct 20, 2025
Nayer-kotry
Nayer-kotry previously approved these changes Oct 21, 2025
Copy link
Contributor

@Nayer-kotry Nayer-kotry left a comment

Choose a reason for hiding this comment

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

Tested on the iris test server, works as intended.

@Hialus Hialus dismissed stale reviews from Nayer-kotry, Anishyou, toukhi, and hakanduranC via a6c3419 October 29, 2025 13:13
@Hialus Hialus requested a review from krusche as a code owner October 29, 2025 13:13
# Conflicts:
#	src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
# Conflicts:
#	src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a34ca25 and 7d800d6.

📒 Files selected for processing (2)
  • src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts (2 hunks)
  • src/main/webapp/app/iris/overview/services/iris-chat.service.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/webapp/app/iris/overview/services/iris-chat.service.ts
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/**/*.ts

⚙️ CodeRabbit configuration file

angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

Files:

  • src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
🧠 Learnings (5)
📓 Common learnings
Learnt from: alexjoham
PR: ls1intum/Artemis#9455
File: src/test/java/de/tum/cit/aet/artemis/iris/IrisTextExerciseChatMessageIntegrationTest.java:401-401
Timestamp: 2024-10-15T11:33:17.915Z
Learning: In the Artemis project, when new fields are added to classes like `PyrisChatStatusUpdateDTO`, corresponding tests may be implemented in separate integration test classes such as `IrisChatTokenTrackingIntegrationTest`.
📚 Learning: 2024-10-15T11:33:17.915Z
Learnt from: alexjoham
PR: ls1intum/Artemis#9455
File: src/test/java/de/tum/cit/aet/artemis/iris/IrisTextExerciseChatMessageIntegrationTest.java:401-401
Timestamp: 2024-10-15T11:33:17.915Z
Learning: In the Artemis project, when new fields are added to classes like `PyrisChatStatusUpdateDTO`, corresponding tests may be implemented in separate integration test classes such as `IrisChatTokenTrackingIntegrationTest`.

Applied to files:

  • src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
📚 Learning: 2024-06-10T19:44:09.116Z
Learnt from: RY997
PR: ls1intum/Artemis#7695
File: src/main/webapp/app/iris/exercise-chatbot/widget/chatbot-widget.component.ts:775-777
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Step error messages in the `notifyStepFailed` method of the `IrisChatbotWidgetComponent` are intentionally not dispatched to the state store as part of the changes in PR 7695.

Applied to files:

  • src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
📚 Learning: 2024-10-10T11:42:23.069Z
Learnt from: pzdr7
PR: ls1intum/Artemis#9443
File: src/test/javascript/spec/component/hestia/git-diff-report/git-diff-modal.component.spec.ts:55-60
Timestamp: 2024-10-10T11:42:23.069Z
Learning: In `git-diff-report-modal.component.spec.ts`, using `fakeAsync` and `tick` does not work for handling asynchronous operations in the tests; alternative methods are needed.

Applied to files:

  • src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
📚 Learning: 2025-04-01T17:19:55.677Z
Learnt from: tobias-lippert
PR: ls1intum/Artemis#10610
File: src/test/javascript/spec/service/guided-tour.service.spec.ts:193-193
Timestamp: 2025-04-01T17:19:55.677Z
Learning: In the guide tour service tests, the `router.navigateByUrl` mock should remain synchronous (returning boolean) rather than returning a Promise to maintain compatibility with existing test logic that depends on synchronous behavior.

Applied to files:

  • src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts
🧬 Code graph analysis (1)
src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts (2)
src/test/javascript/spec/helpers/sample/iris-sample-data.ts (2)
  • mockServerSessionHttpResponseWithId (151-160)
  • mockWebsocketStatusMessageWithInteralStage (92-105)
src/main/webapp/app/iris/shared/entities/iris-stage-dto.model.ts (1)
  • IrisStageDTO (1-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: client-tests
  • GitHub Check: client-style
  • GitHub Check: client-tests-selected
  • GitHub Check: server-style
  • GitHub Check: server-tests
  • GitHub Check: Analyse
  • GitHub Check: bean-instantiation-check
🔇 Additional comments (1)
src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts (1)

242-252: Well-structured test for internal stage filtering.

The test correctly verifies that internal stages are filtered from the currentStages() observable, aligning with the PR objective to hide internal stages from the UI. The test follows existing patterns, uses appropriate mocking, and the assertion accurately validates the filtering behavior.

mockUserMessageWithContent,
mockWebsocketServerMessage,
mockWebsocketStatusMessage,
mockWebsocketStatusMessageWithInteralStage,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix typo in mock variable name.

The variable mockWebsocketStatusMessageWithInteralStage has a typo: "Interal" should be "Internal". This originates from the source file test/helpers/sample/iris-sample-data.ts (line 91) and should be corrected there.

Consider renaming in the source file:

// In test/helpers/sample/iris-sample-data.ts
-export const mockWebsocketStatusMessageWithInteralStage = {
+export const mockWebsocketStatusMessageWithInternalStage = {

Then update the import and usage in this file accordingly.

🤖 Prompt for AI Agents
In src/main/webapp/app/iris/overview/services/iris-chat.service.spec.ts around
line 25, the imported mock variable name has a typo
(mockWebsocketStatusMessageWithInteralStage); update the source definition in
test/helpers/sample/iris-sample-data.ts (line ~91) to rename the export to
mockWebsocketStatusMessageWithInternalStage, then update the import in this spec
file to use the corrected name and update any usages accordingly so the
import/export names match.

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 9m 49s 555ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseDropLocation.spec.ts
ts.Quiz Exercise Drop Location Spec › DnD Quiz drop locations › Checks drop locations❌ failure2m 3s 224ms

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 5m 40s 723ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseDropLocation.spec.ts
ts.Quiz Exercise Drop Location Spec › DnD Quiz drop locations › Checks drop locations❌ failure2m 3s 429ms

@bassner bassner changed the title Iris: Support internal stages that are hidden in the client Iris: Support internal stages that are hidden from the user Nov 3, 2025
@bassner bassner merged commit 486232d into develop Nov 3, 2025
27 of 31 checks passed
@bassner bassner deleted the feature/iris/support-internal-stages branch November 3, 2025 15:31
@github-project-automation github-project-automation bot moved this from Ready For Review to Merged in Artemis Development Nov 3, 2025
@krusche krusche changed the title Iris: Support internal stages that are hidden from the user Development: Support internal stages that are hidden from the user Nov 3, 2025
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!) iris Pull requests that affect the corresponding module server Pull requests that update Java code. (Added Automatically!) tests

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

8 participants