fix: return to dashboard view after task submission completes - #510
Open
Sujay-Deakin wants to merge 1 commit into
Open
fix: return to dashboard view after task submission completes#510Sujay-Deakin wants to merge 1 commit into
Sujay-Deakin wants to merge 1 commit into
Conversation
Task view now clears the selected task definition when its status updates via TaskService.taskStatusUpdated$, so the panel falls back to the progress dashboard instead of staying on the submitted task. Closes doubtfire-lms#1183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes doubtfire-lms#1183: the task view now automatically returns to the progress dashboard after a task's submission status updates, instead of staying stuck on the submitted task.
Root Cause
ProjectDashboardComponent never cleared selectedTaskDefinition$ after a submission completed, so the right-hand panel stayed on f-task-dashboard instead of falling back to f-progress-dashboard.
Change
Subscribed to the existing TaskService.taskStatusUpdated$ emitter (already used by task-status-card and task-comments-viewer) in ngOnInit(). When the updated task matches the currently selected task definition, clears the selection.
Testing
Tested locally as a student account: reproduced the bug pre-fix (task view stuck after submission, confirmed still stuck 10 minutes later), then confirmed the fix resolves it across two different tasks and file types.
Before:

After:
