-
Notifications
You must be signed in to change notification settings - Fork 303
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
Athena
: Add badge to display remaining AI feedback requests
#10234
Conversation
WalkthroughThis pull request introduces changes to the feedback request mechanism in an Angular application. The modifications involve removing a configurable feedback attempts limit in the backend service and updating the frontend component to track and display feedback request counts. The changes enhance real-time tracking of feedback requests, with a new limit defined by the instructor and improved websocket-based update handling. Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (9)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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: 3
🧹 Nitpick comments (3)
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts (2)
33-34
: Consider making the feedback limit dynamically configurable.
The hard-coded value is acceptable for now, but pulling it from server or config would be more flexible.
73-76
: Prefer strict equality checks.
When filtering results, use===
instead of==
to avoid unintended type coercion, and directly check boolean flags without== true
.- (result) => result.assessmentType == AssessmentType.AUTOMATIC_ATHENA && result.successful == true + (result) => result.assessmentType === AssessmentType.AUTOMATIC_ATHENA && result.successfulsrc/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.html (1)
14-20
: Remove unnecessarythis.
in template expressions.
In Angular templates, referencing component properties withoutthis.
is customary and more concise.- <span>{{ this.currentFeedbackRequestCount }} / {{ this.feedbackRequestLimit }}</span> + <span>{{ currentFeedbackRequestCount }} / {{ feedbackRequestLimit }}</span>
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseCodeReviewFeedbackService.java
(0 hunks)src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.html
(2 hunks)src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
(6 hunks)
💤 Files with no reviewable changes (1)
- src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseCodeReviewFeedbackService.java
🧰 Additional context used
📓 Path-based instructions (2)
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.html (1)
Pattern src/main/webapp/**/*.html
: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts (1)
🪛 GitHub Check: client-compilation
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
[failure] 52-52:
'athenaResultUpdateListener' is declared but its value is never read.
🪛 GitHub Check: client-tests-selected
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
[failure] 52-52:
'athenaResultUpdateListener' is declared but its value is never read.
🪛 GitHub Check: client-tests
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
[failure] 52-52:
'athenaResultUpdateListener' is declared but its value is never read.
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Call Build Workflow / Build and Push Docker Image
- GitHub Check: Call Build Workflow / Build .war artifact
- GitHub Check: server-tests
- GitHub Check: Analyse
🔇 Additional comments (4)
src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts (3)
2-2
: Use of new RxJS operators is consistent.
No issues found with this import statement.
18-20
: Additional imports are relevant and properly used.
The imports forAssessmentType
,ParticipationWebsocketService
, andResult
appear necessary and conform to Angular style.
50-51
: Inject usage looks great.
No concerns with the new inject API and spacing.src/main/webapp/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.html (1)
32-38
: Same improvement suggestion for anchor-based badge.
Avoid usingthis.
in Angular templates to keep code consistent and aligned with best practices.
...p/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
Show resolved
Hide resolved
...p/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
Outdated
Show resolved
Hide resolved
...p/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
Show resolved
Hide resolved
...p/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
Show resolved
Hide resolved
...p/app/overview/exercise-details/request-feedback-button/request-feedback-button.component.ts
Outdated
Show resolved
Hide resolved
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.
303fc6c
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.
code
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.
Tested on TS2, works as expected.
Code looks good 👍
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.
Athena
: Badge to display remaining AI feedback requestsAthena
: Add badge to display remaining AI feedback requests
Checklist
General
Client
Motivation and Context
Currently, students can request feedback from AI 10 times. However, they only learn about this when they send the 11th request. Therefore, there was a need to let them know about this through UI.
Description
A badge was added to the request feedback button, which displays how many requests students can send.
Additionally, it removes unused, leftover code in
ProgrammingExerciseCodeReviewFeedbackService.java
.Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Manual Tests
Test Coverage
Screenshots
Summary by CodeRabbit
Summary by CodeRabbit
Release Notes
New Features
Improvements
Changes
The updates provide more transparent feedback request management for users, with visual indicators of their current request status.