This AI coding phone screen ended in rejection. Sending the problem directly to an AI could miss an important edge case: if a parent is filtered out, its child task should be filtered out as well.
One test case for that behavior was:
new Task(1, "Grandparent - should not appear because assigned", false, "2026-06-01", -1, "user123", false, 1000),
new Task(2, "Parent - should not appear because grandparent is filtered", false, "2026-06-02", 1, "", false, 2000),
new Task(3, "Grandchild - should not appear because grandparent is filtered", false, "2026-06-03", 2, "", true, 3000),
new Task(4, "Unrelated task - should appear", false, "2026-06-10", -1, "", false, 4000)
The fourth task was unrelated and should remain in the result, while the parent and grandchild should not appear because the grandparent was filtered.
Discussion
Loading comments…