chore: gardener housekeeping 2026-03-23
AGENTS.md watermarks refreshed to HEAD (209e0c7). Key content updates:
- root AGENTS.md: added packages/analytics/ to directory map
- landing/AGENTS.md: documented @harb/analytics integration and Umami funnel tracking
- web-app/AGENTS.md: documented analytics events (wallet_connect, swap_initiated, stake_created)
- onchain/AGENTS.md: documented AttackRunner fixes (taxRate as index, vm.warp, same-broadcast recenter), 2000-trade floor-ratchet evidence
Pending actions (6): promote #1083 and #1086 to backlog, unblock #1099.
This commit is contained in:
parent
209e0c798e
commit
2ef2e48f8a
10 changed files with 57 additions and 53 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<!-- last-reviewed: b276392e7a1d4eda36ec20a90ef22de471da2344 -->
|
||||
<!-- last-reviewed: 209e0c798ea85204c5fe466ba7b54b874095e08f -->
|
||||
# Web App - Agent Guide
|
||||
|
||||
Vue 3 + TypeScript staking interface for KRAIKEN, enabling users to stake tokens, manage positions, and interact with Harberger-tax mechanics.
|
||||
|
|
@ -46,6 +46,18 @@ Vue 3 + TypeScript staking interface for KRAIKEN, enabling users to stake tokens
|
|||
- Relies on semantic HTML and ARIA attributes for selectors
|
||||
- StakeHolder test hooks: `page.getByRole('slider', { name: 'Token Amount' })`, `page.getByLabel('Tax')`
|
||||
|
||||
## Analytics
|
||||
|
||||
The web app uses `@harb/analytics` (self-hosted Umami wrapper) for funnel event tracking. `initAnalytics(VITE_UMAMI_URL, VITE_UMAMI_WEBSITE_ID)` is called in `main.ts`. Tracked events:
|
||||
|
||||
| Event | Where | Helper |
|
||||
|-------|-------|--------|
|
||||
| `wallet_connect` | `useWallet.ts` — on first address set | `trackWalletConnect()` |
|
||||
| `swap_initiated` | `useSwapKrk.ts` — before buy/sell tx | `trackSwapInitiated('buy'\|'sell')` |
|
||||
| `stake_created` | `useStake.ts` — after PositionCreated event | `trackStakeCreated()` |
|
||||
|
||||
All calls are silent no-ops if Umami is unavailable. Env vars: `VITE_UMAMI_URL`, `VITE_UMAMI_WEBSITE_ID`.
|
||||
|
||||
## Quality Guidelines
|
||||
- Composables accept `chainId` parameter instead of importing wallet state directly
|
||||
- Each composable maintains its own `watchChainId()` listener for independence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue