Skip to content

Add setup status overview screen - #41

Open
JanetByte wants to merge 2 commits into
finitoapp:mainfrom
JanetByte:feature/setup-status-overview
Open

Add setup status overview screen#41
JanetByte wants to merge 2 commits into
finitoapp:mainfrom
JanetByte:feature/setup-status-overview

Conversation

@JanetByte

Copy link
Copy Markdown
Contributor

Summary

  • add a localized Settings > Setup Status screen with checklist-style readiness states
  • compose live app/device state for recovery phrase, sync transport, payment accounts, default method, bank account, and Fio readiness
  • add Settings navigation and helper coverage for complete/incomplete checklist states

Fixes #32

Verification

  • bun run check:lint
  • bun run check:ts
  • bun run build
  • bun run check:tests src/features/settings/readiness/readiness-utils.test.ts

Known validation issue

  • bun run check:tests currently fails in this environment outside this change because Vitest runs on Node v22.22.3 where Promise.try and AsyncDisposableStack are unavailable; the new readiness test passes in isolation.

@JanetByte

Copy link
Copy Markdown
Contributor Author

Decision: changes requested

Summary of the change:

  • Adds a localized Settings > Setup Status checklist screen and links it from Settings.
  • Composes readiness from existing app/device state for recovery phrase, sync transport, payment accounts, default method, bank account, and Fio.
  • Adds helper tests for completed/incomplete readiness states.

Acceptance criteria check:

  • Reachable/practical screen: mostly satisfied - /settings/readiness is routed and linked from Settings.
  • Live read-only checklist state: mostly satisfied, but one readiness state is incorrect (see finding below).
  • Incomplete-item links: satisfied for the implemented items.
  • Translations: en/cs/sk keys are present and type-covered.
  • Helper tests: useful coverage was added, but missing the Fio no-token edge case.

Main review finding:

  • Blocking: Fio transaction sync can be shown as completed even when it cannot actually run. In src/routes/_terminal.settings.readiness.tsx, readiness only passes hasActiveFioPlugin: fioPlugin?.isActive === sqliteTrue; createReadinessItems then marks the item complete whenever a bank account exists and the plugin is active. However, the Fio settings screen allows deleting all tokens from an existing plugin, and the background sync query depends on plugin tokens. In that state the checklist says Fio is ready, but sync has no usable token. Please require an active plugin plus at least one non-deleted token (or no bank account) and add a test for active plugin with zero tokens being incomplete.

CI status summary:

  • GitHub Bun Check passed on the PR head. I did not repeat CI locally.

Risks not covered by CI:

  • Readiness semantics around real setup state, especially partially configured Fio state after token deletion.

Requested changes:

  • Include Fio token presence in the readiness state.
  • Mark Fio complete only when bank payments are inactive OR the Fio plugin is active and has at least one usable token.
  • Extend the helper tests for the active-plugin/no-token case.

I created follow-up Kanban task t_d0446db1 for gh-dev.

@JanetByte

Copy link
Copy Markdown
Contributor Author

Addressed the Fio readiness review feedback in commit 7402b1e.\n\nSummary:\n- Setup Status now checks non-deleted Fio tokens for the current plugin.\n- Fio readiness is complete only when bank payments are inactive, or when the Fio plugin is active and has at least one usable token.\n- Added helper coverage for active plugin without tokens and inactive bank payments.\n\nVerification:\n- bun test src/features/settings/readiness/readiness-utils.test.ts\n- bun run check:lint\n- bun run check:ts\n- bun run build\n- bun run check:tests (fails in unrelated runtime/polyfill-dependent tests: Promise.try and AsyncDisposableStack are unavailable in the current test runtime; readiness tests pass).

@JanetByte JanetByte left a comment

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.

Decision: approved

Summary of the change:

  • Follow-up commit 7402b1e makes the Setup Status Fio item require a usable token for the current Fio plugin when bank payments are active.
  • The readiness screen now queries non-deleted tokens for the selected Fio plugin and passes token presence into the pure readiness helper.
  • Helper tests cover active plugin without tokens and inactive bank payments.

Acceptance criteria check:

  • Original setup/status overview goal remains satisfied: the screen is reachable from Settings and presents a simple localized checklist with status icons, completed/not-completed state, and fix links for incomplete items.
  • Prior blocking feedback is satisfied: Fio readiness is complete only when bank payments are inactive, or when the current plugin is active and has at least one non-deleted token.
  • The token query is read-only and scoped to the current plugin id; the placeholder id path keeps hook usage unconditional when no plugin exists.
  • Tests were updated for the no-token and no-bank-payment edge cases.

Main review findings:

  • No blocking findings in the follow-up. The added token predicate matches the sync query’s usable-token semantics (token IS NOT NULL and isDeleted IS NULL) and the helper logic keeps non-bank setups from being blocked on Fio.

CI status summary:

  • GitHub Bun Check passed on head commit 7402b1e.
  • GitHub Deploy passed on head commit 7402b1e.
  • I did not repeat automated CI locally.

Risks not covered by CI:

  • Readiness remains a UX-level approximation of live setup state; future changes to Fio sync prerequisites should keep this checklist in sync with the background sync query.

Requested changes:

  • None.

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.

Add setup/status overview screen

1 participant