Arena: elevate WarBow steal / guard / revenge in hero (PageHeroArcadeBanner) #101

Closed
opened 2026-04-30 05:34:01 +00:00 by PlasticDigits · 16 comments
PlasticDigits commented 2026-04-30 05:34:01 +00:00 (Migrated from gitlab.com)

Summary

Improve /timecurve/arena so steal, guard, and revenge are obvious at first glance, easy to run, and backed by clear visual hierarchy—without losing YieldOmega’s arcade / competitive tone. Target the hero banner (PageHeroArcadeBanner) region that currently carries the long lede + status badges (BUY + DEFEND + STEAL), per:

  • DOM path (approx.): #root → main.app-main → section.page.page--timecurve → div.page-hero → div.arcade-banner.arcade-banner--with-sidekick.arcade-banner--with-scene
  • Component: PageHeroArcadeBanner (file: frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx)

Problem

WarBow actions today live primarily in WarbowSection further down the page (TimeCurveSections.tsx). New or casual users can miss that PvP is the point of “Arena,” and steal / revenge require manual address entry and scrolling.

Proposed direction

  1. Hero content swap (primary ask)
    Replace or heavily supplement the current hero copy + pill strip with a compact WarBow action cluster:

    • Wallet connect (or connected state) visible in this hero band so the user’s context is obvious before acting.
    • Steal: primary control + curated list of plausible targets (not only free-text 0x…), with BP / guard / daily-cap hints where we already have data.
    • Guard: single clear Guard CTA (burn + effect summarized in tooltip or one line).
    • Revenge: Revenge CTA when hasRevengeOpen, with who (pending stealer) surfaced from existing contract reads—optionally history if indexer supports it later.
  2. Visual hierarchy

    • Keep YieldOmega styling (existing tokens, arcade banner scene, sidekick) but tighter layout: primary vs secondary actions, consistent button treatment with the rest of TimeCurve.
    • Avoid wall-of-text; move deep rules to accordion / WarbowSection / protocol page as today.
  3. Data / indexer

    • Steal list: today eligibility is 2× BP rule + sale phase + per-victim UTC steal counts. Evaluate:
      • Reuse indexed WarBow leaderboard (/v1/timecurve/warbow/leaderboard, fetchTimecurveWarbowLeaderboard) + live contract reads (viewer BP, warbowGuardUntil, stealsReceivedOnDay) to filter and sort candidates client-side, or
      • Add a dedicated indexer endpoint (e.g. “steal candidates for address”) if client-side filtering is too heavy or incomplete.
    • Revenge list: likely 0 or 1 active target from warbowPendingRevengeStealer / expiry; still present as a clear card or row when open.
    • Document any indexer schema or API changes in the same MR if we extend the API.
  4. Scope boundaries

    • Do not remove WarbowSection detail (feed, rules, flag flow) unless we explicitly fold it elsewhere in a follow-up.
    • Preserve chain-mismatch and sale phase write barriers; hero actions must disable with the same reasons as today.

Acceptance criteria (suggested)

  • Connected user on a live sale sees Steal / Guard / Revenge (when applicable) above the fold in the hero, with no required scroll on a typical laptop viewport.
  • Steal flow can be completed without typing an address when indexer/leaderboard data yields at least one eligible target (with explicit empty state if none).
  • Revenge is one obvious action when hasRevengeOpen, showing counterparty and deadline inline.
  • Wallet connect state is visible in the hero action area.
  • a11y: buttons have clear labels; lists keyboard-navigable where applicable.
  • E2E or component tests updated if we add critical selectors (data-testid).

References

  • frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx — PageHeroArcadeBanner, WarbowSection placement
  • frontend/src/pages/timecurve/TimeCurveSections.tsx — current steal/revenge implementation
  • frontend/src/pages/timeCurveArena/useTimeCurveArenaModel.tsx — runWarBowSteal, runWarBowRevenge, hasRevengeOpen, preflight
  • frontend/src/lib/indexerApi.ts — fetchTimecurveWarbowLeaderboard, fetchTimecurveWarbowBattleFeed
  • Product rules: docs/product/primitives.md (WarBow steal / revenge / guard)

