Stop seeding 75% consensus on custom decision cards so wizard copy shows on the published rule.

Wire Back on the final-review chip editor to the same dismiss path as close, instead of a no-op.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-31 11:28:32 -06:00
co-authored by Cursor
parent 7f67cc6271
commit 511c3efb4c
20 changed files with 531 additions and 36 deletions
@@ -1078,6 +1078,7 @@ export function FinalReviewChipEditModal({
<Create
isOpen={isOpen && !addCustomWizardOpen}
onClose={handleModalClose}
onBack={handleModalClose}
backdropVariant="blurredYellow"
headerContent={headerContent}
showNextButton={true}
@@ -80,19 +80,21 @@ function DecisionApproachEditFieldsComponent({
onChange={(v) => patch("stepByStepInstructions", v)}
disabled={readOnly}
/>
<IncrementerBlock
label={t.sectionHeadings.consensusLevel}
helpIcon={false}
value={value.consensusLevel}
min={CONSENSUS_LEVEL_MIN}
max={CONSENSUS_LEVEL_MAX}
step={CONSENSUS_LEVEL_STEP}
onChange={(next) => patch("consensusLevel", next)}
formatValue={(v) => `${v}%`}
decrementAriaLabel="Decrease consensus level"
incrementAriaLabel="Increase consensus level"
disabled={readOnly}
/>
{value.consensusLevel !== undefined ? (
<IncrementerBlock
label={t.sectionHeadings.consensusLevel}
helpIcon={false}
value={value.consensusLevel}
min={CONSENSUS_LEVEL_MIN}
max={CONSENSUS_LEVEL_MAX}
step={CONSENSUS_LEVEL_STEP}
onChange={(next) => patch("consensusLevel", next)}
formatValue={(v) => `${v}%`}
decrementAriaLabel="Decrease consensus level"
incrementAriaLabel="Increase consensus level"
disabled={readOnly}
/>
) : null}
<ModalTextAreaField
label={t.sectionHeadings.objectionsDeadlocks}
value={value.objectionsDeadlocks}
+5 -1
View File
@@ -85,7 +85,11 @@ export type DecisionApproachDetailEntry = {
applicableScope: string[];
selectedApplicableScope: string[];
stepByStepInstructions: string;
consensusLevel: number;
/**
* Catalog presets always set this. User-authored custom cards omit it until
* the author adds a proportion field or edits consensus in the facet form.
*/
consensusLevel?: number;
objectionsDeadlocks: string;
};
@@ -14,8 +14,8 @@ export interface CommunityRuleEntry {
/** Plain text; split on blank lines into paragraphs when rendering. */
body: string;
/**
* When set, rendered as Figma-style label + body stacks. If non-empty, takes
* precedence over {@link body} for main content (body may be empty).
* Figma-style label + body stacks (facet sections, wizard fields). Shown
* after {@link body} when both are present.
*/
blocks?: CommunityRuleLabeledBlock[];
}
@@ -45,7 +45,7 @@ function CommunityRuleView({
<TextBlock
key={entryIndex}
title={entry.title}
body={hasBlocks ? undefined : entry.body}
body={entry.body}
rows={hasBlocks ? entry.blocks : undefined}
/>
);
@@ -94,9 +94,10 @@ function TextBlockView({
>
<p className={`${ENTRY_TITLE_CLASS} w-full min-w-0`}>{title}</p>
<div className="flex min-w-0 flex-col gap-3">
{body.trim().length > 0 ? <ParagraphGroup text={body} /> : null}
{hasRows
? rows!.map((row, i) => <LabeledRowView key={i} row={row} />)
: body.trim().length > 0 && <ParagraphGroup text={body} />}
: null}
</div>
</div>
);