feat(course-admin): add type annotations and improve model typing #3237
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Add explicit TypeScript types for the submissions route model and service
injections to enhance type safety and code clarity. Update the model method
to use typed parameters and cast return values for submissions and languages.
Add route model type declaration to the controller to align with route output.
These changes reduce type errors and improve maintainability for course admin
submissions filtering and querying logic.
Note
Adds grayed-out tab states based on submission data, wires submission selection via a new handler, and strengthens TypeScript/Glint typings across submissions route, controller, and components.
isGrayedOutinTabs/TabHeader; applyopacity-25class whentab.isGrayedOut(app/components/tabs.ts,app/components/tabs.hbs).Difftab gray when!submission.hasChangedFilesandCode Exampletab when nocommunitySolution(app/components/course-admin/submissions-page/submission-details-container.ts).@onSubmissionSelect={{this.handleSubmissionSelect}}and implementhandleSubmissionSelectto setselectedSubmission(app/components/course-admin/submissions-page/index.hbs,index.ts).Signatureinterfaces, typed service injections, and nullable state with safer fallbacks inSubmissionsPagecomponent; add Glint registry entries (app/components/course-admin/submissions-page/index.ts).CourseAdminSubmissionsRouteModel, type route params/filters, and cast store results; type services (app/routes/course-admin/submissions.ts).modeltype and compute filtered lists from typed slugs (app/controllers/course-admin/submissions.ts).Written by Cursor Bugbot for commit 33f75d2. This will update automatically on new commits. Configure here.