Show planted-flag silence timer in WarBow viewer summary (#362) #532

Merged
PlasticDigits merged 1 commit from issue-362-warbow-viewer-summary-flag into main 2026-07-07 02:51:01 +00:00
PlasticDigits commented 2026-07-07 02:36:03 +00:00 (Migrated from gitlab.com)

Summary

GitLab #362 (parent #360): when the viewer holds a planted WarBow flag, the viewer summary card (warbow-hero-card--viewer-summary) now shows a third FLAG: line beside YOUR BP and GUARD — silence countdown (MM:SS until claim) or claim now when eligible. Reuses existing showClaimFlagControl, flagSilenceEndSec, ledgerNowSec, and warbowClaimFlagSilenceRemainingSec; Flag subcard behavior unchanged.

Invariant: INV-FRONTEND-362-WARBOW-VIEWER-SUMMARY-FLAG

Acceptance checklist

Criterion Verification Result
Planted flag → summary shows flag timer or claim-now alongside BP/GUARD cd frontend && npm test -- ArenaWarbowHeroPanel.test.tsx PASS
No planted flag → no flag line in summary ArenaWarbowHeroPanel.test.tsx — omits viewer-summary flag line PASS
Countdown uses same ledgerNowSec / silence math as Flag subcard Shared flagSilenceRemainingSec in ArenaWarbowHeroPanel.tsx PASS
Flag subcard countdown + claim CTA unchanged Existing tests still pass in same file PASS
npm run typecheck cd frontend && npm run typecheck PASS
npm run lint cd frontend && npm run lint SKIP — pre-existing errors on main (arenaPayTokenSpendBand.ts prefer-const; ArenaWarbowHeroPanel.tsx conditional useMemo before this MR)
npm test (full frontend) cd frontend && npm test SKIP — 7 pre-existing failures in ArenaSimplePage.test.tsx on main (unrelated source-string assertions)
Manual Anvil: plant flag → timer visible in summary Full stack + Rabby buy with Plant Flag SKIP — not run in this session; unit tests cover summary rendering

Third-party verification

  1. cd frontend && npm run typecheck && npm test -- ArenaWarbowHeroPanel.test.tsx
  2. Start local stack: bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm --no-frontend (or full stack with Vite).
  3. Connect wallet at level ≥ 5, enable Plant Flag on Next Buy, complete a CHARM buy.
  4. Confirm data-testid="warbow-hero-viewer-summary-flag" shows FLAG: **MM:SS until claim** in the summary strip (same countdown as Flag subcard).
  5. After 5 minutes silence (or Anvil evm_increaseTime), confirm summary shows FLAG: **claim now** while Flag subcard claim CTA is enabled.

Related: #362 · docs arena-views §362 · skill play-time-arena-warbow

## Summary GitLab [#362](https://gitlab.com/PlasticDigits/yieldomega/-/issues/362) (parent [#360](https://gitlab.com/PlasticDigits/yieldomega/-/issues/360)): when the viewer holds a planted WarBow flag, the **viewer summary** card (`warbow-hero-card--viewer-summary`) now shows a third **`FLAG:`** line beside YOUR BP and GUARD — silence countdown (`MM:SS until claim`) or **claim now** when eligible. Reuses existing `showClaimFlagControl`, `flagSilenceEndSec`, `ledgerNowSec`, and `warbowClaimFlagSilenceRemainingSec`; Flag subcard behavior unchanged. Invariant: **`INV-FRONTEND-362-WARBOW-VIEWER-SUMMARY-FLAG`** ## Acceptance checklist | Criterion | Verification | Result | |-----------|--------------|--------| | Planted flag → summary shows flag timer or claim-now alongside BP/GUARD | `cd frontend && npm test -- ArenaWarbowHeroPanel.test.tsx` | PASS | | No planted flag → no flag line in summary | `ArenaWarbowHeroPanel.test.tsx` — `omits viewer-summary flag line` | PASS | | Countdown uses same `ledgerNowSec` / silence math as Flag subcard | Shared `flagSilenceRemainingSec` in `ArenaWarbowHeroPanel.tsx` | PASS | | Flag subcard countdown + claim CTA unchanged | Existing tests still pass in same file | PASS | | `npm run typecheck` | `cd frontend && npm run typecheck` | PASS | | `npm run lint` | `cd frontend && npm run lint` | SKIP — pre-existing errors on `main` (`arenaPayTokenSpendBand.ts` prefer-const; `ArenaWarbowHeroPanel.tsx` conditional `useMemo` before this MR) | | `npm test` (full frontend) | `cd frontend && npm test` | SKIP — 7 pre-existing failures in `ArenaSimplePage.test.tsx` on `main` (unrelated source-string assertions) | | Manual Anvil: plant flag → timer visible in summary | Full stack + Rabby buy with Plant Flag | SKIP — not run in this session; unit tests cover summary rendering | ## Third-party verification 1. `cd frontend && npm run typecheck && npm test -- ArenaWarbowHeroPanel.test.tsx` 2. Start local stack: `bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm --no-frontend` (or full stack with Vite). 3. Connect wallet at level ≥ 5, enable **Plant Flag on Next Buy**, complete a CHARM buy. 4. Confirm `data-testid="warbow-hero-viewer-summary-flag"` shows `FLAG: **MM:SS until claim**` in the summary strip (same countdown as Flag subcard). 5. After 5 minutes silence (or Anvil `evm_increaseTime`), confirm summary shows `FLAG: **claim now**` while Flag subcard claim CTA is enabled. Related: [#362](https://gitlab.com/PlasticDigits/yieldomega/-/issues/362) · docs [arena-views §362](docs/frontend/arena-views.md#warbow-viewer-summary-flag-gitlab-362) · skill [`play-time-arena-warbow`](skills/play-time-arena-warbow/SKILL.md)
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-07-07 02:36:06 +00:00 (Migrated from gitlab.com)

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot) to get automatic reviews on future PRs.
PlasticDigits commented 2026-07-07 02:37:59 +00:00 (Migrated from gitlab.com)

