Let decision-approaches wrap at narrow widths and sync key-resource scopes.

The info-box checkboxes overflowed in a squeezed column; wrapping them and offering those scopes as chips on every approach keeps the sidebar and Applicable Scope selection in sync without publishing unchecked keys as defaults.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-24 16:27:06 -06:00
co-authored by Cursor
parent 38fe0e7e9b
commit b1ca1a748e
19 changed files with 567 additions and 56 deletions
@@ -10,6 +10,7 @@ import {
decisionApproachPresetFor,
membershipPresetFor,
} from "./finalReviewChipPresets";
import { withoutDecisionApproachKeyResourceLabels } from "./decisionApproachKeyResources";
function stringArraysEqual(a: readonly string[], b: readonly string[]): boolean {
if (a.length !== b.length) return false;
@@ -51,8 +52,14 @@ export function decisionApproachFacetMatchesPreset(
const p = decisionApproachPresetFor(cardId);
return (
details.corePrinciple === p.corePrinciple &&
stringArraysEqual(details.applicableScope, p.applicableScope) &&
stringArraysEqual(details.selectedApplicableScope, p.selectedApplicableScope) &&
stringArraysEqual(
withoutDecisionApproachKeyResourceLabels(details.applicableScope),
withoutDecisionApproachKeyResourceLabels(p.applicableScope),
) &&
stringArraysEqual(
withoutDecisionApproachKeyResourceLabels(details.selectedApplicableScope),
withoutDecisionApproachKeyResourceLabels(p.selectedApplicableScope),
) &&
details.stepByStepInstructions === p.stepByStepInstructions &&
details.consensusLevel === p.consensusLevel &&
details.objectionsDeadlocks === p.objectionsDeadlocks