From 0aaeb7d25c09c16736cabfc4550142cf45ce5bf7 Mon Sep 17 00:00:00 2001 From: Cyber-preacher Date: Wed, 11 Feb 2026 12:09:31 +0400 Subject: [PATCH] feat(proposals): harden kind/type/preset flow and align threshold-facing UX copy - stabilize proposal wizard selection flow (kind -> type -> preset) - enforce forced vs selectable Formation/Policy behavior from preset availability - keep system/project preset boundaries explicit in UI wiring - align glossary/page hints with phase-66 governing activity threshold semantics - update related preset registry tests --- src/data/pageHints.ts | 2 +- src/data/vortexopedia.ts | 8 ++++---- src/pages/proposals/ProposalCreation.tsx | 7 ++++++- .../proposals/proposalCreation/presets/registry.ts | 13 +------------ .../proposalCreation/steps/EssentialsStep.tsx | 4 ++++ tests/unit/proposal-presets.test.ts | 1 - 6 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/data/pageHints.ts b/src/data/pageHints.ts index 4b8478f..6a5060f 100644 --- a/src/data/pageHints.ts +++ b/src/data/pageHints.ts @@ -168,7 +168,7 @@ export const pageHints: Record = { { heading: "Governing threshold", items: [ - "Era, time left, and required vs completed actions (pool votes, chamber votes, court actions, proposals).", + "Era, time left, and required vs completed actions (pool votes, chamber votes).", "Stay above threshold to remain active in quorum for the next era.", ], }, diff --git a/src/data/vortexopedia.ts b/src/data/vortexopedia.ts index f262476..4a7a2f4 100644 --- a/src/data/vortexopedia.ts +++ b/src/data/vortexopedia.ts @@ -923,7 +923,7 @@ export const vortexopediaTerms: VortexopediaTerm[] = [ long: [ "Era = 168 epochs; each epoch is ~4 hours.", "Active if bioauthenticated and node ran 164/168 epochs and required actions met in previous era.", - "Required actions include voting/upvoting/downvoting proposals or chamber votes.", + "Required actions include proposal-pool votes and chamber votes.", ], tags: ["era", "quorum", "activity", "governance"], related: ["governor", "proof_of_governance_pog"], @@ -1387,7 +1387,7 @@ export const vortexopediaTerms: VortexopediaTerm[] = [ "You are comfortably above the governing threshold pace for the current era. Status scale: Ahead → Stable → Falling behind → At risk → Losing status.", long: [ "Ahead means you have already met (or are well on track to exceed) the era’s action threshold early, leaving a buffer for the rest of the era.", - "Staying Ahead typically requires continuing normal participation (votes/upvotes/court actions) while maintaining node uptime.", + "Staying Ahead typically requires continuing normal participation (pool votes and chamber votes) while maintaining node uptime.", "This status is based on your completed actions vs required actions for the current governing era, not on proposal outcomes.", ], tags: ["status", "governance", "threshold", "governor", "activity"], @@ -1457,7 +1457,7 @@ export const vortexopediaTerms: VortexopediaTerm[] = [ "You are below the desired pace for the era’s governing threshold, but can still recover by completing more actions. Status scale: Ahead → Stable → Falling behind → At risk → Losing status.", long: [ "Falling behind indicates you are not yet at the target action pace for the current era, but your deficit is still manageable.", - "To move back toward Stable, complete additional required actions (e.g., proposal pool votes, chamber votes, court actions) before the era ends.", + "To move back toward Stable, complete additional required actions (proposal-pool votes and chamber votes) before the era ends.", "This status is meant to prompt action early enough to avoid becoming At risk.", ], tags: ["status", "governance", "threshold", "governor", "activity"], @@ -1492,7 +1492,7 @@ export const vortexopediaTerms: VortexopediaTerm[] = [ "You are unlikely to meet the governing threshold without immediate additional actions. Status scale: Ahead → Stable → Falling behind → At risk → Losing status.", long: [ "At risk means your current action count is far enough below the era requirement that you may lose active governor status for the next era if you do not act.", - "To improve: complete additional required actions (pool votes, chamber votes, court actions, proposals) before the era ends and maintain node uptime.", + "To improve: complete additional required actions (pool votes and chamber votes) before the era ends and maintain node uptime.", "This status summarizes your action deficit; it does not imply slashing or permanent removal—only loss of active quorum eligibility in the next era.", ], tags: ["status", "governance", "threshold", "governor", "activity"], diff --git a/src/pages/proposals/ProposalCreation.tsx b/src/pages/proposals/ProposalCreation.tsx index 9b5ffb0..1430cde 100644 --- a/src/pages/proposals/ProposalCreation.tsx +++ b/src/pages/proposals/ProposalCreation.tsx @@ -113,6 +113,11 @@ const ProposalCreation: React.FC = () => { persistPresetId(""); return; } + if (preset.templateId !== templateKind) { + persistPresetId(""); + setPresetId(""); + return; + } setDraft((prev) => { const shouldSoftApply = !presetInitialized.current; presetInitialized.current = true; @@ -135,7 +140,7 @@ const ProposalCreation: React.FC = () => { return next; }); persistPresetId(preset.id); - }, [presetId]); + }, [presetId, templateKind]); useEffect(() => { const handle = window.setTimeout(() => { diff --git a/src/pages/proposals/proposalCreation/presets/registry.ts b/src/pages/proposals/proposalCreation/presets/registry.ts index a27dd2c..9e60434 100644 --- a/src/pages/proposals/proposalCreation/presets/registry.ts +++ b/src/pages/proposals/proposalCreation/presets/registry.ts @@ -48,7 +48,6 @@ export type ProposalPresetId = | "project.core.delegation" | "project.core.security.policy" | "project.core.protocol-upgrades.policy" - | "project.admin.governor-tiers.policy" | "project.admin.formation.policy" | "project.admin.chamber-rules.policy" | "project.admin.veto.policy" @@ -504,16 +503,6 @@ export const PROPOSAL_PRESETS: ProposalPreset[] = [ formationEligible: false, recommendedChamber: "Engineering chamber", }, - { - id: "project.admin.governor-tiers.policy", - label: "Governor tiers", - description: "Update governor tiers, rights, and obligations.", - templateId: "project", - proposalType: "dao-core", - formationEligible: false, - recommendedChamber: "General chamber", - defaultChamberId: "general", - }, { id: "project.admin.formation.policy", label: "Formation procedures", @@ -626,7 +615,7 @@ export const PROPOSAL_PRESETS: ProposalPreset[] = [ }, { id: "project.dao_core.new-node-types.policy", - label: "Human node types", + label: "Human nodes types", description: "Creation of new types of human nodes.", templateId: "project", proposalType: "dao-core", diff --git a/src/pages/proposals/proposalCreation/steps/EssentialsStep.tsx b/src/pages/proposals/proposalCreation/steps/EssentialsStep.tsx index e518a43..eb6c67b 100644 --- a/src/pages/proposals/proposalCreation/steps/EssentialsStep.tsx +++ b/src/pages/proposals/proposalCreation/steps/EssentialsStep.tsx @@ -248,6 +248,10 @@ export function EssentialsStep(props: { const nextType = e.target .value as ProposalDraftForm["proposalType"]; setHasChosenType(true); + if (templateId === "system") { + // Keep kind stable even when this type has no system presets. + onTemplateChange("system"); + } setDraft((prev) => ({ ...prev, proposalType: nextType, diff --git a/tests/unit/proposal-presets.test.ts b/tests/unit/proposal-presets.test.ts index 9bc8955..3a98bad 100644 --- a/tests/unit/proposal-presets.test.ts +++ b/tests/unit/proposal-presets.test.ts @@ -181,7 +181,6 @@ test("preset registry contains full v1 proposal tree ids", () => { "project.core.delegation", "project.core.security.policy", "project.core.protocol-upgrades.policy", - "project.admin.governor-tiers.policy", "project.admin.formation.policy", "project.admin.chamber-rules.policy", "project.admin.veto.policy",