Skip to content

Migrate to the new Aidbox client - #7

Merged
andreyorst merged 40 commits into
masterfrom
aidbox-client
Jan 5, 2026
Merged

Migrate to the new Aidbox client#7
andreyorst merged 40 commits into
masterfrom
aidbox-client

Conversation

@andreyorst

@andreyorst andreyorst commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

This PR migrates internal communication logic into a separate library and updates all existing usages to it.


Note

Migrates data access to @health-samurai/aidbox-client and introduces a shared AidboxClientProvider with typed FHIR models.

  • Replaces custom fetch wrappers in src/api/auth.ts and related modules with client methods (userinfo, logout, read, create, update, delete, searchType, rawRequest, historyInstance)
  • Adds centralized error handling in src/api/utils.tsx with OperationOutcome parsing and toasts; updates mutations to use onMutationError
  • Refactors ResourceBrowser, ResourceEditor (incl. history/diff), ViewDefinition (editor, run/materialize/SQL/schema), and REST collections to use the new client and strong types
  • Adds scripts/generate-types.ts using @atomic-ehr/codegen to generate FHIR R5 types under src/fhir-types; wires a generate-types npm script
  • Updates dependencies (adds @health-samurai/aidbox-client, @atomic-ehr/codegen, etc.), bumps pnpm, and minor tooling config updates (biome.json, .gitignore)

Written by Cursor Bugbot for commit 61f731e. This will update automatically on new commits. Configure here.

@andreyorst
andreyorst marked this pull request as draft November 13, 2025 11:14
andreyorst and others added 6 commits November 14, 2025 15:13
Co-authored-by: Aleksandr Penskoi <alexandr.penskoi@health-samurai.io>
Co-authored-by: Aleksandr Penskoi <alexandr.penskoi@health-samurai.io>
Co-authored-by: Aleksandr Penskoi <alexandr.penskoi@health-samurai.io>
Co-authored-by: Aleksandr Penskoi <alexandr.penskoi@health-samurai.io>
Co-authored-by: Aleksandr Penskoi <alexandr.penskoi@health-samurai.io>
@andreyorst
andreyorst marked this pull request as ready for review December 5, 2025 14:41
@cursor

cursor Bot commented Dec 5, 2025

Copy link
Copy Markdown

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 26.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread src/api/auth.ts Outdated
Comment thread src/components/ResourceBrowser/page.tsx Outdated
Comment thread src/components/ResourceEditor/api.ts Outdated
@andreyorst

Copy link
Copy Markdown
Collaborator Author

changed most of client.request calls to the respective fhir method

@andreyorst
andreyorst requested a review from Aitem December 9, 2025 16:10

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread src/components/ResourceBrowser/page.tsx Outdated
Comment thread src/components/ResourceEditor/versions-tab.tsx
Comment thread src/components/ViewDefinition/resource-type-select.tsx Outdated
Comment thread src/components/ResourceBrowser/page.tsx
Comment thread src/components/ResourceEditor/api.ts
Comment thread src/components/ViewDefinition/editor-panel-content.tsx
Comment thread src/components/rest/collections.tsx
Comment thread src/components/ResourceEditor/versions-tab.tsx Outdated

@Aitem Aitem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@andreyorst
andreyorst merged commit 2db9e90 into master Jan 5, 2026
1 check passed
@andreyorst
andreyorst deleted the aidbox-client branch January 5, 2026 13:57
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.

3 participants