Labels

UX / frontend / TimeCurve / WarBow (add as appropriate in GitLab)

## Summary Improve `/timecurve/arena` so **steal**, **guard**, and **revenge** are **obvious at first glance**, **easy to run**, and backed by **clear visual hierarchy**—without losing YieldOmega’s arcade / competitive tone. Target the **hero banner** (`PageHeroArcadeBanner`) region that currently carries the long lede + status badges (`BUY + DEFEND + STEAL`), per: - **DOM path (approx.):** `#root` → `main.app-main` → `section.page.page--timecurve` → `div.page-hero` → `div.arcade-banner.arcade-banner--with-sidekick.arcade-banner--with-scene` - **Component:** `PageHeroArcadeBanner` (file: `frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx`) ## Problem WarBow **actions** today live primarily in **`WarbowSection`** further down the page (`TimeCurveSections.tsx`). New or casual users can miss that PvP is the point of “Arena,” and **steal / revenge** require manual address entry and scrolling. ## Proposed direction 1. **Hero content swap (primary ask)** Replace or heavily supplement the current hero copy + pill strip with a **compact WarBow action cluster**: - **Wallet connect** (or connected state) **visible in this hero band** so the user’s context is obvious before acting. - **Steal:** primary control + **curated list of plausible targets** (not only free-text `0x…`), with BP / guard / daily-cap hints where we already have data. - **Guard:** single clear **Guard** CTA (burn + effect summarized in tooltip or one line). - **Revenge:** **Revenge** CTA when `hasRevengeOpen`, with **who** (pending stealer) surfaced from existing contract reads—optionally **history** if indexer supports it later. 2. **Visual hierarchy** - Keep **YieldOmega** styling (existing tokens, arcade banner scene, sidekick) but **tighter layout**: primary vs secondary actions, consistent button treatment with the rest of TimeCurve. - Avoid wall-of-text; move deep rules to accordion / `WarbowSection` / protocol page as today. 3. **Data / indexer** - **Steal list:** today eligibility is **2× BP rule** + sale phase + per-victim UTC steal counts. Evaluate: - Reuse **indexed WarBow leaderboard** (`/v1/timecurve/warbow/leaderboard`, `fetchTimecurveWarbowLeaderboard`) + **live contract reads** (viewer BP, `warbowGuardUntil`, `stealsReceivedOnDay`) to **filter and sort** candidates client-side, **or** - Add a **dedicated indexer endpoint** (e.g. “steal candidates for address”) if client-side filtering is too heavy or incomplete. - **Revenge list:** likely **0 or 1** active target from `warbowPendingRevengeStealer` / expiry; still present as a **clear card or row** when open. - Document any **indexer** schema or API changes in the same MR if we extend the API. 4. **Scope boundaries** - Do **not** remove `WarbowSection` detail (feed, rules, flag flow) unless we explicitly fold it elsewhere in a follow-up. - Preserve **chain-mismatch** and **sale phase** write barriers; hero actions must **disable** with the same reasons as today. ## Acceptance criteria (suggested) - [ ] Connected user on a live sale sees **Steal / Guard / Revenge** (when applicable) **above the fold** in the hero, with **no required scroll** on a typical laptop viewport. - [ ] Steal flow can be completed **without typing an address** when indexer/leaderboard data yields at least one eligible target (with explicit empty state if none). - [ ] Revenge is **one obvious action** when `hasRevengeOpen`, showing **counterparty** and **deadline** inline. - [ ] **Wallet connect** state is visible in the hero action area. - [ ] **a11y:** buttons have clear labels; lists keyboard-navigable where applicable. - [ ] E2E or component tests updated if we add critical selectors (`data-testid`). ## References - `frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx` — `PageHeroArcadeBanner`, `WarbowSection` placement - `frontend/src/pages/timecurve/TimeCurveSections.tsx` — current steal/revenge implementation - `frontend/src/pages/timeCurveArena/useTimeCurveArenaModel.tsx` — `runWarBowSteal`, `runWarBowRevenge`, `hasRevengeOpen`, preflight - `frontend/src/lib/indexerApi.ts` — `fetchTimecurveWarbowLeaderboard`, `fetchTimecurveWarbowBattleFeed` - Product rules: `docs/product/primitives.md` (WarBow steal / revenge / guard) ## Labels UX / frontend / TimeCurve / WarBow (add as appropriate in GitLab)
PlasticDigits commented 2026-04-30 05:50:55 +00:00 (Migrated from gitlab.com)

