-
Notifications
You must be signed in to change notification settings - Fork 313
Communication
: Add first Iris Tutor Suggestion Interface
#10666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Communication
: Add first Iris Tutor Suggestion Interface
#10666
Conversation
End-to-End (E2E) Test Results Summary
|
End-to-End (E2E) Test Results Summary
|
...webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.ts
Outdated
Show resolved
Hide resolved
...webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.ts
Outdated
Show resolved
Hide resolved
...webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.ts
Outdated
Show resolved
Hide resolved
...ons-components/layout/conversation-thread-sidebar/conversation-thread-sidebar.component.html
Outdated
Show resolved
Hide resolved
End-to-End (E2E) Test Results Summary
|
There was a problem hiding this 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 (2)
src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.spec.ts (2)
63-134
: Consider refactoring the nested test cases to reduce code duplication.Each test under "should set irisEnabled to" performs similar component re-creation steps that could be extracted to a helper method for better maintainability.
+ private recreateComponent(): void { + fixture = TestBed.createComponent(TutorSuggestionComponent); + component = fixture.componentInstance; + componentRef = fixture.componentRef; + }
139-142
: Use constants for message sender types to improve consistency.The tests use string literals 'TUT_SUG' and 'LLM' in different places for checking message senders. Consider using constants for these values to improve consistency and maintainability.
+ // At the top of the file with other constants + const SENDER_TUTOR_SUGGESTION = 'TUT_SUG'; + const SENDER_LLM = 'LLM'; + - const mockMessages = [{ id: 2, sender: 'TUT_SUG' }] as IrisMessage[]; + const mockMessages = [{ id: 2, sender: SENDER_TUTOR_SUGGESTION }] as IrisMessage[]; // And in other places - const mockMessages = [{ id: 1, sender: 'USER' } as IrisMessage, { id: 2, sender: 'LLM' } as IrisMessage]; + const mockMessages = [{ id: 1, sender: 'USER' } as IrisMessage, { id: 2, sender: SENDER_LLM } as IrisMessage];Also applies to: 179-180
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
src/main/resources/config/liquibase/master.xml
is excluded by!**/*.xml
📒 Files selected for processing (2)
src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.spec.ts
(1 hunks)src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.ts
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.ts
🧰 Additional context used
📓 Path-based instructions (1)
`src/main/webapp/**/*.ts`: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalC...
src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.spec.ts
🧬 Code Graph Analysis (1)
src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.spec.ts (1)
src/main/webapp/app/iris/shared/entities/iris-message.model.ts (1)
IrisMessage
(41-41)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: Build and Push Docker Image / Build Docker Image for ls1intum/artemis
- GitHub Check: Build and Push Docker Image / Build Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: client-tests-selected
- GitHub Check: client-tests
- GitHub Check: client-style
- GitHub Check: server-tests
- GitHub Check: server-style
- GitHub Check: Analyse
- GitHub Check: Mend Security Check
🔇 Additional comments (3)
src/main/webapp/app/communication/course-conversations/tutor-suggestion/tutor-suggestion.component.spec.ts (3)
1-241
: Well-structured and comprehensive test suite for the new TutorSuggestionComponent.The test file follows Angular testing best practices with good coverage of component lifecycle, conditional logic, and error handling scenarios. The tests properly verify:
- Component initialization with service interactions
- Proper switching to TUTOR_SUGGESTION mode
- Settings loading and permission checking
- Subscription management
- Message handling and suggestion requests
150-176
: Good subscription management to prevent memory leaks.The tests properly verify that all subscriptions are unsubscribed in the ngOnDestroy lifecycle hook, which is essential for preventing memory leaks in Angular applications.
189-240
: Thorough testing of requestSuggestion method with various conditions.The test suite comprehensively covers the requestSuggestion method behavior under different conditions:
- Error handling with fallback
- Message emission sequencing
- Permission checking
- Message type validation
This thorough testing ensures the component behaves correctly in various scenarios.
End-to-End (E2E) Test Results Summary
|
I added a darkmode. Regarding the bug with the selected variant. I had it too locally, but also for other Iris settings. I deleted the settings in the database and restarted the Server and not it is working again displaying default as a variant. I am not sure what is destroying the database entries, but I reused exisiting settings to build those settings, so if this problem still exists we should think about creating an issue for that |
End-to-End (E2E) Test Results Summary
|
End-to-End (E2E) Test Results Summary
|
Tested locally- Works fine. On student perspective tutor suggestion pipeline is not shown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checklist
General
Server
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Motivation and Context
The communication section gets a big upgrade: The tutor suggestion. This adds a new tool for all tutors to use when answering student questions. When opening a thread, Iris creates a suggestion for tutors to use when answering questions from students. This means the communication section needs to add this feature. For that, a first version is needed that already includes: Settings to toggle this feature, Authentification to only allow tutors and higher to see the suggestions, and a database migration that saves sessions and history. This basic version lays the ground for further improvements to be added in follow-up PRs.
Description
!! Important: This is work in progress! With this PR a first version of the tutor suggestion feature is introduced. More changes are added with upcoming PRs !!
This PR introduces the Iris Tutor Suggestion functionality, enabling the generation of Iris-assisted tutor suggestions in response to student posts within conversation threads.
Domain & Session Layer:
IrisTutorSuggestionSession
, a new session type that links a tutor’s Iris chat session to a specific Post.IrisMessageSender
to includeTUT_SUG
as a new message source.IrisSessionService
to handle the new session type and associated access control.Settings Infrastructure:
IrisTutorSuggestionSubSettings
with support across global, course, and exercise-level configurations.IrisCombinedSettingsDTO
.IrisSettingsService
andIrisSubSettingsService
to manage these new settings and enable cascading logic.Pipeline Execution
TutorSuggestionJob
andPyrisTutorSuggestionPipelineExecutionDTO
to define the tutor suggestion pipeline in Pyris.PyrisPipelineService
and status handling inPyrisStatusUpdateService
.REST API:
Added
IrisTutorSuggestionSessionResource
with endpoints to:IrisMessageResource
to allowTUT_SUG
messages to be saved and processed appropriately.Frontend:
New Angular component
TutorSuggestionComponent
:ConversationThreadSidebar
to render suggestions in line.Persistence:
Liquibase changes to:
post_id
toiris_session
.Steps for Testing
Prerequisites:
Activate the feature:
Test for students:
Test for tutors:
Check settings:
To roll back the migration, execute this SQL statement:
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
Manual Tests
Exam Mode Test
Performance Tests
Test Coverage
Client
Server
Screenshots
Running pipeline
Finished pipeline with result
Failed pipeline
Summary by CodeRabbit
New Features
Bug Fixes
Tests