Skip to content
Open
Show file tree
Hide file tree
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 Mar 4, 2026
4ae72e9
fix: tests
petar-omni Mar 4, 2026
a412e92
fix: position size
petar-omni Mar 5, 2026
3be73d9
fix: misc
petar-omni Mar 5, 2026
f02120e
feat: migrate
petar-omni Mar 20, 2026
93df083
feat: campaign
petar-omni Mar 20, 2026
6b49e39
feat: useMaxAmount
petar-omni Mar 20, 2026
3476aa6
fix: format
petar-omni Mar 20, 2026
eb6656f
fix: misc
petar-omni Mar 23, 2026
bdfb8df
fix: actions filtering
petar-omni Mar 23, 2026
e96863e
fix: token fallback
petar-omni Mar 24, 2026
fecb25f
fix: remove nonce, type fallback
petar-omni Mar 24, 2026
083f142
feat: init
petar-omni Mar 24, 2026
3ca4c39
feat: move api calls to private-api, formatting
petar-omni Mar 24, 2026
d480ab3
fix: decode tx gas
petar-omni Mar 24, 2026
e5977ef
feat: filter activity actions by network
petar-omni Mar 24, 2026
c45e737
chore: dtos cleanup
petar-omni Mar 25, 2026
48ccf6e
chore: refactor validators to use api schema
petar-omni Mar 25, 2026
fb91415
fix: hide personalized APY without campaign component
petar-omni Mar 25, 2026
c5fa67e
fix: ts error
petar-omni Mar 25, 2026
201c25c
refactor(widget): simplify image fallback handling
petar-omni Mar 26, 2026
faa900a
refactor(widget): simplify base token handling across yield flows
petar-omni Mar 26, 2026
f5fc039
fix: solana autoconnect
petar-omni Mar 26, 2026
373c0de
fix(widget): show APY composition fallback on position details
petar-omni Apr 28, 2026
2fd2694
ci(widget): pin workflow actions and install pnpm via npm
petar-omni Apr 28, 2026
bf2f956
fix: package manager field
petar-omni Apr 28, 2026
2511e53
chore: update mise.toml
petar-omni Apr 28, 2026
fda10e5
ci: disable reportCompressedSize
petar-omni Apr 28, 2026
909a53b
feat: prepare LL transactions
petar-omni May 13, 2026
e8752eb
fix(ci): use mise for tools version management
petar-omni May 13, 2026
729deab
fix: default votes
petar-omni May 13, 2026
7b7db58
fix(widget): improve stake flow resilience
petar-omni May 14, 2026
c4c82b5
fix(widget): refine dashboard fallback states and rich errors
petar-omni May 14, 2026
67928f0
test(widget): refactor MSW test harness and fixtures
petar-omni May 14, 2026
96a2487
chore(workspace): modernize dependency management
petar-omni May 15, 2026
7b9cfca
fix(cosmos): restore supported chain filtering
petar-omni May 15, 2026
fb4779e
chore: vite improvements
petar-omni May 15, 2026
90c9a17
fix: reorder Solana provider before wagmi config
petar-omni May 15, 2026
cac5def
chore(widget): sync yield API OpenAPI types
petar-omni May 18, 2026
2425fe5
refactor(widget): remove Vite worker_threads stub and RR warning plugin
petar-omni May 18, 2026
91a2d60
feat(widget): add yield risk ratings to selection and earn details
petar-omni May 18, 2026
9498eb1
chore(ci): add amplify build config
petar-omni May 18, 2026
e6cb134
refactor: migrate release flow to release-please
petar-omni May 18, 2026
ec2cbcd
ci: use release-please action for releases
petar-omni May 19, 2026
e9de4b7
refactor: remove @stakekit/common dependency
petar-omni May 19, 2026
fbf60cf
chore: update project configuration checks
petar-omni May 19, 2026
c3bfcdd
fix: gate validator loading on required yields
petar-omni May 19, 2026
56c7eb1
chore: update project configuration
petar-omni May 19, 2026
6da6e7f
chore: remove changeset leftovers
petar-omni May 19, 2026
f840667
chore: remove unused Knip-reported files and exports
petar-omni May 19, 2026
d2a27df
fix: reduce widget package bundle size
petar-omni May 19, 2026
0bea56e
refactor: remove widget dependency cycles
petar-omni May 19, 2026
908c738
fix: externalize only react deps in package build
petar-omni May 19, 2026
35e2f8e
chore: pin checkout action to v6
petar-omni May 19, 2026
4a9c9fe
refactor: share openapi-fetch client across api providers
petar-omni May 19, 2026
62ba960
fix: move enabled networks helper and add yield retries
petar-omni May 20, 2026
10c97a1
Squashed 'repos/effect/' content from commit af7782d30
petar-omni May 20, 2026
1b7dcb2
Merge commit '10c97a1b6d636ea36a62619aef31a6986305e635' as 'repos/eff…
petar-omni May 20, 2026
911fc89
refactor(widget): migrate to generated Effect API clients
petar-omni May 20, 2026
db15567
chore: remove effect repo
petar-omni May 20, 2026
0df1959
chore(widget): fix hygiene checks
petar-omni May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
env:
NODE_OPTIONS: "--max_old_space_size=8192"