Implemented and pushed the issue #101 Arena WarBow hero update to main (5ee703e).

What changed:

  • Added WarbowHeroActions inside the /timecurve/arena PageHeroArcadeBanner so wallet context, Steal, Guard, and Revenge are visible in the hero region.
  • Added curated steal target buttons sourced from the contract WarBow podium plus the indexed WarBow leaderboard. They are discovery hints only: selecting a target feeds the existing stealVictimInput, and live battlePoints / stealsReceivedOnDay reads plus describeStealPreflight remain the eligibility gate.
  • Kept the detailed WarbowSection in place for rules, manual target entry, flag claim, feed, and deeper context.
  • Preserved wrong-network and buyFeeRoutingEnabled write barriers for the new hero controls.
  • Documented the invariant in docs/frontend/timecurve-views.md, docs/testing/invariants-and-business-logic.md, and skills/play-timecurve-warbow/SKILL.md for third-party/player agents.

Verified:

  • pnpm test (40 files / 234 tests)
  • pnpm run typecheck
  • pnpm run lint (passes with one pre-existing Fast Refresh warning in IndexerConnectivityContext.tsx)
  • pnpm run build
  • pnpm exec playwright test e2e/timecurve.spec.ts --workers=5
  • Cursor browser MCP live visual check on /timecurve/arena with local Anvil/indexer env: hero cluster renders candidate rows, bypass checkbox, Attempt steal, Guard, and Revenge without clipping.

Checklist for verification:

  • On /timecurve/arena, confirm the PageHeroArcadeBanner shows wallet context plus Steal / Guard / Revenge cards.
  • With an indexed ladder, click a suggested steal target and confirm the detailed preflight updates with live victim BP and UTC-day steal count.
  • Confirm the Steal button stays disabled when preflight reports an error or no target is selected.
  • Confirm Guard shows active-until copy after guard is active and still respects wrong-network / fee-routing gates.
  • Confirm Revenge appears as a single CTA with pending stealer and deadline only when the wallet has an open revenge slot.
  • Confirm the lower WarBow section still supports manual address entry, flag claim, rules, and rivalry feed.

@brouie please verify the fix when you have a chance. Leaving the issue open for your confirmation.

