Repository navigation
fix: generated AffitorTracker uses loadAffitor - #34
Merged
Merged
Conversation
@affitor/sdk (2.1.0 and 2.1.1) exports loadAffitor, not init. The component that affitor init and onboard write into a brand's app imported init, so it failed type-checking (TS2305) in the brand's own build. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
<AffitorTracker />component thataffitor init/affitor onboardwrite into a brand's app now callsloadAffitor(programId)instead ofinit({ programId }).Why
@affitor/sdkexportsloadAffitorand_resetAffitorfrom its root (2.1.0 published 14/06 and 2.1.1 published 12/10;/pure,/react,/serveradd noinit). The generated file importedinit, so it broke type-checking in the brand's own repo. Publishedaffitor@0.4.1and0.4.2both generate it.Compiled the generated component (
trackerComponentSource(123, true)) against the published@affitor/sdk@2.1.1withtsc --strict --jsx react-jsx --moduleResolution bundler:error TS2305: Module '"@affitor/sdk"' has no exported member 'init'.(exit 2)Test
tests/wizard.test.tsnow pinsimport { loadAffitor } from '@affitor/sdk';,loadAffitor(123)/loadAffitor("prog_abc"), and noinit(/import { init }.npm test: recipes 19/19, cli 113/113, mcp 20/20.npm run buildpasses.Not in this PR
onboardstill calls the wizard withprogramId: ""(src/commands/onboard.ts:103), so its generated tracker gets an empty id. Needs the program id from the API before the wizard runs; separate PR. Brands get the fix only after the next npm publish.QA finding QA-17:
.internal/qa/2026-10-12/FINDINGS.md🤖 Generated with Claude Code