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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user