Implemented and pushed the issue #101 Arena WarBow hero update to `main` (`5ee703e`). What changed: - Added `WarbowHeroActions` inside the `/timecurve/arena` `PageHeroArcadeBanner` so wallet context, Steal, Guard, and Revenge are visible in the hero region. - Added curated steal target buttons sourced from the contract WarBow podium plus the indexed WarBow leaderboard. They are discovery hints only: selecting a target feeds the existing `stealVictimInput`, and live `battlePoints` / `stealsReceivedOnDay` reads plus `describeStealPreflight` remain the eligibility gate. - Kept the detailed `WarbowSection` in place for rules, manual target entry, flag claim, feed, and deeper context. - Preserved wrong-network and `buyFeeRoutingEnabled` write barriers for the new hero controls. - Documented the invariant in `docs/frontend/timecurve-views.md`, `docs/testing/invariants-and-business-logic.md`, and `skills/play-timecurve-warbow/SKILL.md` for third-party/player agents. Verified: - [x] `pnpm test` (40 files / 234 tests) - [x] `pnpm run typecheck` - [x] `pnpm run lint` (passes with one pre-existing Fast Refresh warning in `IndexerConnectivityContext.tsx`) - [x] `pnpm run build` - [x] `pnpm exec playwright test e2e/timecurve.spec.ts --workers=5` - [x] Cursor browser MCP live visual check on `/timecurve/arena` with local Anvil/indexer env: hero cluster renders candidate rows, bypass checkbox, Attempt steal, Guard, and Revenge without clipping. Checklist for verification: - [ ] On `/timecurve/arena`, confirm the PageHeroArcadeBanner shows wallet context plus Steal / Guard / Revenge cards. - [ ] With an indexed ladder, click a suggested steal target and confirm the detailed preflight updates with live victim BP and UTC-day steal count. - [ ] Confirm the Steal button stays disabled when preflight reports an error or no target is selected. - [ ] Confirm Guard shows active-until copy after guard is active and still respects wrong-network / fee-routing gates. - [ ] Confirm Revenge appears as a single CTA with pending stealer and deadline only when the wallet has an open revenge slot. - [ ] Confirm the lower WarBow section still supports manual address entry, flag claim, rules, and rivalry feed. @brouie please verify the fix when you have a chance. Leaving the issue open for your confirmation.
PlasticDigits commented 2026-04-30 06:06:56 +00:00 (Migrated from gitlab.com)

mentioned in commit ca2aaffdd6

mentioned in commit ca2aaffdd6e6c953d8d1e03569db684505e0f65e
Brouie commented 2026-05-01 12:33:43 +00:00 (Migrated from gitlab.com)

Source-level pre-walkthrough complete on 5ee703e (folded into 243e2a0) — all wiring/gates/docs verified. Browser walkthrough deferred to a stack-up session.

Source-level checks (8/8 PASS)

  • WarbowHeroActions.tsx exists and is wired into PageHeroArcadeBanner — TimeCurveArenaView.tsx:44 import, rendered at line 1060 inside the live-state hero (line 1041). The env-misconfig fallback hero (line 345) is unchanged and instructional.
  • Chain-mismatch barrier preserved — <ChainMismatchWriteBarrier testId="timecurve-arena-hero-warbow-chain-write-gate"> wraps the entire WarbowHeroActions (line 1059). Unique testId for E2E selectors.
  • buyFeeRoutingEnabled write barrier preserved — WarbowHeroActions.tsx:80 const writesPaused = buyFeeRoutingEnabled === false; + line 82 composite gate canPressWarbow = isConnected && saleActive && !writesPaused && !isWriting. All 3 actions (Steal/Guard/Revenge) gated on canPressWarbow at lines 198/223/246.
  • describeStealPreflight still gates eligibility — preflight passed as prop (line 1077); Steal button line 198 disabled when stealPreflight.tone === "error". Status message at lines 180-181 surfaces preflight title + detail.
  • stealVictimInput reused (no parallel state) — setStealVictimInput wired at line 1070; target candidate buttons feed the existing setter, so live battlePoints / stealsReceivedOnDay reads remain the source of truth.
  • WarbowSection still in place — defined at TimeCurveSections.tsx:257, imported at TimeCurveArenaView.tsx:50, rendered at line 1281. Hero is additive, not a replacement.
  • Documentation invariants in all 3 docs —
    • docs/frontend/timecurve-views.md: anchor + ## Arena WarBow hero actions (issue #101) heading at lines 153/155.
    • docs/testing/invariants-and-business-logic.md: top-table row at line 75, detailed prose at line 141, sub-table at line 148 explicitly listing the write barriers.
    • skills/play-timecurve-warbow/SKILL.md: lines 27 + 69 cross-link the hero discovery rule.
  • Unit tests — WarbowHeroActions.test.tsx: 3 tests, all PASS in npx vitest run WarbowHeroActions (29ms). Coverage hits spec acceptance criteria 1 (hero cluster has all 3 actions) and 2 (selectable candidates + empty state).

