Commit graph

571 commits

Author SHA1 Message Date
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
0a15df2e01 ci: retrigger after infra failure 2026-03-03 22:00:44 +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
johba
c9e84b2c34 Merge pull request 'fix: Double trigger of loadLiquidityStats on initial mount (#361)' (#433) from fix/issue-361 into master 2026-03-03 09:25:47 +01: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
johba
5d1c715799 Merge pull request 'fix: Array.isArray slot0 fallback branch is unreachable dead code (#362)' (#432) from fix/issue-362 into master 2026-03-03 08:41:20 +01:00
openhands
feaa226f24 fix: Array.isArray slot0 fallback branch is unreachable dead code (#362) 2026-03-03 07:11:09 +00:00
johba
1f9d11d494 Merge pull request 'fix: Generic utilities (isRecord, coerceString, getErrorMessage, ensureAddress) have no shared home (#363)' (#429) from fix/issue-363 into master 2026-03-03 08:06:12 +01:00
openhands
46b154e6f9 ci: retrigger after infra failure 2026-03-03 06:32:49 +00:00
openhands
57f2057a4c fix: overlay @harb/utils into CI webapp container
The webapp-ci Docker image predates packages/utils. The e2e.yml webapp
service already overlays packages/web3 manually; add the same pattern
for packages/utils so Vite can resolve @harb/utils imports at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 06:21:22 +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
johba
e53591de9d Merge pull request 'fix: services/txnBot missing from ARCHITECTURE.md directory map (#369)' (#428) from fix/issue-369 into master 2026-03-03 06:25:14 +01:00
openhands
6432c07b12 fix: correct txnBot description in ARCHITECTURE.md directory map 2026-03-03 04:56:40 +00:00
openhands
e77db6ee12 ci: retrigger after infra failure 2026-03-03 04:23:04 +00:00
openhands
57b256b7e0 fix: services/txnBot missing from ARCHITECTURE.md directory map (#369) 2026-03-03 04:11:08 +00:00
johba
83ebc2885d Merge pull request 'fix: Raw number rendering for taxPaidGes and profit after load (#375)' (#426) from fix/issue-375 into master 2026-03-03 05:01:33 +01: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
johba
007a315f4f Merge pull request 'fix: loadActivePositionData has no error handling — silent failure on RPC error (#377)' (#423) from fix/issue-377 into master 2026-03-03 03:51:05 +01: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
johba
f0377c5b81 Merge pull request 'fix: ENVIRONMENT.md documents contracts.env with VITE_ prefixes that do not match the actual file (#386)' (#421) from fix/issue-386 into master 2026-03-03 02:44:18 +01:00
openhands
47174c3dfe fix: ENVIRONMENT.md documents contracts.env with VITE_ prefixes that do not match the actual file (#386)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 01:21:48 +00:00
johba
afcf13bc84 Merge pull request 'fix: tests/setup/navigate.ts: bare 500ms timeout after pushState is fragile under CPU pressure (#390)' (#417) from fix/issue-390 into master 2026-03-03 02:13:27 +01:00
openhands
f53e245f0e fix: tests/setup/navigate.ts: bare 500ms timeout after pushState is fragile under CPU pressure (#390)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 00:45:27 +00:00
openhands
326d026794 fix: tests/setup/navigate.ts: bare 500ms timeout after pushState is fragile under CPU pressure (#390)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 00:20:47 +00:00
johba
b8d0e07fd2 Merge pull request 'fix: getByRole('button', { name: 'Buy' }).last() fragility is duplicated across e2e/01 and this scenario (#398)' (#414) from fix/issue-398 into master 2026-03-03 01:11:00 +01:00
openhands
ed5db3b000 fix: use toHaveText to correctly await swap completion after testId migration
getByTestId('swap-buy-button').waitFor({ state: 'visible' }) resolved
immediately because the button is always rendered; only its text changes.
Replace with expect(...).toHaveText('Buy KRK', { timeout: 60_000 }) to
correctly gate on the button returning to its idle state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 23:47:53 +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
johba
10643618f7 Merge pull request 'fix: tests/setup/stack.ts: contract addresses have no env var override path (#391)' (#411) from fix/issue-391 into master 2026-03-03 00:04:04 +01:00
openhands
c9fe1ab178 fix: tests/setup/stack.ts: contract addresses have no env var override path (#391)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 22:34:44 +00:00
openhands
0fe098ddc3 fix: tests/setup/stack.ts: contract addresses have no env var override path (#391)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 22:01:49 +00:00
johba
b1c2e4aff8 Merge pull request 'fix: cleanup: Remove swap functionality from cheats page after #393 fix (#400)' (#410) from fix/issue-400 into master 2026-03-02 08:57:03 +01:00
openhands
7296852d0e fix: migrate test 02 swap to get-krk page; add VITE_ENABLE_LOCAL_SWAP to CI
- Update 02-max-stake-all-tax-rates.spec.ts to buy KRK via /app/get-krk
  instead of the removed cheats-page swap card
- Add VITE_ENABLE_LOCAL_SWAP=true to the webapp CI service so
  LocalSwapWidget renders in the e2e pipeline

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 07:23:31 +00:00
openhands
3c377c84e8 ci: retrigger after infra failure 2026-03-02 06:43:47 +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
johba
be68018290 Merge pull request 'fix: feat: Shared holdout scenario test helpers (#401)' (#405) from fix/issue-401 into master 2026-03-02 07:24:24 +01:00
openhands
77a229018a fix: address review feedback on holdout helpers
- Extract rpcCall into helpers/rpc.ts to eliminate the duplicate copy
  in wallet.ts and assertions.ts (warning: code duplication)

- Fix waitForReceipt() in swap.ts to assert receipt.status === '0x1':
  reverted transactions (status 0x0) now throw immediately with a clear
  message instead of letting sellAllKrk silently succeed and fail later
  at the balance assertion (bug)

- Add screen.width debug log to connectWallet() before the isVisible
  check, restoring the regression signal from always-leave.spec.ts (warning)

- Fix expectPoolHasLiquidity() to only assert sqrtPriceX96 > 0 (pool
  is initialised); drop the active-tick liquidity() check which gives
  false negatives when price moves outside all LiquidityManager ranges
  after a sovereign exit (warning)

- Add WETH balance snapshot before/after the swap in sellAllKrk() and
  log a warning when WETH output is 0, making pool health degradation
  visible despite amountOutMinimum: 0n (warning)

- Add before/after screenshots in buyKrk() (holdout-before-buy.png,
  holdout-after-buy.png) to restore CI debugging artefacts (nit)

- Move waitForTimeout(2_000) settle buffer in buyKrk() to the catch
  path only; when the Submitting→idle transition is observed the extra
  wait is redundant (nit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 05:59:21 +00:00
openhands
d0a3bdecdc feat: Shared holdout scenario test helpers (#401)
Extract reusable helpers from sovereign-exit/always-leave.spec.ts into
three focused modules under scripts/harb-evaluator/helpers/:

- helpers/wallet.ts: connectWallet, disconnectWallet, getEthBalance,
  getKrkBalance — UI connect/disconnect flow and on-chain balance reads.

- helpers/swap.ts: buyKrk (navigates to the real /app/get-krk page and
  drives the LocalSwapWidget, now that #393 fill() fix is in), sellAllKrk
  (approve + exactInputSingle via window.ethereum, no UI dependency).

- helpers/assertions.ts: expectBalanceIncrease (snapshot/action/assert
  pattern for any token or ETH), expectPoolHasLiquidity (slot0 + liquidity
  sanity check on a Uniswap V3 pool).

always-leave.spec.ts is refactored to use these helpers and to navigate
to /app/get-krk instead of the /app/cheats workaround introduced before
the #393 fix landed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 05:21:24 +00:00
johba
71218464c0 Merge pull request 'fix: bug: Desktop Connect button never renders at 1280px width (#399)' (#402) from fix/issue-399 into master 2026-03-02 06:04:24 +01: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
johba
e9abea2307 Merge pull request 'fix: holdout scenario - use cheats page swap widget, match e2e wallet connection pattern' (#392) from fix/holdout-scenario-swap into master 2026-03-01 21:00:09 +01:00
johba
ba8f5d36c8 Merge pull request 'fix: bug: Get KRK page swap widget broken with Playwright fill() (#393)' (#396) from fix/issue-393 into master 2026-03-01 20:44:37 +01:00
openhands
13249613c0 address review: fix stale JSDoc, correct comments, remove redundant dispatchEvent 2026-03-01 19:11:43 +00:00
openhands
22a6264b00 ci: retrigger after infra failure 2026-03-01 18:40:37 +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
6489dc4896 fix: holdout scenario - use cheats page swap widget, match e2e wallet connection pattern
- Switch from account 5 to account 0 (matches e2e tests)
- Use cheats page (/app/cheats) instead of get-krk (/app/get-krk) -
  get-krk swap widget has v-model reactivity issue with Playwright fill()
- Match e2e/01 wallet connection pattern with mobile fallback
- Add debug screenshots for swap widget diagnosis
- Use getByLabel/getByRole selectors matching e2e patterns
2026-03-01 15:41:45 +00:00
johba
6c4ede16ab Merge pull request 'fix: Holdout evaluator: Playwright browser-based scenario scripts (#381)' (#388) from fix/issue-381 into master 2026-03-01 13:32:41 +01:00