Conversation
|
@prath47 is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
|
@arnestrickmann please check this out |
Greptile SummaryThis PR fixes a bug (#1447) where the task dropdown in the titlebar always appeared empty. The root cause was that Changes:
The fix is minimal, well-scoped, and correctly leverages the existing React Query data layer. Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| src/renderer/components/titlebar/TitlebarContext.tsx | Removed the stale selectedProject?.tasks ?? [] local derivation and replaced it with an explicit tasks: Task[] prop, correctly sourcing task data from the caller rather than the project object. |
| src/renderer/components/titlebar/Titlebar.tsx | Extracts tasksByProjectId from useTaskManagementContext() and forwards the correct per-project task list to TitlebarContext, resolving the empty task dropdown bug. |
Sequence Diagram
sequenceDiagram
participant TM as useTaskManagementContext
participant TB as Titlebar
participant TBC as TitlebarContext
note over TM: tasksByProjectId built<br/>from React Query cache
TB->>TM: destructure { activeTask, handleSelectTask, tasksByProjectId }
TB->>TB: compute tasks = tasksByProjectId[selectedProject.id] ?? []
TB->>TBC: pass tasks, selectedProject, activeTask, onSelectProject, onSelectTask
TBC->>TBC: render project + task dropdowns using tasks[]
note over TBC: Before fix: const tasks = selectedProject?.tasks ?? []<br/>(always [] — not stored on project object)
note over TBC: After fix: tasks prop sourced from React Query via Titlebar
Last reviewed commit: 28159b6
|
Thanks, Prath! @prath47 |
Summary
The bug was in TitlebarContext.tsx — it was reading task list from selectedProject.tasks which is always [] in this architecture (tasks are stored separately in React Query, not embedded in the project object)
Fixes
Fixes #1447
Snapshot
Type of change
Mandatory Tasks
Checklist
pnpm run format)pnpm run lint)