Skip to content

PM-4648: normalize task visibility for work app tasks#7201

Open
jmgasper wants to merge 1 commit intodevelopfrom
PM-4648-4
Open

PM-4648: normalize task visibility for work app tasks#7201
jmgasper wants to merge 1 commit intodevelopfrom
PM-4648-4

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 3, 2026

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.

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.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 3, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant