Skip to content

Integrate focused Pinia auth and chat stores#53

Open
mjkatgithub wants to merge 4 commits into
developfrom
feature/pinia-auth-chat-stores
Open

Integrate focused Pinia auth and chat stores#53
mjkatgithub wants to merge 4 commits into
developfrom
feature/pinia-auth-chat-stores

Conversation

@mjkatgithub

Copy link
Copy Markdown
Owner

Summary

  • Introduce focused Pinia stores for auth/session lifecycle and chat runtime state.
  • Refactor affected pages, middleware, and Matrix composables to consume centralized store state.
  • Add and update unit tests for stores and chat/auth flows impacted by the migration.

Related Issue

Closes #43

Branch Flow

  • Source branch: feature/pinia-auth-chat-stores
  • Target branch: develop

Scope of Changes

  • Code changes are limited to the issue scope
  • No unrelated refactors are included

Validation

Local checks

  • Unit tests pass
  • Integration tests pass (if relevant)
  • E2E smoke passes (if relevant)

Manual test

  • Happy path verified
  • Edge cases verified

Risk and Rollback

  • Risk level: [ ] Low [x] Medium [ ] High
  • Rollback plan:
    • Revert this PR
    • Disable affected feature path if needed

Checklist

  • Issue is linked and updated
  • Acceptance criteria are met
  • Test checklist in the issue is completed
  • No secrets or credentials are included

…eatures

- Add Pinia stores for managing chat state and emoji usage, enhancing the chat experience with improved state handling.
- Refactor components to utilize the new Pinia stores, including `useChatStore` and `useEmojiUsageStore`, for better state management and reactivity.
- Update middleware and pages to leverage the new `useAuthSessionStore` for authentication state, replacing previous direct calls to `useMatrixClient`.
- Implement unit tests for the new stores and ensure existing tests are updated to reflect the changes in state management.
- Document the integration of Pinia in the project for future reference and development.
@mjkatgithub mjkatgithub linked an issue Mar 1, 2026 that may be closed by this pull request
9 tasks
@github-project-automation github-project-automation Bot moved this to Backlog in Decentra Mar 1, 2026
- Introduce a loading overlay during app startup that displays while session restoration is in progress.
- Refactor the `onMounted` lifecycle hook in `app.vue` to manage the booting state and ensure session restoration is completed before proceeding.
- Update the login page to prevent navigation to the chat until session restoration is finished.
- Add unit tests for the loading overlay and session restoration behavior in both the app and login components.
- Integrate new matrix authentication service functions for session management and device handling.
- Update presence handling in chat and settings components to utilize local storage for user preferences.
- Simplify the `useMatrixClient` by removing unnecessary Pinia setup.
- Improve the `auth.global.ts` middleware to directly access the `isLoggedIn` state.
- Enhance E2E tests for chat reactions and presence indicators, including retry logic for reaction interactions.
- Introduce utility functions for managing presence states and improve the overall user experience in chat.
- Update package.json to refine E2E test commands and improve runtime scripts for Synapse integration.
@mjkatgithub mjkatgithub added this to the Phase 3 milestone May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Feature: Introduce focused Pinia stores

1 participant