Skip to content

feat: selectable strategies per goal in setup wizard#20

Merged
pkey merged 13 commits intomainfrom
feat/selectable-strategies
Mar 19, 2026
Merged

feat: selectable strategies per goal in setup wizard#20
pkey merged 13 commits intomainfrom
feat/selectable-strategies

Conversation

@pkey
Copy link
Collaborator

@pkey pkey commented Mar 18, 2026

Summary

Adds per-goal strategy selection in the setup wizard - profiles pre-select specific strategies, manual goal selection pre-selects all (this what backend does if no strategies are sent).

Additional notable changes + many small ones

  • Sticky navigation bar at the bottom of the wizard
  • Save button writes config to disk via POST /api/save, prints next-steps in UI and terminal cc @Viehzeug
  • Allow copy to clipboard
  • support for --json-file-output - some customers already rely on this.

Screenshots

image image

Base automatically changed from feat/profiles to main March 18, 2026 13:09
@pkey pkey force-pushed the feat/selectable-strategies branch 2 times, most recently from e4fc974 to fe9809a Compare March 18, 2026 23:37
@pkey pkey self-assigned this Mar 18, 2026
- Add per-goal strategy selection using checkable Tag components
- Profiles pre-select specific strategies; manual goal check pre-selects all
- Wizard writes attacks (with strategy) to YAML instead of plain goals
- Sync attacks form field via useEffect when strategies/goals change
- Add GoalStep tests for strategy visibility, selection, and toggling
@pkey pkey force-pushed the feat/selectable-strategies branch from fe9809a to 8207155 Compare March 18, 2026 23:42
pkey added 10 commits March 19, 2026 00:15
- Always show strategy tags for all goals, not just checked ones
- Unchecked tags render with visible border instead of disappearing
- Title-case goal and strategy names for readability
- Prevent text selection on profile cards and strategy tags
- Prevent checkbox toggle when clicking strategy tags
- Uncheck goal when all its strategies are deselected
- Selecting a strategy on unchecked goal also checks the goal
- Force blue fill on checked checkboxes for dark theme visibility
- Use userEvent instead of fireEvent for reliable CI checkbox clicks
- Strategies lack context when displayed as bare names
- Fetch /api/strategies to get descriptions, show on hover via Tooltip
- Add "Profiles" heading above profile cards
- Goals step has many items and buttons scroll out of view
- Constrain layout to viewport height so main area scrolls
- Sticky bar with opaque background covers content beneath
- Inline form errors below goals were invisible when scrolled up
- Show step-specific error next to the button (e.g. "Select at least one goal")
- Auto-clear error when the failing fields are satisfied via Form.useWatch
- Error scoped to originating step so it doesn't leak across navigation
- Save writes redteam.yaml to the working directory via POST /api/save
- Prints next-steps message in both the UI and the terminal
- Copy button on YAML preview and in the sticky bar
- Download simplified to always use redteam.yaml (no filename modal)
- Defaults to redteam.yaml but respects the original config path
- Tooltips and success message reflect the actual filename
- Save button last as primary CTA, Copy and Download before it
- Missing fields alert shown below step title for better visibility
- Use filepath.Base to strip directory components from user-supplied filename
- Prevents writing files outside the working directory via ../
@pkey pkey marked this pull request as ready for review March 19, 2026 01:24
@pkey pkey requested a review from a team as a code owner March 19, 2026 01:24
- Centralized in ProcessResults alongside HTML file output
- Both commands share the same output processing path
@pkey pkey force-pushed the feat/selectable-strategies branch from 4be7906 to 7c8c0c2 Compare March 19, 2026 01:38
@pkey pkey requested review from SH4DY, Viehzeug and mlw157 March 19, 2026 01:52
- Mismatched font sizes between the two success alerts
- Connection alert was not dismissible unlike save alert
- Both now use title+description layout and are closable
- Gitignore redteam.yaml to avoid committing test artifacts
@pkey pkey force-pushed the feat/selectable-strategies branch from 2a2e245 to 54e901b Compare March 19, 2026 01:53
@pkey pkey merged commit 685efbe into main Mar 19, 2026
9 checks passed
@pkey pkey deleted the feat/selectable-strategies branch March 19, 2026 11:20
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.

2 participants