Skip to content

[6829] Pinia Task 12 - account-auth #6945

Merged
n-lark merged 8 commits intomainfrom
6829-pinia-task-12-account-auth
Mar 31, 2026
Merged

[6829] Pinia Task 12 - account-auth #6945
n-lark merged 8 commits intomainfrom
6829-pinia-task-12-account-auth

Conversation

@n-lark
Copy link
Copy Markdown
Contributor

@n-lark n-lark commented Mar 23, 2026

Description

See details & test plan

Todos

  • Test plan

Related Issue(s)

Resolves #6829

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@n-lark n-lark self-assigned this Mar 23, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.29%. Comparing base (07d9e5e) to head (15378f1).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6945   +/-   ##
=======================================
  Coverage   76.29%   76.29%           
=======================================
  Files         403      403           
  Lines       20296    20296           
  Branches     4881     4881           
=======================================
  Hits        15485    15485           
  Misses       4811     4811           
Flag Coverage Δ
backend 76.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@n-lark n-lark marked this pull request as ready for review March 24, 2026 16:00
@n-lark n-lark requested a review from cstns March 24, 2026 16:00
@n-lark n-lark linked an issue Mar 24, 2026 that may be closed by this pull request
Base automatically changed from 6824-pinia-task-7-product-brokers to main March 30, 2026 09:01
Copy link
Copy Markdown
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome first step in migrating the account store to Pinia!

I’ve raised a few points that will better position us for upcoming changes and create a more resilient organization

Comment thread frontend/src/stores/account-auth.js Outdated
export const useAccountAuthStore = defineStore('account-auth', {
state: () => ({
user: null,
pending: true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pending key currently toggles the application's main loading overlay, so I don't think it belongs in the account store.

Since we’re already slicing the account store, this is the perfect time to extract this into a dedicated store. Given it’s purely UI/UX logic, it should be namespaced accordingly. I’m leaning toward ux-loading, but I'm open to other names.

The current key names also don’t quite reflect their purpose. In preparation for upcoming page and component-level loaders, I suggest a more scalable structure within a new ux-loading store:
- global (renamed from pending)
- network (renamed from offline)
- page (upcoming)
- components (upcoming)

These aren’t set in stone, but grouping them this way or similar fashion feels more intuitive for the long term.

TL;DR: Let's extract the pending state and ancillary loading functionality into a distinct store under the ux namespace and fight me on the naming

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separated out into new ux-loading store with the following name changes:

  • pending -> appLoader
  • offline -> offline - kept this as is since network is confusing when set to true, implies we are online.

Comment thread frontend/src/stores/account-auth.js Outdated
Comment thread frontend/src/stores/account-auth.js Outdated
@n-lark n-lark requested a review from cstns March 30, 2026 15:32
Comment thread frontend/src/store/modules/account/index.js
Copy link
Copy Markdown
Contributor

@cstns cstns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and everything looks good except the comment above which I'd like to talk about when you get in

Nice job!

@cstns
Copy link
Copy Markdown
Contributor

cstns commented Mar 31, 2026

ok, that's what was unclear to me. GTG then!

@cstns cstns self-requested a review March 31, 2026 13:17
@n-lark n-lark merged commit 849757a into main Mar 31, 2026
30 checks passed
@n-lark n-lark deleted the 6829-pinia-task-12-account-auth branch March 31, 2026 13:18
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.

Pinia Task 12 - account-auth

2 participants