You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract counters API from global store into dedicated module (#2897)
This refactor moves the counters helpers out of
`frontend/app/store/global.ts` into a dedicated `counters.ts` module,
and updates existing call sites to import from the new location. The
goal is to keep `global.ts` focused on global store/state concerns while
preserving current counters behavior.
- **Module extraction**
- Added `frontend/app/store/counters.ts` containing:
- `counterInc(name, incAmt = 1)`
- `countersClear()`
- `countersPrint()`
- Moved logic unchanged from `global.ts`.
- **Global store cleanup**
- Removed counters state/functions from `frontend/app/store/global.ts`.
- Removed counters exports from `global.ts`’s export surface.
- **Call site updates**
- Updated imports to use `@/store/counters` in:
- `frontend/app/block/block.tsx` (`counterInc`)
- `frontend/wave.ts` (`countersClear`, `countersPrint`)
```ts
// before
import { counterInc } from "@/store/global";
// after
import { counterInc } from "@/store/counters";
```
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
0 commit comments