Skip to content

Task 030: Replace global mixins with composables - #29

Merged
Igloczek merged 5 commits into
masterfrom
task/030-replace-global-mixins
Jun 30, 2026
Merged

Igloczek merged 5 commits into
masterfrom
task/030-replace-global-mixins

Conversation

@Igloczek

@Igloczek Igloczek commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements tasks/030-replace-global-mixins.md from the ponytail audit backlog.

Goal

Remove the five smaller global mixins applied in main.ts (~380 LOC combined).

Scope

  • Replace theme, datetime, mobile, lang, public mixins with composables: useTheme, useDatetime, useMobile, useLang, usePublicApi.
  • Update components that use $root.date(), $root.datetime(), theme helpers, etc.
  • Delete mixin files when unused.
  • Datetime.vue should call composable instead of $root.

Acceptance criteria

  • src/main.ts mixins array is empty or removed entirely.
  • src/mixins/ contains zero files OR only re-exports during migration (end state: deleted).
  • Theme toggle, locale switch, and datetime formatting work in settings and monitor views.
  • bun run lint passes.
  • bun run test-e2e passes.

Depends on

Task 029 (socket mixin gone first).

Verification

bun run lint
bun run test-e2e
ls src/mixins/ 2>/dev/null; rg "mixins/" src/main.ts

Audit reference

Finding #11 — six global mixins.

@Igloczek

Copy link
Copy Markdown
Collaborator Author

/ponytail-review

Five of six global mixins replaced with singleton composables. Socket mixin removed in task 029.

Lean already. Ship.

36 files changed, 692 insertions(+), 487 deletions(-)

@Igloczek
Igloczek force-pushed the task/030-replace-global-mixins branch from e5b9a93 to 9ae4c21 Compare June 30, 2026 12:11
Igloczek added 5 commits June 30, 2026 14:36
Extract theme, datetime, mobile, lang, and public API state into
singleton composables initialized from main.ts. Update components to
consume useTheme, useDatetime, useMobile, useLang, and usePublicApi
instead of $root mixin APIs. Delete the five mixin files; socket mixin
remains until task 029.
@Igloczek
Igloczek force-pushed the task/030-replace-global-mixins branch from 9ae4c21 to 619b928 Compare June 30, 2026 12:37
@Igloczek
Igloczek merged commit bc84e12 into master Jun 30, 2026
@Igloczek
Igloczek deleted the task/030-replace-global-mixins branch June 30, 2026 12:59
Igloczek added a commit that referenced this pull request Aug 8, 2026
Task 030: Replace global mixins with composables
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