Skip to content

feat(fio): check fio credentials on save and show the fio connection status - #542

Merged
jplacht merged 1 commit into
mainfrom
feat/fio-credential-check
Oct 1, 2026
Merged

jplacht merged 1 commit into
mainfrom
feat/fio-credential-check

Conversation

@jplacht

@jplacht jplacht commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Wrong FIO keys and usernames used to be accepted silently, and the nav only said "FIO Inactive" with no reason. The profile form now shows why saving FIO credentials failed, and the nav and profile show the current FIO state from the backend's new fio_status.

Changes

  • UserProfileSchema: fio_status (enum) and fio_last_refreshed_at; userStore.fioStatus.
  • Profile form: backend error codes shown under their field, "Connected. Your data will appear in a few minutes." on success, FIO status line with the last update; new event account:fio_link_failed { reason }.
  • Nav FIO tag per status: Active, Syncing, Waiting for Data, Key Rejected (error colour), Inactive; all but Active link to /profile.
  • userStore re-fetches the profile every 15 s while the status is syncing (max 5 min), so Syncing turns Active without a reload.
  • The nav loads FIO storage only while the status is ok or error, which removes the /data/storage/ 404 console errors for users without data.

How it was verified

QA PASS after three rounds: code review against the 11 acceptance criteria and a full e2e walk with a real FIO account (wrong key, mismatch, missing field, valid pair Syncing → Active in ~25 s without reload, rejected key, no data, collapsed nav). pnpm test && pnpm tsc && pnpm lint && pnpm knip pass, plus the component tests. UI audit: all pages at 5 viewports, no regressions versus baseline.

Screenshots

Profile with FIO connected: status line and the FIO Active nav tag (desktop, 1440)
Profile with FIO connected and the FIO Active tag
Same, mobile (375)
Profile with FIO connected on mobile

The inline errors, Syncing and Key Rejected states were checked in the running app; their screenshots are left out because they showed a real FIO key.

Deploy order

Deploy backend first; it is backward compatible. Paired backend PR: PRUNplanner/backend#68

🤖 Generated with Claude Code

…status

- Profile form shows the backend's FIO error codes under their field and
  "Connected" on success; account:fio_link_failed { reason }
- FIO status line on the profile and nav tag per fio_status (Active,
  Syncing, Waiting for Data, Key Rejected, Inactive), non-active link to /profile
- userStore polls the profile every 15 s while syncing (max 5 min)
- Nav loads FIO storage only when the status is ok or error, which removes
  the /data/storage/ 404 console errors

Spec: specs/2026-10-01-fio-credential-check.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prunplanner-preview ready!

Name Link
🔨 Latest commit e1cec69
🔍 Latest deploy log https://app.netlify.com/projects/prunplanner-preview/deploys/6abe5e19a379c1000a89a6b1
😎 Deploy Preview https://deploy-preview-542--prunplanner-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codacy-production

codacy-production Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 32 complexity · 0 duplication

Metric Results
Complexity 32
Duplication 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.07% coverage variation

Metric Results
Coverage variation ✅ +0.07% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d2b2277) 3529 3438 97.42%
Head commit (e1cec69) 3544 (+15) 3455 (+17) 97.49% (+0.07%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#542) 15 15 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jplacht
jplacht merged commit 2943c2a into main Oct 1, 2026
11 checks passed
@jplacht
jplacht deleted the feat/fio-credential-check branch October 1, 2026 13:31
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