Browser walkthrough — deferred

The 6 items in your verification checklist all start with "On /timecurve/arena, confirm..." — those need a live stack + browser. Will run them in a stack-up session and post a follow-up note. Logic is in place; this is confirmatory, not exploratory.

Leaving open. cc @PlasticDigits

Source-level pre-walkthrough complete on `5ee703e` (folded into `243e2a0`) — all wiring/gates/docs verified. Browser walkthrough deferred to a stack-up session. ### Source-level checks (8/8 PASS) - [x] **`WarbowHeroActions.tsx` exists and is wired into `PageHeroArcadeBanner`** — `TimeCurveArenaView.tsx:44` import, rendered at line 1060 inside the live-state hero (line 1041). The env-misconfig fallback hero (line 345) is unchanged and instructional. - [x] **Chain-mismatch barrier preserved** — `<ChainMismatchWriteBarrier testId="timecurve-arena-hero-warbow-chain-write-gate">` wraps the entire `WarbowHeroActions` (line 1059). Unique testId for E2E selectors. - [x] **`buyFeeRoutingEnabled` write barrier preserved** — `WarbowHeroActions.tsx:80` `const writesPaused = buyFeeRoutingEnabled === false;` + line 82 composite gate `canPressWarbow = isConnected && saleActive && !writesPaused && !isWriting`. All 3 actions (Steal/Guard/Revenge) gated on `canPressWarbow` at lines 198/223/246. - [x] **`describeStealPreflight` still gates eligibility** — preflight passed as prop (line 1077); Steal button line 198 disabled when `stealPreflight.tone === "error"`. Status message at lines 180-181 surfaces preflight title + detail. - [x] **`stealVictimInput` reused (no parallel state)** — `setStealVictimInput` wired at line 1070; target candidate buttons feed the existing setter, so live `battlePoints` / `stealsReceivedOnDay` reads remain the source of truth. - [x] **`WarbowSection` still in place** — defined at `TimeCurveSections.tsx:257`, imported at `TimeCurveArenaView.tsx:50`, rendered at line 1281. Hero is additive, not a replacement. - [x] **Documentation invariants in all 3 docs** — - `docs/frontend/timecurve-views.md`: anchor + `## Arena WarBow hero actions (issue #101)` heading at lines 153/155. - `docs/testing/invariants-and-business-logic.md`: top-table row at line 75, detailed prose at line 141, sub-table at line 148 explicitly listing the write barriers. - `skills/play-timecurve-warbow/SKILL.md`: lines 27 + 69 cross-link the hero discovery rule. - [x] **Unit tests** — `WarbowHeroActions.test.tsx`: 3 tests, all PASS in `npx vitest run WarbowHeroActions` (29ms). Coverage hits spec acceptance criteria 1 (hero cluster has all 3 actions) and 2 (selectable candidates + empty state). ### Browser walkthrough — deferred The 6 items in your verification checklist all start with "On `/timecurve/arena`, confirm..." — those need a live stack + browser. Will run them in a stack-up session and post a follow-up note. Logic is in place; this is confirmatory, not exploratory. Leaving open. cc @PlasticDigits
Brouie commented 2026-05-01 15:23:23 +00:00 (Migrated from gitlab.com)

mentioned in issue #108

mentioned in issue #108
PlasticDigits commented 2026-05-02 04:38:19 +00:00 (Migrated from gitlab.com)

OK please run in live stack plus browser @Brouie

OK please run in live stack plus browser @Brouie
Brouie commented 2026-05-04 01:03:29 +00:00 (Migrated from gitlab.com)

live browser walkthrough done.

item 1: PageHeroArcadeBanner on /timecurve/arena renders WALLET CONTEXT card (0xf39Fd6...2266, Your BP 0) + PRIMARY PVP STEAL + DEFENSE GUARD + COUNTERPUNCH REVENGE all clustered in hero region above the deeper WarBow section.

item 3: with no indexed ladder, hero shows "No indexed 2x BP steal target yet. The detailed WarBow section still accepts a manual address." Attempt steal button stays unselectable without a target.

