# Add react-query, refactor BranchToolbar async state, and fix stale deps · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/807e3d18dec858c9694a595deaea4f9ac588db5f)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 807e3d18dec858c9694a595deaea4f9ac588db5f

Requested commit: 807e3d18dec858c9694a595deaea4f9ac588db5f

Commit: 807e3d18dec858c9694a595deaea4f9ac588db5f

Tree: c926654e81418cae6b15529bbce4d882ce031d01

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Add react-query, refactor BranchToolbar async state, and fix stale deps

- Add @tanstack/react-query and wire up QueryClientProvider in App.tsx
- Refactor BranchToolbar to use useQuery for branch listing and
  useMutation for checkout, create branch, and git init, replacing
  manual useState/useCallback/useEffect async patterns
- Fix branch sync effect and ChatView envMode effect to use stable
  primitive deps instead of full object references, preventing
  unnecessary re-runs on unrelated store dispatches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

```

## Parents

- [198cc58377fd87ff39b8a37464dd8cb1a77beb0b](https://git.cafe/pingdotgg/t3code/commit/198cc58377fd87ff39b8a37464dd8cb1a77beb0b?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/807e3d18dec858c9694a595deaea4f9ac588db5f?format=markdown)
