Conversation
What was broken Task challenges created from the work app could still show registration, unregistration, and submission controls in the challenge header. Assigned task cards could also remain visible in listings for users who were not the assignee when the payload used flattened task fields. Root cause The UI only normalized task state in some places. Header logic and listing filters depended on nested task fields or partial task detection, while work-app task payloads can expose task flags as flattened taskIsTask, taskIsAssigned, and taskMemberId fields. What was changed Added a shared getTaskInfo helper in utils/challenge to normalize task detection and assignment data across nested, flattened, and legacy task payloads. Updated the challenge detail header to use the normalized task info when deciding whether task-only actions should be hidden. Updated the listing bucket filter to hide assigned tasks for non-assigned users when the task payload uses flattened fields. Any added/updated tests Added header coverage for flattened task payloads to confirm task actions stay hidden. Added bucket coverage for flattened assigned-task payloads to confirm non-assigned users do not see those cards.
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.
What was broken
Task challenges created from the work app could still show registration, unregistration, and submission controls in the challenge header. Assigned task cards could also remain visible in listings for users who were not the assignee when the payload used flattened task fields.
Root cause
The UI only normalized task state in some places. Header logic and listing filters depended on nested task fields or partial task detection, while work-app task payloads can expose task flags as flattened taskIsTask, taskIsAssigned, and taskMemberId fields.
What was changed
Added a shared getTaskInfo helper in utils/challenge to normalize task detection and assignment data across nested, flattened, and legacy task payloads.
Updated the challenge detail header to use the normalized task info when deciding whether task-only actions should be hidden.
Updated the listing bucket filter to hide assigned tasks for non-assigned users when the task payload uses flattened fields.
Any added/updated tests
Added header coverage for flattened task payloads to confirm task actions stay hidden.
Added bucket coverage for flattened assigned-task payloads to confirm non-assigned users do not see those cards.