item 4: clicked Activate guard, MM prompted for the 10 CL8Y burn, post-tx hero panel updated to show "Guard active until" header with both LOCAL and UTC timestamps + button label flipped to "Extend guard". active-until copy renders cleanly.

item 5: empty-state revenge panel shows "No revenge slot is open for this wallet. A successful steal against you opens one pending stealer." — negative-case proof that the CTA + deadline UI is correctly suppressed when no slot exists.

item 6: lower WarBow section still rendering with manual steal-victim address input, claim flag button, top rivals board, rivalry feed, and rules/eligibility. full deeper context preserved alongside the new hero.

item 2 deferred: indexed candidate-button selection feeding stealVictimInput needs an indexed ladder which requires bot swarm to populate. happy to spawn a swarm and retest if needed; otherwise items 1/3/4/5/6 + the source-level walkthrough already on file cover the meat.

live browser walkthrough done. **item 1**: PageHeroArcadeBanner on /timecurve/arena renders WALLET CONTEXT card (`0xf39Fd6...2266`, Your BP 0) + PRIMARY PVP STEAL + DEFENSE GUARD + COUNTERPUNCH REVENGE all clustered in hero region above the deeper WarBow section. **item 3**: with no indexed ladder, hero shows "No indexed 2x BP steal target yet. The detailed WarBow section still accepts a manual address." Attempt steal button stays unselectable without a target. **item 4**: clicked Activate guard, MM prompted for the 10 CL8Y burn, post-tx hero panel updated to show "Guard active until" header with both LOCAL and UTC timestamps + button label flipped to "Extend guard". active-until copy renders cleanly. **item 5**: empty-state revenge panel shows "No revenge slot is open for this wallet. A successful steal against you opens one pending stealer." — negative-case proof that the CTA + deadline UI is correctly suppressed when no slot exists. **item 6**: lower WarBow section still rendering with manual steal-victim address input, claim flag button, top rivals board, rivalry feed, and rules/eligibility. full deeper context preserved alongside the new hero. **item 2 deferred**: indexed candidate-button selection feeding stealVictimInput needs an indexed ladder which requires bot swarm to populate. happy to spawn a swarm and retest if needed; otherwise items 1/3/4/5/6 + the source-level walkthrough already on file cover the meat.
Brouie commented 2026-05-04 02:42:59 +00:00 (Migrated from gitlab.com)

mentioned in issue #96

mentioned in issue #96
Brouie (Migrated from gitlab.com) closed this issue 2026-05-04 03:10:14 +00:00
PlasticDigits commented 2026-05-04 09:58:07 +00:00 (Migrated from gitlab.com)

mentioned in commit fc6ba68fcc

mentioned in commit fc6ba68fcc366c3b19beb9015acb3896c226df21
PlasticDigits commented 2026-05-17 13:45:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #211

mentioned in issue #211
PlasticDigits commented 2026-05-19 06:26:06 +00:00 (Migrated from gitlab.com)

mentioned in issue #216

mentioned in issue #216
PlasticDigits commented 2026-05-19 08:06:28 +00:00 (Migrated from gitlab.com)

mentioned in issue #218

mentioned in issue #218
PlasticDigits commented 2026-05-22 00:14:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #236

mentioned in issue #236
PlasticDigits commented 2026-05-22 00:14:57 +00:00 (Migrated from gitlab.com)

marked as related to #236

marked as related to #236
Brouie commented 2026-05-22 04:53:09 +00:00 (Migrated from gitlab.com)

mentioned in commit 261e7b474d

mentioned in commit 261e7b474dec5bc747276f361d2959a2d448a20c
Brouie commented 2026-05-22 04:53:56 +00:00 (Migrated from gitlab.com)

mentioned in merge request !394

mentioned in merge request !394
PlasticDigits commented 2026-07-07 02:28:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #361

mentioned in issue #361
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/yieldomega#101
No description provided.