steps:
- uses: actions/checkout@v4
# actions/checkout@v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- uses: jdx/mise-action@v2
- name: Install mise
run: |
curl https://mise.run | MISE_VERSION=v2026.5.6 sh
Comment thread
petar-omni marked this conversation as resolved.
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH"
mise install

- run: pnpm install --frozen-lockfile

Expand All @@ -33,3 +38,5 @@ jobs:
- run: pnpm lint

- run: pnpm test

- run: pnpm check-hygiene
77 changes: 55 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,73 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write

environment: production
env:
NODE_OPTIONS: "--max_old_space_size=8192"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_DIR: packages/widget

steps:
- uses: actions/checkout@v4
# actions/checkout@v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0

- uses: jdx/mise-action@v2
- name: Install mise
run: |
curl https://mise.run | MISE_VERSION=v2026.5.6 sh
Comment thread
petar-omni marked this conversation as resolved.
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH"
mise install

# npm 11.5.1 or later is required for trusted publishing
- name: Update npm
run: npm install -g npm@latest
- name: Run release-please
id: release
# googleapis/release-please-action@v5.0.0
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: ${{ github.ref_name }}

- name: Fix executable files for changesets
- name: Check npm publish status
id: publish
shell: bash
run: |
chmod -x .husky/commit-msg
package_name=$(node -p "require('./${PACKAGE_DIR}/package.json').name")
version=$(node -p "require('./${PACKAGE_DIR}/package.json').version")
tag="${package_name}@${version}"

- run: pnpm install --frozen-lockfile
{
echo "package_name=${package_name}"
echo "version=${version}"
echo "tag=${tag}"
} >> "$GITHUB_OUTPUT"

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
version: pnpm run version
commit: "ci(changesets): version packages"
title: "ci(changesets): version packages"
commitMode: github-api
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use OIDC for npm authentication instead of NPM_TOKEN
NPM_TOKEN: "" # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "No GitHub release found for ${tag}; skipping npm publish."
echo "should_publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

if npm view "${package_name}@${version}" version >/dev/null 2>&1; then
echo "${package_name}@${version} is already published; skipping npm publish."
echo "should_publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "should_publish=true" >> "$GITHUB_OUTPUT"

- name: Publish to npm
if: steps.publish.outputs.should_publish == 'true'
run: |
tag="${{ steps.publish.outputs.tag }}"
git fetch --force origin "refs/tags/${tag}:refs/tags/${tag}"
git checkout --detach "$tag"
mise install
pnpm install --frozen-lockfile
pnpm exec turbo --filter=@stakekit/widget build
npm publish "$PACKAGE_DIR"
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ yarn-error.log*
# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
Expand Down Expand Up @@ -266,4 +263,6 @@ next-env.d.ts
*.p12
*.pfx
*.crt
*.cer
*.cer

.pnpm-store
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/widget": "0.0.270"
}
60 changes: 60 additions & 0 deletions .rev-dep.config.jsonc
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
// }
}
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,20 @@
"typescript.preferences.importModuleSpecifier": "relative",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit"
},

"typescript.preferences.autoImportFileExcludePatterns": ["repos/**"],
"javascript.preferences.autoImportFileExcludePatterns": ["repos/**"],

"files.exclude": {
"repos/**": true
},

"files.watcherExclude": {
"repos/**": true
},

"search.exclude": {
"repos/**": true
}
}
58 changes: 58 additions & 0 deletions AGENTS.md
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`
Loading
Loading