handle when task path is null#1304
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR fixes a crash in
Confidence Score: 5/5Safe to merge — the null-path fallback is correct and the only logic change is well-scoped to getTraversalPath. The fix is narrow: it handles a previously-unguarded null No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[getTraversalPath called with id] --> B[Raw SQL: SELECT path, parentId FROM Tasks WHERE id]
B --> C{task found?}
C -- No --> D[throw 404 NOT_FOUND]
C -- Yes --> E[getIdsFromLtreePath task.path OR '']
E --> F{parentIdsFromLtree.length > 0?}
F -- Yes --> G[parentIds = ltree-derived IDs]
F -- No --> H["parentIds = [task.parentId, id].flatMap(compact)"]
G --> I[db.task.findMany where id in parentIds]
H --> I
I --> J[Build parentTasksById Map]
J --> K[Map parentIds to tasks, throw 404 if any missing]
K --> L[subtaskService.getAccessiblePathTasks]
L --> M[Return AncestorTaskResponse array]
Reviews (3): Last reviewed commit: "add parent id to select statement" | Re-trigger Greptile |
|
Deployment failed with the following error: Learn More: https://vercel.link/multiple-function-regions |
|
@greptileai review the pr again |
2026-06-11.16-54-35.mov