Skip to content

feat: GM toggle to disable individual Edge actions (#863)#896

Merged
Jasrags merged 1 commit into
mainfrom
feature/863-work
Apr 14, 2026
Merged

feat: GM toggle to disable individual Edge actions (#863)#896
Jasrags merged 1 commit into
mainfrom
feature/863-work

Conversation

@Jasrags

@Jasrags Jasrags commented Apr 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire the existing disabledEdgeActionIds house rule into canUseEdgeAction so disabled actions are rejected with a GM-disabled reason.
  • EdgeActionSelector now accepts disabledActionIds and hides disabled buttons (returns null when every action for the timing is disabled).
  • Replace the "not yet editable" placeholder in HouseRulesForm with per-action checkboxes for the six SR5 Edge actions (Push the Limit, Second Chance, Seize the Initiative, Blitz, Close Call, Dead Man's Trigger).

Closes #863.

Test plan

  • pnpm test — 505 files / 10524 tests pass
  • pnpm type-check — clean
  • New unit tests in edge-actions.test.ts covering the disabled-by-GM branch and an empty disabled list
  • New component tests in EdgeActionSelector.test.tsx covering per-timing hiding and the fully-disabled-null render
  • Manual: campaign settings → Dice & Combat → toggle Edge action checkboxes; verify CombatActionFlow hides disabled buttons once the campaign value is plumbed through (selector prop is in place)

Wire the existing `disabledEdgeActionIds` house rule into the rule
engine and UI:

- `canUseEdgeAction` now rejects actions listed in
  `context.disabledActionIds` with a clear GM-disabled reason.
- `EdgeActionSelector` accepts `disabledActionIds` and hides disabled
  buttons (returning null when every action for the timing is disabled).
- `HouseRulesForm` renders per-action checkboxes for the six SR5 Edge
  actions (Push the Limit, Second Chance, Seize the Initiative, Blitz,
  Close Call, Dead Man's Trigger), replacing the "not yet editable"
  placeholder.
- Add tests covering the disabled-action branch in both the rule engine
  and the selector component.
@Jasrags Jasrags self-assigned this Apr 14, 2026
@Jasrags Jasrags merged commit 511e8ba into main Apr 14, 2026
3 checks passed
@Jasrags Jasrags deleted the feature/863-work branch April 14, 2026 15:54
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.

feat: GM toggle — Edge action enable/disable

1 participant