Repository navigation
Conversation
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.
Fixes #103.
When a task has an unanswered question and the person marks it done, the task page offers Reopen — but the row in Tasks → Active still offered "Mark done". Pressing it called /resolve a second time instead of reopening the task.
The row decided Reopen from its grouped status, and the grouping gives a pending question priority (statusOf returns "needs_input" whenever something waits), even though the task already carries a resolution timestamp. The task page decides from the timestamp instead (done = task.resolvedAt !== null). The row now does the same: the check is filled and offers Reopen whenever resolvedAt is set, while the row keeps its Needs input grouping so the pending question stays visible.
Test: added "a done task still offers Reopen under Needs input while its question waits" to openbot/app/tests/tasks-screen.test.tsx — a task with resolvedAt set and status needs_input plus an unanswered question from its own thread. Verified the new test fails on pristine code (the button read "Mark Choose a deck done") and passes with the fix, asserting the click sends POST /reopen and never POST /resolve. tasks-screen + pages + task-groups: 98/98 pass. App typecheck and biome format/lint clean.