Skip to content

Task 029: Replace socket mixin with Pinia store - #30

Merged
Igloczek merged 8 commits into
masterfrom
task/029-replace-socket-mixin-with-store
Jun 30, 2026
Merged

Igloczek merged 8 commits into
masterfrom
task/029-replace-socket-mixin-with-store

Conversation

@Igloczek

@Igloczek Igloczek commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements tasks/029-replace-socket-mixin-with-store.md from the ponytail audit backlog.

Goal

Remove global socket mixin; centralize app state in a store consumed by pages.

Scope

  • Add Pinia (if not present) and stores/app.ts (or split: stores/monitors.ts, stores/auth.ts).
  • Migrate state currently on mixin data / computed to the store.
  • Remove socket from mixins array in src/main.ts; update components using $root socket state to useAppStore() / composables.
  • Delete src/mixins/socket.ts when fully migrated.

Acceptance criteria

  • src/mixins/socket.ts deleted.
  • src/main.ts no longer registers socket mixin.
  • Monitor list, dashboard stats, and notifications work over WebSocket.
  • bun run lint passes.
  • bun run test-e2e passes.

Depends on

Task 028, Task 020 (favicon extracted).

Verification

bun run lint
bun run test-e2e
rg "mixins/socket|from \"@/mixins/socket\"" src

Audit reference

Finding #4 — socket mixin (phase 2).

@Igloczek

Copy link
Copy Markdown
Collaborator Author

/ponytail-review

  • Store owns all former mixin state, getters (stats, statusList, etc.), and socket actions
  • Global appStoreMixin exposes useAppStore() to Options API components without per-file setup boilerplate
  • Route/favicon/version watchers moved to initAppStoreWatchers() in store module
  • Public status page state (publicGroupList, baseURL, etc.) merged into app store

Closes task 029 (audit finding #4 phase 2).

56 files changed, 1369 insertions(+), 1449 deletions(-)

@Igloczek
Igloczek force-pushed the task/029-replace-socket-mixin-with-store branch from f4ec081 to cf673a8 Compare June 30, 2026 12:11
Igloczek added 7 commits June 30, 2026 14:30
Centralize WebSocket-driven app state in stores/app.ts with connection
logic extracted to composables/useSocket.ts. Remove the 897-line socket
mixin and public mixin; migrate pages and components to appStore via
useAppStore(). Add shared favicon-badge helper and Pinia dependency.
@Igloczek
Igloczek force-pushed the task/029-replace-socket-mixin-with-store branch from cf673a8 to f8c4360 Compare June 30, 2026 12:35
@Igloczek
Igloczek merged commit 6b8a749 into master Jun 30, 2026
@Igloczek
Igloczek deleted the task/029-replace-socket-mixin-with-store branch June 30, 2026 12:59
Igloczek added a commit that referenced this pull request Aug 8, 2026
…th-store

Task 029: Replace socket mixin with Pinia store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant