-
Notifications
You must be signed in to change notification settings - Fork 3
feat(widget): migrate data flows to Yield API #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
petar-omni
wants to merge
61
commits into
main
Choose a base branch
from
feat/yield-balances-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
efeafe7
feat: migrate to yield api balances
petar-omni 4ae72e9
fix: tests
petar-omni a412e92
fix: position size
petar-omni 3be73d9
fix: misc
petar-omni f02120e
feat: migrate
petar-omni 93df083
feat: campaign
petar-omni 6b49e39
feat: useMaxAmount
petar-omni 3476aa6
fix: format
petar-omni eb6656f
fix: misc
petar-omni bdfb8df
fix: actions filtering
petar-omni e96863e
fix: token fallback
petar-omni fecb25f
fix: remove nonce, type fallback
petar-omni 083f142
feat: init
petar-omni 3ca4c39
feat: move api calls to private-api, formatting
petar-omni d480ab3
fix: decode tx gas
petar-omni e5977ef
feat: filter activity actions by network
petar-omni c45e737
chore: dtos cleanup
petar-omni 48ccf6e
chore: refactor validators to use api schema
petar-omni fb91415
fix: hide personalized APY without campaign component
petar-omni c5fa67e
fix: ts error
petar-omni 201c25c
refactor(widget): simplify image fallback handling
petar-omni faa900a
refactor(widget): simplify base token handling across yield flows
petar-omni f5fc039
fix: solana autoconnect
petar-omni 373c0de
fix(widget): show APY composition fallback on position details
petar-omni 2fd2694
ci(widget): pin workflow actions and install pnpm via npm
petar-omni bf2f956
fix: package manager field
petar-omni 2511e53
chore: update mise.toml
petar-omni fda10e5
ci: disable reportCompressedSize
petar-omni 909a53b
feat: prepare LL transactions
petar-omni e8752eb
fix(ci): use mise for tools version management
petar-omni 729deab
fix: default votes
petar-omni 7b7db58
fix(widget): improve stake flow resilience
petar-omni c4c82b5
fix(widget): refine dashboard fallback states and rich errors
petar-omni 67928f0
test(widget): refactor MSW test harness and fixtures
petar-omni 96a2487
chore(workspace): modernize dependency management
petar-omni 7b9cfca
fix(cosmos): restore supported chain filtering
petar-omni fb4779e
chore: vite improvements
petar-omni 90c9a17
fix: reorder Solana provider before wagmi config
petar-omni cac5def
chore(widget): sync yield API OpenAPI types
petar-omni 2425fe5
refactor(widget): remove Vite worker_threads stub and RR warning plugin
petar-omni 91a2d60
feat(widget): add yield risk ratings to selection and earn details
petar-omni 9498eb1
chore(ci): add amplify build config
petar-omni e6cb134
refactor: migrate release flow to release-please
petar-omni ec2cbcd
ci: use release-please action for releases
petar-omni e9de4b7
refactor: remove @stakekit/common dependency
petar-omni fbf60cf
chore: update project configuration checks
petar-omni c3bfcdd
fix: gate validator loading on required yields
petar-omni 56c7eb1
chore: update project configuration
petar-omni 6da6e7f
chore: remove changeset leftovers
petar-omni f840667
chore: remove unused Knip-reported files and exports
petar-omni d2a27df
fix: reduce widget package bundle size
petar-omni 0bea56e
refactor: remove widget dependency cycles
petar-omni 908c738
fix: externalize only react deps in package build
petar-omni 35e2f8e
chore: pin checkout action to v6
petar-omni 4a9c9fe
refactor: share openapi-fetch client across api providers
petar-omni 62ba960
fix: move enabled networks helper and add yield retries
petar-omni 10c97a1
Squashed 'repos/effect/' content from commit af7782d30
petar-omni 1b7dcb2
Merge commit '10c97a1b6d636ea36a62619aef31a6986305e635' as 'repos/eff…
petar-omni 911fc89
refactor(widget): migrate to generated Effect API clients
petar-omni db15567
chore: remove effect repo
petar-omni 0df1959
chore(widget): fix hygiene checks
petar-omni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "packages/widget": "0.0.270" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| { | ||
| "$schema": "https://github.com/jayu/rev-dep/blob/master/config-schema/1.7.schema.json?raw=true", | ||
| "configVersion": "1.7", | ||
| "rules": [ | ||
| { | ||
| "path": "packages/widget", | ||
| "prodEntryPoints": [ | ||
| "src/index.package.ts", | ||
| "src/index.bundle.ts", | ||
| "src/main.tsx", | ||
| "src/translation/i18next.d.ts", | ||
| "src/types/purify-extend.d.ts", | ||
| "src/types/window.d.ts", | ||
| "src/vite-env.d.ts", | ||
| "postcss.config.js", | ||
| "public/mockServiceWorker.js", | ||
| "vite/*.ts" | ||
| ], | ||
| "devEntryPoints": [ | ||
| "scripts/generate-effect-openapi.ts", | ||
| "tests/utils/setup.ts", | ||
| "tests/**/*.test.ts", | ||
| "tests/**/*.test.tsx" | ||
| ], | ||
| "orphanFilesDetection": { | ||
| "enabled": true | ||
| }, | ||
| "unusedExportsDetection": { | ||
| "enabled": true, | ||
| "ignoreFiles": ["src/types/yield-api-schema.d.ts"] | ||
| }, | ||
| "unusedNodeModulesDetection": { | ||
| "enabled": true, | ||
| "excludeModules": [ | ||
| "@effect/openapi-generator", | ||
| "@effect/platform-node", | ||
| "babel-plugin-react-compiler", | ||
| "playwright", | ||
| "postcss", | ||
| "swagger2openapi", | ||
| "tsx", | ||
| "yaml" | ||
| ], | ||
| "pkgJsonFieldsWithBinaries": ["scripts"] | ||
| }, | ||
| "missingNodeModulesDetection": { | ||
| "enabled": true | ||
| }, | ||
| "unresolvedImportsDetection": { | ||
| "enabled": true | ||
| }, | ||
| "circularImportsDetection": { | ||
| "enabled": true | ||
| } | ||
| // "devDepsUsageOnProdDetection": { | ||
| // "enabled": true | ||
| // } | ||
| } | ||
| ] | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # StakeKit Widget — Agent Guide | ||
|
|
||
| ## Project Overview | ||
| - Monorepo managed with `pnpm` workspaces + Turborepo. | ||
| - Main package is `@stakekit/widget` in `packages/widget` (React + TypeScript + Vite). | ||
| - Widget supports two entry modes: | ||
| - React component export (`src/index.package.ts`) | ||
| - Fully bundled renderer (`src/index.bundle.ts`) | ||
| - Runtime branches between classic widget and dashboard variant in `src/App.tsx`. | ||
|
|
||
| ## Repo Layout (important paths) | ||
| - `packages/widget/src/App.tsx` — root app, router setup, bundle renderer. | ||
| - `packages/widget/src/Widget.tsx` — non-dashboard route flow (earn/review/steps/details). | ||
| - `packages/widget/src/Dashboard.tsx` + `pages-dashboard/*` — dashboard variant UI. | ||
| - `packages/widget/src/providers/*` — global provider composition (API, query, wallet, tracking, theme, stores). | ||
| - `packages/widget/src/hooks/*` — feature and API hooks. | ||
| - `packages/widget/src/domain/*` — shared domain types/helpers. | ||
| - `packages/widget/src/translation/*` — i18n resources (`English`, `French`). | ||
| - `packages/widget/tests/*` — Vitest browser tests (MSW-backed). | ||
| - `packages/examples/*` — integration examples (`with-vite`, `with-vite-bundled`, `with-nextjs`, `with-cdn-script`). | ||
|
|
||
| ## Commands Agents Should Use | ||
|
|
||
| ### From repo root (all workspaces via Turbo) | ||
| - `pnpm build` — build all packages. | ||
| - `pnpm lint` — lint/type-check all packages. | ||
| - `pnpm test` — run all workspace tests. | ||
| - `pnpm format` — run formatting checks/tasks. | ||
| - `pnpm check-hygiene` - check unused deps, unresolved imports, circular deps, etc | ||
|
|
||
| ### Focused widget commands (recommended for most tasks) | ||
| - `pnpm --filter @stakekit/widget {command}` | ||
|
|
||
| ## Agent Working Guidelines (short) | ||
| - Keep public API compatibility in `src/index.package.ts` and `src/index.bundle.ts`. | ||
| - When changing user-facing copy, update both: | ||
| - `packages/widget/src/translation/English/translations.json` | ||
| - `packages/widget/src/translation/French/translations.json` | ||
| - After changes, confirm nothing is broken with lint command which checks lint/type errors | ||
|
|
||
| ## Useful Context for Debugging | ||
| - API client is configured in `packages/widget/src/providers/api/api-client-provider.tsx`. | ||
| - React Query defaults are in `packages/widget/src/providers/query-client/index.tsx`. | ||
| - App-level config/env mapping is in `packages/widget/src/config/index.ts`. | ||
| - Test bootstrapping + MSW worker setup: | ||
| - `packages/widget/tests/utils/setup.ts` | ||
| - `packages/widget/tests/mocks/worker.ts` | ||
|
|
||
| ## Vendored Repositories | ||
|
|
||
| This project vendors external repositories under @repos/ | ||
|
|
||
| - Use vendored repositories as read-only reference material when working with related libraries | ||
| - Prefer examples and patterns from the vendored source code over generated guesses or web search results | ||
| - Do not edit files under @repos/ unless explicitly asked | ||
| - Do not import from @repos/ - application code should continue importing from normal package dependencies | ||
| - Before writing any Effect code, inspect @repos/effect/LLMS.md | ||
| - Before writing code that interacts with Effect `HttpClient`, inspect `agent-patterns/effect-http-client.md` |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.