Commit graph

102 commits

Author SHA1 Message Date
Agent
cc02ca0894 chore: gardener housekeeping 2026-04-06
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:01:58 +00:00
Agent
5155c2ad17 chore: gardener housekeeping 2026-04-06
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 09:09:16 +00:00
Agent
b8e5885849 chore: gardener housekeeping 2026-04-06
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 06:01:19 +00:00
Agent
ebe4b09229 chore: gardener housekeeping 2026-04-06 2026-04-06 00:01:26 +00:00
baa501fa46 Merge pull request 'fix: match Position History background to Active Positions (#9)' (#10) from fix/issue-8 into master 2026-04-05 18:14:02 +00:00
johba
c6e8f06a7f fix: match Position History background to Active Positions (#9)
CollapseHistory was missing the dark background override that
CollapseActive has, causing white background on the dark theme.
2026-04-05 18:11:11 +00:00
Agent
47a02cab92 chore: gardener housekeeping 2026-04-05
AGENTS.md watermarks refreshed to HEAD (62ba6f2).

Content updates:
- root AGENTS.md: added Docker/LXD notes (apparmor=unconfined, umami port 3001),
  viem v2 slot0 array pattern to Key Patterns
- services/ponder/AGENTS.md: documented LM_ADDRESS, POOL_ADDRESS, and
  MINIMUM_BLOCKS_FOR_RINGBUFFER env vars; added zero-stats troubleshooting note
- web-app/AGENTS.md: added viem v2 slot0 array compat section

Grooming: no open issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 18:04:27 +00:00
Agent
f1e4c3772e fix: fix: "Unable to determine current pool tick" on /app/cheats page (#2)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 16:50:46 +00:00
johba
bff29e75a1 chore: gardener housekeeping 2026-03-27
AGENTS.md watermarks refreshed to HEAD (79a93d4).

Grooming: closed 2 prediction/actioned issues.
- #1179: /stakestake fix verified working in post-fix user-test (2026-03-27)
- #1177: fresh red-team session 2026-03-27 with 7 real attacks (floor_held)
Remaining open: #1166, #1141 (prediction/backlog, planner watching),
#857, #856, #383 (vision).
No blocked issues, no open PRs, no stale PRs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 18:04:08 +00:00
johba
ca7162fedb chore: gardener housekeeping 2026-03-27
AGENTS.md watermarks refreshed to HEAD (7d72f40).
landing/AGENTS.md: document new pitch-deck.html (influencer outreach).

Grooming: CLEAN — 5 open issues (2 prediction/backlog, 3 vision), no
backlog issues, no blocked issues, no open PRs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 06:03:33 +00:00
johba
cbc3c3fd8e chore: gardener housekeeping 2026-03-26
AGENTS.md watermarks refreshed to HEAD (4dedc72). Watermark bump only —
no code changes since last gardener run.

Pending actions (3): re-queue promotion of #1155 pitch-deck to backlog
(pending actions from PR #1162 were not executed by orchestrator).

Escalate: #1158 (Phase 1 completion accuracy) — still needs planner/human decision.
2026-03-26 06:02:19 +00:00
johba
fce4b8b068 chore: gardener housekeeping 2026-03-25
AGENTS.md watermarks refreshed to HEAD (358f719). Content updates:
- scripts/harb-evaluator/AGENTS.md: documented wallet.ts auto-reconnect
  fix (wagmi EIP-6963 auto-connect handling, 10s disconnect timeout)
- All other AGENTS.md files: watermark bump only

Pending actions (3): promote #1155 pitch-deck to backlog.

Escalate: #1158 (Phase 1 completion accuracy) — needs planner/human decision.
2026-03-25 18:05:32 +00:00
johba
2ef2e48f8a 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.
2026-03-23 18:07:12 +00:00
johba
ca2bc03567 fix: feat: basic analytics funnel tracking for launch readiness (#1101)
Add self-hosted Umami analytics to replace the third-party cloud.umami.is
tracker. Creates @harb/analytics package with typed event helpers and
instruments the conversion funnel: CTA clicks (landing), wallet connect,
swap initiated, and stake created (web-app).

- Add Umami Docker service sharing existing postgres (separate DB)
- Add Caddy /analytics route to proxy Umami dashboard
- Configure via VITE_UMAMI_URL and VITE_UMAMI_WEBSITE_ID env vars
- Document setup and funnel events in docs/ENVIRONMENT.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:04:24 +00:00
johba
67de651242 chore: gardener housekeeping 2026-03-23
- Update all AGENTS.md watermarks to HEAD (b276392)
- Clean up dust.jsonl: remove already-bundled items (601,627,739,741)
- Pending actions: promote #1099/#1100/#1101 to backlog, close stale
  prediction issues #1020/#1103/#1107, comment on partial resolution
  of #1022 (holdout resolved, user-test still empty)
2026-03-23 07:15:23 +00:00
johba
b276392e7a chore: gardener housekeeping 2026-03-23
- Update all AGENTS.md watermarks to HEAD (224edcc)
- onchain/AGENTS.md: document VWAPTracker _hasRecenterTick guard (#609),
  overflow guard for slots 0-7 (#997), Floor Ratchet defeated (#1067),
  fee-income delta_bps audit trail (#1084)
- landing/AGENTS.md: document SecurityInfo.vue component (#147)

Issues actioned via API:
- Unblocked #1099, #1100, #1101 (all prereqs 1031/997/1067/1054 closed)
- Created #1134 bundled backlog: onchain source quality cleanup (4 dust items)
- Closed dust #601, #627, #739, #741 → bundled into #1134
2026-03-23 07:04:19 +00:00
johba
83a1b576e4 chore: gardener housekeeping 2026-03-22
- Update all AGENTS.md watermarks to HEAD (5f01d55)
- Add feeDestinationLocked and recenterAccess removal to onchain/AGENTS.md guardrails
- Add gardener/dust.jsonl accumulator (6 dust items: onchain comments, evidence schema docs)

Issues actioned via API:
- Closed #1085 as duplicate of #1082
- Promoted #1079, #1082, #1084 to backlog with acceptance criteria
- Unblocked #607, #609, #610, #611, #614, #615 (dev-crash blockers, no technical blockers)
- Added dependency-resolved comment to #1054 (dep #970 now closed)
2026-03-22 08:47:11 +01:00
openhands
cee79eedb3 fix: web-app config.ts fails when deployments-local.json is absent
Use brace expansion in import.meta.glob pattern so Vite treats it as a
dynamic glob (returns {} when no files match) instead of compiling it
to a static import that errors when the gitignored file is absent in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 10:45:13 +00:00
openhands
282ac72c14 fix: handle missing deployments-local.json in CI/production
Use import.meta.glob with eager loading instead of a static import so
config.ts degrades gracefully when the file is absent (gitignored).

Fixes the node-quality CI failure introduced when the file was removed
from the repo in this PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 10:34:41 +00:00
openhands
9a309634ed chore: add planner watermarks to all AGENTS.md files 2026-03-15 16:42:45 +00:00
openhands
98dd839bb5 fix: unstakePosition() has no error handling at all (#482)
Address AI reviewer warnings:
- Add separate unstakeError ref so unstake failures are not displayed
  via the load-data error UI whose Retry calls loadActivePositionData
- Add exitSucceeded flag to distinguish pre-exit failures ("Failed to
  unstake position.") from post-exit data-refresh failures ("Position
  unstaked, but failed to refresh data."), preventing factually wrong
  messages after a successful transaction
- Unstake error UI has no Retry button; the Unstake button in actions
  remains available for retrying a failed transaction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 18:15:30 +00:00
openhands
a8defd10b4 fix: unstakePosition() has no error handling at all (#482)
Wrap the entire unstakePosition() body in try/catch/finally so that
errors from exitPosition(), loadActivePositions(), and loadPositions()
are caught, displayed to the user via the existing error ref, and
loading state is always reset correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 17:32:02 +00:00
openhands
4eea19bf53 fix: Stale values shown during retry after prior successful load (#489) 2026-03-06 16:51:22 +00:00
openhands
e4ed1474e1 fix: P&L percentage line understates tax cost when taxDue > 0 (#504)
Include taxDue in taxCostPercent computation so the Tax% and Net%
shown in the header P&L line are consistent with the Tax Cost card
and Total row, which already use taxDue + taxPaid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 15:32:21 +00:00
openhands
18a2d4138e fix: Misleading 'Tax Paid' label — value includes unpaid tax due (#374)
taxPaidGes = taxDue + taxPaid, so the displayed value includes both
outstanding tax and historically paid tax. Rename the UI label from
'Tax Paid' to 'Tax Cost' to accurately reflect the combined amount.
Update the matching E2E test selector accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 11:51:45 +00:00
openhands
0063e94007 fix: \total\ computed has no undefined guard — shows initial stake amount during loading (#424)
When profit or taxPaidGes were undefined (data still loading), the
computed returned props.amount due to the ?? 0 fallbacks. The computed
now returns undefined until both values are loaded, and the template
guard is simplified to total !== undefined.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 06:31:49 +00:00
openhands
372f49f6a5 fix: wrap unstakePosition polling loop in try/finally to prevent loading lock (#448)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 04:18:52 +00:00
openhands
e85ff85950 fix: CollapseActive.vue: fixed 5-second delay in unstakePosition() should be replaced with polling (#448)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 03:44:04 +00:00
openhands
5b69d9ee3d fix: address review findings in sell KRK widget
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 12:39:15 +00:00
openhands
36c798605f fix: feat: Add sell KRK widget to get-krk page (#456)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 12:03:36 +00:00
openhands
2483630a2d fix: add eslint-disable for Promise+setTimeout in CollapseActive.vue (#442)
No push event exists for Ponder indexing completion; grandfathered with
justification comment per the no-fixed-delays rule exception policy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 22:10:06 +00:00
openhands
748557bc83 fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 20:58:01 +00:00
openhands
5623768025 fix: Double trigger of loadLiquidityStats on initial mount (#361)
Remove redundant onMounted call that fired loadLiquidityStats() a second
time. The watch() with { immediate: true } already handles the initial
load and all subsequent dependency changes, making onMounted redundant.
Also remove now-unused onMounted import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 07:52:02 +00:00
openhands
feaa226f24 fix: Array.isArray slot0 fallback branch is unreachable dead code (#362) 2026-03-03 07:11:09 +00:00
openhands
e866266511 fix: update CheatsView to import utilities from @harb/utils
isRecord, coerceString, getErrorMessage, ensureAddress were removed
from useSwapKrk.ts but CheatsView.vue still imported them from there.
Update CheatsView to import from @harb/utils directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 05:54:29 +00:00
openhands
59ae30bb37 fix: Generic utilities (isRecord, coerceString, getErrorMessage, ensureAddress) have no shared home (#363)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 05:37:14 +00:00
openhands
d00b78f338 fix: apply formatTokenAmount to Total row and guard against NaN/Infinity
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 03:32:06 +00:00
openhands
8f5910d30a fix: Raw number rendering for \taxPaidGes\ and \profit\ after load (#375)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 03:03:22 +00:00
openhands
f8baa02efc fix: hide stats on first-open error and guard Total row against undefined
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 02:23:06 +00:00
openhands
c0e1079006 fix: suppress no-console lint error in CollapseActive error handler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 02:00:05 +00:00
openhands
8e600ec5fd fix: \loadActivePositionData\ has no error handling — silent failure on RPC error (#377)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 01:51:48 +00:00
openhands
68601c255a fix: getByRole('button', { name: 'Buy' }).last() fragility is duplicated across e2e/01 and this scenario (#398)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 23:13:05 +00:00
openhands
f612090eeb fix: cleanup: Remove swap functionality from cheats page after #393 fix (#400)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 06:32:48 +00:00
openhands
0675694779 fix: bug: Desktop Connect button never renders at 1280px width (#399)
Replace screen.width with window.innerWidth in useMobile composable.
screen.width reports the physical screen size (0 in headless Chromium),
while window.innerWidth reflects the actual viewport — the correct metric
for responsive layout. The previous Object.defineProperty workaround in
wallet-provider.ts could not override the native Screen.prototype getter,
so screen.width remained 0, isMobile stayed true, and ConnectButton was
never rendered. Fix wallet-provider.ts to pass viewport/screen options
directly to browser.newContext() and remove the broken init-script shim.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 04:35:51 +00:00
openhands
6876e84735 fix: bug: Get KRK page swap widget broken with Playwright fill() (#393)
Replace v-model with :value + @input on the number input in LocalSwapWidget.
Vue 3's vModelText directive coerces <input type="number"> values to numbers
via looseToNumber(), causing swapAmount to become a JS number (e.g. 0.05) after
Playwright fill(). viem's parseEther() requires a string and throws when passed
a number, triggering the "Enter a valid ETH amount" error.

The fix mirrors FInput's explicit @input handler which always reads
event.target.value as a string, keeping swapAmount typed as string throughout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 18:15:50 +00:00
openhands
bcebbd47c9 fix: \taxDue\ ref lacks null guard before bigint arithmetic (#329)
Initialize taxDue as ref<bigint>(0n) instead of ref<bigint>() so the
type is always bigint, eliminating the undefined in the Ref type and
making the bigint addition at line 219 type-safe without a null guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 13:51:04 +00:00
openhands
57903329bf fix: \{{ taxPaidGes }}\ and \{{ profit }}\ render empty during async load (#330)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 13:21:06 +00:00
openhands
e5a5486499 fix: Structural duplication of swap ABIs and buyKrk() across LocalSwapWidget and CheatsView (#353)
Extract shared Uniswap ABIs (WETH_ABI, SWAP_ROUTER_ABI, UNISWAP_FACTORY_ABI,
UNISWAP_POOL_ABI), utility functions (isRecord, coerceString, getErrorMessage,
ensureAddress), and the wrap→approve→exactInputSingle flow into a new composable
useSwapKrk(). Both LocalSwapWidget and CheatsView now delegate to this single
source of truth, so swap logic changes only need to be made in one place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 09:32:02 +00:00
openhands
cf4e401d03 fix: address review feedback on LocalSwapWidget and CheatsView
- LocalSwapWidget: move useWallet() to top-level <script setup> (was
  incorrectly called inside async buyKrk() event handler)
- LocalSwapWidget + CheatsView: fix misleading toast — all transactions
  are fully confirmed at that point, so say 'Swap complete' not 'Swap
  submitted'
- LocalSwapWidget: add $KRK sigil to warning/hint text for consistency
  with GetKrkView
- LocalSwapWidget: add comment on amountOutMinimum: 0n explaining it is
  intentional for a no-MEV local anvil environment
- CheatsView: apply same useWallet() fix (pre-existing anti-pattern)
- docs/ENVIRONMENT.md: document VITE_ENABLE_LOCAL_SWAP and related
  VITE_ variables in a new webapp env-var table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 10:32:04 +00:00
openhands
bce4059de9 fix: Get KRK: inline swap widget for local dev, Uniswap link for production (#136)
- Add `VITE_ENABLE_LOCAL_SWAP` env var to config.ts (defaults false)
- Create LocalSwapWidget.vue: inline ETH→KRK swap (wrap→approve→exactInputSingle)
- GetKrkView.vue: show LocalSwapWidget when VITE_ENABLE_LOCAL_SWAP=true, Uniswap link otherwise
- docker-compose.yml: set VITE_ENABLE_LOCAL_SWAP=true for webapp service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 06:55:41 +00:00