Skip to content

feat: show temporary unblockable effects#6611

Merged
matthewevans merged 3 commits into
mainfrom
ship/show-temporary-unblockable-effects
Jul 25, 2026
Merged

feat: show temporary unblockable effects#6611
matthewevans merged 3 commits into
mainfrom
ship/show-temporary-unblockable-effects

Conversation

@matthewevans

@matthewevans matthewevans commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added a “Can’t be blocked” badge for permanents affected by temporary unblockable effects (until end of turn).
    • Shows the granting source when it’s publicly available.
    • Keeps the badge visible while omitting “from source” details when the source is not publicly available.
    • Added translations for English, German, Spanish, French, Italian, Polish, and Portuguese.
  • Tests
    • Added UI tests for badge/tooltip behavior across attribution scenarios.
    • Added integration tests for the new derived projection and its lifecycle/cleanup behavior.

@matthewevans
matthewevans enabled auto-merge July 24, 2026 23:02
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@matthewevans, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 712debba-dcbf-4497-85ef-d8e93d356a3f

📥 Commits

Reviewing files that changed from the base of the PR and between bb22ee9 and 7cecc39.

📒 Files selected for processing (1)
  • crates/engine/tests/integration/temporary_cant_be_blocked_view.rs
📝 Walkthrough

Walkthrough

Changes

The engine now projects active until-end-of-turn CantBeBlocked grants with optional public source IDs. Permanent cards render localized badges and source attribution when available, with integration and component tests covering visibility, serialization, ordering, and cleanup.

Temporary unblockability

Layer / File(s) Summary
Engine projection and contract
crates/engine/src/game/derived_views.rs, client/src/adapter/types.ts
Derived views expose recipient-keyed temporary grants and retain source IDs only for public, phased-in battlefield objects.
Projection integration coverage
crates/engine/tests/integration/*
Integration tests cover live grants, hidden sources, serialization, attribution ordering, Rogues Passage resolution, and end-of-turn cleanup.
Permanent card badge and localization
client/src/components/board/PermanentCard.tsx, client/src/components/board/__tests__/PermanentCard.test.tsx, client/src/i18n/locales/*/game.json
Permanent cards render the derived badge with optional source names, and locale files provide translations for the label.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GameState
  participant DerivedViews
  participant ClientAdapter
  participant PermanentCard
  GameState->>DerivedViews: derive temporary CantBeBlocked grants
  DerivedViews->>ClientAdapter: publish recipient and optional source IDs
  ClientAdapter->>PermanentCard: provide derived marker
  PermanentCard->>PermanentCard: resolve source name and render badge
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: displaying temporary unblockable/can't-be-blocked effects in the UI.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ship/show-temporary-unblockable-effects

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@client/src/components/board/__tests__/PermanentCard.test.tsx`:
- Around line 233-240: Add a positive reach guard in the test case “does not
render a temporary can't-be-blocked badge without an engine marker” by asserting
the rendered PermanentCard’s stable [data-object-id="1"] element is present
before checking that the “Can't be blocked” badge is absent.
- Around line 210-218: Update the test case for the temporary can't-be-blocked
badge to interact with the badge trigger—by hovering or focusing the element
labeled “Can't be blocked”—before asserting the “(from Test Equipment)” tooltip
text. Verify the tooltip is visible after opening it rather than merely present
in the portal.

In `@client/src/components/board/PermanentCard.tsx`:
- Around line 143-154: Update CantBeBlockedBadge in PermanentCard so it does not
occupy the existing bottom-left badge slot used by Ring Bearer and class-level
indicators. Reuse the shared overlay stack if available, or assign a
non-overlapping position that preserves visibility of all coexisting badges.

In `@crates/engine/tests/integration/temporary_cant_be_blocked_view.rs`:
- Around line 44-89: Add a positive reach guard for permanent_recipient after
evaluate_layers, confirming its static_definitions contains the permanent
CantBeBlocked mode before the negative temporary_cant_be_blocked assertion. Keep
the existing recipient guard and ensure the new assertion verifies the
Duration::Permanent grant reached the evaluated state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d8dd693f-97eb-4c01-8084-49cd4cc5b4e8

📥 Commits

Reviewing files that changed from the base of the PR and between b056ad6 and aa76deb.

📒 Files selected for processing (13)
  • client/src/adapter/types.ts
  • client/src/components/board/PermanentCard.tsx
  • client/src/components/board/__tests__/PermanentCard.test.tsx
  • client/src/i18n/locales/de/game.json
  • client/src/i18n/locales/en/game.json
  • client/src/i18n/locales/es/game.json
  • client/src/i18n/locales/fr/game.json
  • client/src/i18n/locales/it/game.json
  • client/src/i18n/locales/pl/game.json
  • client/src/i18n/locales/pt/game.json
  • crates/engine/src/game/derived_views.rs
  • crates/engine/tests/integration/main.rs
  • crates/engine/tests/integration/temporary_cant_be_blocked_view.rs

Comment thread client/src/components/board/__tests__/PermanentCard.test.tsx Outdated
Comment thread client/src/components/board/__tests__/PermanentCard.test.tsx
Comment thread client/src/components/board/PermanentCard.tsx Outdated
Comment thread crates/engine/tests/integration/temporary_cant_be_blocked_view.rs
@github-actions

Copy link
Copy Markdown

Parse changes introduced by this PR

✓ No card-parse changes detected.

@matthewevans
matthewevans added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit 40a36f6 Jul 25, 2026
14 checks passed
@matthewevans
matthewevans deleted the ship/show-temporary-unblockable-effects branch July 25, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant