Repurpose `src/utils` into composables
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 149
Description
# Repurpose `src/utils` into composables
## Summary
Migrate the helpers in [frontend/src/utils/](packages/flowfuse/frontend/src/utils/) into [frontend/src/composables/](packages/flowfuse/frontend/src/composables/). Composables are the idiomatic Vue 3 way to share stateful and reactive logic; the loose `utils` grab-bag predates that pattern.
## Scope
- Audit `src/utils` and categorise each helper:
- **Stateful / reactive / lifecycle-bound** → convert to a `useX` composable.
- **Pure, stateless functions** → keep as plain utils (a composable adds nothing).
- Update all imports.
- Move/extend tests alongside the new composables.
## Acceptance criteria
- [ ] Reactive/stateful helpers live in `src/composables` as `useX`.
- [ ] Pure functions either retained as utils or co-located with clear rationale.
- [ ] All imports updated; build and tests pass.
Contributor guide
Research direction
Start by auditing packages/flowfuse/frontend/src/utils/ and comparing its helpers with packages/flowfuse/frontend/src/composables/. Classify each helper by whether it is reactive, stateful, lifecycle-bound, or pure, then trace and update imports and move or extend the related tests. Done means the composables and utils have clear boundaries and the build and test suites pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100