Skip to content

PM-4680: fix task timeline visibility in challenge details#1626

Merged
jmgasper merged 5 commits intodevfrom
PM-4680-1
Apr 6, 2026
Merged

PM-4680: fix task timeline visibility in challenge details#1626
jmgasper merged 5 commits intodevfrom
PM-4680-1

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 3, 2026

What was broken
The previous PM-4680 fix hid the editable task timeline inside ChallengeEditorForm, but task identity still fell back to unresolved type metadata and the page treated every existing challenge as edit mode. QA still saw timelines in task edit mode, and task view routes could also be misclassified as edit mode.

Root cause
ChallengeEditorPage passed isEditMode for every existing challenge instead of only the edit route. Inside ChallengeEditorForm, the task-only UI relied on resolved challenge type metadata and could overwrite a persisted task flag before that metadata was available.

What was changed
ChallengeEditorPage now passes edit mode only on true edit routes. ChallengeEditorForm now derives a single task-state flag from resolved type metadata plus the persisted task marker, uses that flag to hide the editable timeline in task edit mode, keeps task-only controls aligned with the same fallback, and preserves the persisted task flag until type metadata resolves.

Any added/updated tests
Updated ChallengeEditorPage.spec.tsx to cover edit-versus-view mode wiring into the details form. Updated ChallengeEditorForm.spec.tsx to cover the persisted task-flag fallback when challenge type metadata is unavailable in edit mode. Repo-wide yarn test:no-watch still fails in the pre-existing wallet-admin PaymentsListView suite, and the same three failures reproduce on untouched origin/dev.


Open with Devin

What was broken
The previous PM-4680 fix hid the editable task timeline inside ChallengeEditorForm, but task identity still fell back to unresolved type metadata and the page treated every existing challenge as edit mode. QA still saw timelines in task edit mode, and task view routes could also be misclassified as edit mode.

Root cause
ChallengeEditorPage passed isEditMode for every existing challenge instead of only the edit route. Inside ChallengeEditorForm, the task-only UI relied on resolved challenge type metadata and could overwrite a persisted task flag before that metadata was available.

What was changed
ChallengeEditorPage now passes edit mode only on true edit routes. ChallengeEditorForm now derives a single task-state flag from resolved type metadata plus the persisted task marker, uses that flag to hide the editable timeline in task edit mode, keeps task-only controls aligned with the same fallback, and preserves the persisted task flag until type metadata resolves.

Any added/updated tests
Updated ChallengeEditorPage.spec.tsx to cover edit-versus-view mode wiring into the details form. Updated ChallengeEditorForm.spec.tsx to cover the persisted task-flag fallback when challenge type metadata is unavailable in edit mode.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 3, 2026 07:16
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@jmgasper jmgasper merged commit 61bfd5f into dev Apr 6, 2026
9 checks passed
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