Security review — MR !532

Commit reviewed: b58a0c023f5e26e102910449fd53d341fcde48b3

Scope: Frontend display-only change in ArenaWarbowHeroPanel.tsx — adds a third FLAG: line to the WarBow viewer summary card (silence countdown via formatCountdown / warbowClaimFlagSilenceRemainingSec, or static claim now when canClaimWarBowFlag). Supporting docs, invariants, and unit tests only. No contract, indexer, auth, or dependency changes.

Method: Traced props (showClaimFlagControl, canClaimWarBowFlag, flagSilenceEndSec, ledgerNowSec) from session/on-chain derivation through to the new JSX sink. Compared with existing Flag subcard + WarbowClaimFlagButton paths (same inputs, same math). Checked for injection (XSS/HTML), new write surfaces, permission-boundary shifts, and EVM attack surface.

Outcome: FINDINGS: 0 medium+

Security review: no medium+ findings on this diff.

  • XSS: New output is static strings plus formatCountdown(number) inside React text nodes — no dangerouslySetInnerHTML, no unsanitized external strings.
  • Authz / writes: Summary line is read-only; claim remains gated by existing WarbowClaimFlagButton + ChainMismatchWriteBarrier + on-chain silence enforcement — unchanged by this MR.
  • Indexer display trust: Stale/manipulated indexer time could skew countdown copy, but that is the pre-existing indexer-first display model (INV-FRONTEND-301); it does not enable unauthorized claims.
  • EVM: No smart-contract or transaction-path changes.

Inline threads: none (no findings to anchor).

## Security review — MR !532 **Commit reviewed:** `b58a0c023f5e26e102910449fd53d341fcde48b3` **Scope:** Frontend display-only change in `ArenaWarbowHeroPanel.tsx` — adds a third `FLAG:` line to the WarBow viewer summary card (silence countdown via `formatCountdown` / `warbowClaimFlagSilenceRemainingSec`, or static **claim now** when `canClaimWarBowFlag`). Supporting docs, invariants, and unit tests only. No contract, indexer, auth, or dependency changes. **Method:** Traced props (`showClaimFlagControl`, `canClaimWarBowFlag`, `flagSilenceEndSec`, `ledgerNowSec`) from session/on-chain derivation through to the new JSX sink. Compared with existing Flag subcard + `WarbowClaimFlagButton` paths (same inputs, same math). Checked for injection (XSS/HTML), new write surfaces, permission-boundary shifts, and EVM attack surface. **Outcome:** `FINDINGS: 0` medium+ Security review: **no medium+ findings** on this diff. - **XSS:** New output is static strings plus `formatCountdown(number)` inside React text nodes — no `dangerouslySetInnerHTML`, no unsanitized external strings. - **Authz / writes:** Summary line is read-only; claim remains gated by existing `WarbowClaimFlagButton` + `ChainMismatchWriteBarrier` + on-chain silence enforcement — unchanged by this MR. - **Indexer display trust:** Stale/manipulated indexer time could skew countdown copy, but that is the pre-existing indexer-first display model (`INV-FRONTEND-301`); it does not enable unauthorized claims. - **EVM:** No smart-contract or transaction-path changes. **Inline threads:** none (no findings to anchor).
PlasticDigits (Migrated from gitlab.com) merged commit b29ccf0140 into main 2026-07-07 02:51:01 +00:00
PlasticDigits commented 2026-07-07 02:51:02 +00:00 (Migrated from gitlab.com)

mentioned in commit b29ccf0140

mentioned in commit b29ccf014063701fa055d87fc64d01e705089718
Sign in to join this conversation.
No reviewers
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!532
No description provided.