Skip to content

feat(dashboard): summaries + editor controls for the 5 new gate types#10

Merged
Ch4s3 merged 15 commits into
claude/friendly-sinoussi-bf98bafrom
claude/dashboard-new-gate-types
May 23, 2026
Merged

feat(dashboard): summaries + editor controls for the 5 new gate types#10
Ch4s3 merged 15 commits into
claude/friendly-sinoussi-bf98bafrom
claude/dashboard-new-gate-types

Conversation

@Ch4s3

@Ch4s3 Ch4s3 commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #6. PR #6 added five new gate types (:variant, :rule, :segment, :prerequisite, :schedule) with construction, storage, and evaluation, but never touched the LiveView dashboard — flags using them rendered a blank summary and had no editor controls. This PR closes that gap in three layers:

  1. Summaries (lib/bandera/dashboard/components.ex): summary_parts/1 now renders all five new types — variant weights (variants blue 50%, green 50%), rule constraint count (rule (2 constraints)), segment/prerequisite counts (mirroring actors/groups), and schedule windows (scheduled <from> → <until>, with open-ended handling).
  2. Editor controls (lib/bandera/dashboard/flags_live.ex): five new fieldsets with create/remove for variants (weight map), rules (full attribute + 10-operator + comma-split-values constraint builder), segments (by name), prerequisites (parent flag <select> + on/off polarity), and schedules (ISO-8601 from/until). Uncontrolled-form pattern, consistent flash/validation, and the boolean toggle is unchanged.
  3. Symmetric clear API (lib/bandera.ex): PR Tier 1 feature gap improvements (all 9 features) #6 added create options but no matching clear; this adds clear(flag, variant: true | rule: true | for_segment: name | requires: parent | schedule: true), keyed on the correct Gate.id/1 slot. @pr Tier 1 feature gap improvements (all 9 features) #6 author — these clear/2 clauses complete your API surface; flagging for your review since they logically belong with the gate types.

Targets claude/friendly-sinoussi-bf98ba, not main — it depends on the gate types from #6 and can't merge until #6 does.

Test plan

  • mix test — 371 passed (81 doctests, 8 properties, 282 tests), 13 excluded (redis)
  • mix format --check-formatted clean
  • mix compile --warnings-as-errors clean
  • New tests: per-type summary cases (components_test.exs), per-type add/remove + validation in the LiveView (flags_live_test.exs), and per-type clear/2 cases in the matching feature test files.

Notes / follow-ups

  • Pre-existing clear_percentage handler doesn't clear :flash_error on success — now the lone outlier among clear/remove handlers (this PR aligned remove_actor/remove_group). Trivial one-line follow-up, left out of scope.

🤖 Generated with Claude Code

Ch4s3 added 15 commits May 22, 2026 16:47
Switch coverage from Mix's built-in tool to ExCoveralls so coverage can
be uploaded to coveralls.io and surfaced as a README badge.

- mix.exs: add :excoveralls (test-only), set test_coverage tool to
  ExCoveralls, add cli/0 preferred_envs so `mix coveralls` runs in :test.
- coveralls.json: port the old ignore_modules to skip_files (file paths)
  and the 85% threshold to coverage_options.minimum_coverage. ExCoveralls
  filters by file path, not module.
- CI: replace `mix test --cover` with `mix coveralls.github` (uploads)
  plus `mix coveralls` (enforces the 85% gate in-repo, unchanged behavior).
- README: add the Coveralls badge.
ci: add test coverage badge via ExCoveralls
docs: fix coverage badge URL case
The Ecto persistence adapter is backend-agnostic (standard column types,
runtime-bound table, no DB-specific SQL) and SQLite is the backend the test
suite runs against, but the README only mentioned Postgres. Note :ecto_sqlite3
in the deps comment and add a short backend-agnostic note to the Ecto section.
docs: document SQLite as a supported Ecto backend
Tier 1 feature gap improvements (all 9 features)
…gate-types

# Conflicts:
#	test/bandera/prerequisites_test.exs
#	test/bandera/rules_test.exs
@Ch4s3
Ch4s3 merged commit a1c6960 into claude/friendly-sinoussi-bf98ba May 23, 2026
2 checks passed
@Ch4s3
Ch4s3 deleted the claude/dashboard-new-gate-types branch May 23, 2026 08:01
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