Skip to content

Add simplified per-API status tracking with inline dual-API status UI - #90

Merged
SThor merged 6 commits into
mainfrom
feature/simplified-api-status-tracking
Jul 17, 2026
Merged

SThor merged 6 commits into
mainfrom
feature/simplified-api-status-tracking

Conversation

@SThor

@SThor SThor commented Jul 17, 2026

Copy link
Copy Markdown
Owner

This updates the API sync flow to track YNAB and SettleUp independently with a simpler status model and an inline summary UI.

Included:

  • lightweight per-API status tracking with independent retries
  • inline ApiSyncStatus component with API-specific colors and spinner/check/error states
  • local static preview page for quick visual checks

Notes:

  • the last commit on the feature branch has been amended to include the preview page and color update
  • generated version and unrelated planning files are left out of the PR

Replace XState state machine with a lightweight useApiSync hook that tracks
YNAB and SettleUp status independently with 6 states each:
idle → fetching → fetch_error / ready → entering → success / enter_error

- src/hooks/useApiSync.js: custom hook with parallel concurrent execution,
  independent per-API retry (retryFetch / retryEnter), and all API logic
  extracted from ReviewPage
- src/components/ApiSyncStatus.jsx: compact inline status summary with
  API-specific brand colors (YNAB green / SettleUp blue), animated SVG
  spinner for in-flight states, and per-API retry actions
- src/ReviewPage.jsx: simplified to use the hook; calls onSubmitted only
  when all targeted APIs succeed
@SThor
SThor requested a review from Copilot July 17, 2026 22:04
@SThor
SThor force-pushed the feature/simplified-api-status-tracking branch from 0ec0472 to b76e48b Compare July 17, 2026 22:05
This updates the API sync flow to track YNAB and SettleUp independently with a simpler status model and an inline summary UI.

Included:
- lightweight per-API status tracking with independent retries
- inline ApiSyncStatus component with API-specific colors and spinner/check/error states
- local static preview page for quick visual checks

Notes:
- the existing branch work has been amended into one commit
- generated version and unrelated planning files are left out of the PR
@SThor
SThor force-pushed the feature/simplified-api-status-tracking branch from b76e48b to 66de842 Compare July 17, 2026 22:06

Copilot AI left a comment

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.

Pull request overview

This PR refactors the Review page submission flow to track YNAB and SettleUp sync progress independently, exposing a compact inline status UI and adding a static preview page for quick visual validation.

Changes:

  • Extracted per-API sync orchestration into a new useApiSync hook with independent status + retry support.
  • Replaced the previous single “result” output with an inline dual-API ApiSyncStatus component (spinner/success/error states).
  • Added a local static preview entrypoint/page for iterating on the status UI.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
STATE_MACHINE_PLAN.md Adds a planning document (currently included in PR).
src/version.js Updates auto-generated version metadata.
src/ReviewPage.jsx Switches to hook-driven sync + renders inline status UI with retries.
src/hooks/useApiSync.js New hook implementing simplified per-API status model and orchestration.
src/components/ApiSyncStatus.jsx New inline status UI for YNAB/SettleUp with retry actions.
src/api-sync-status-preview.jsx New local preview entry for visual testing of status states.
api-sync-status-preview.html New HTML entrypoint to load the preview page in dev.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/ApiSyncStatus.jsx
Comment thread src/version.js
Comment thread src/components/ApiSyncStatus.jsx
Comment thread src/hooks/useApiSync.js

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/version.js:9

  • PR description says the generated version file is left out, but this PR includes changes to the auto-generated src/version.js (tag/branch/commit/buildTime). Either update the PR description or drop this file from the PR if it wasn’t meant to be included.
  "tag": "1.2.0",
  "branch": "feature/simplified-api-status-tracking",
  "commit": "db79089",
  "isDirty": true,
  "buildTime": "2026-07-17T21:57:22.329Z",

Comment thread .husky/pre-commit
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@SThor
SThor merged commit 8cef66c into main Jul 17, 2026
3 checks passed
@SThor
SThor deleted the feature/simplified-api-status-tracking branch July 17, 2026 22:28
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.

2 participants