generated from coulomb/repo-seed
fix(WP-0014/A2): close remaining pure-param and structural compilation errors
Convert all remaining `<- paramOrNothing / param / paramOrDefault /
currentUserOrNothing` monadic binds to `let` — these functions are pure
(ImplicitParams-based) in IHP v1.5, so `<-` is a type error in an IO
do-block.
Controllers fixed:
AgentDelegations, AiGovernancePolicies, Annotations, ApiConsumers,
CollectiveProposals, DecisionRecords, DeploymentRecords,
HubCapabilityManifests, HubRoutingRules, InstitutionalKnowledge,
OutcomeCorrelations, RequirementCandidates, TypeRegistries,
WebhookSubscriptions, Widgets,
Api/V2/{Annotations,InteractionEvents,Token}
WebhookSubscriptions: remove orphaned `Right () ->` case arm that was
left inside a bare `unless` block (structural parse error).
Also carries forward all in-progress fixes from the working tree:
helpers (AgentBridge, ApiRateLimit, BottleneckDetector,
CrossHubPropagation, FrictionScore),
views (CanSelect instances, HSX lambda extraction, formFor wrappers),
env/build (envrc GHCi perms, flake.nix Tailwind + GHC resource limits,
static/app.css additional Tailwind output).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -93,7 +93,25 @@ instance View ShowAnnotationCategoryView where
|
||||
</div>
|
||||
|]
|
||||
|
||||
typeForm :: AnnotationCategoryRegistry -> [Hub] -> Bool -> Html
|
||||
instance View NewAnnotationCategoryView where
|
||||
html NewAnnotationCategoryView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={AnnotationCategoryRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Annotation Categories</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Annotation Category</h1>
|
||||
{formFor entry (typeForm entry hubs True)}
|
||||
|]
|
||||
|
||||
instance View EditAnnotationCategoryView where
|
||||
html EditAnnotationCategoryView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={AnnotationCategoryRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Annotation Categories</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Annotation Category</h1>
|
||||
{formFor entry (typeForm entry hubs False)}
|
||||
|]
|
||||
|
||||
typeForm :: (?context :: ControllerContext, ?formContext :: FormContext AnnotationCategoryRegistry) => AnnotationCategoryRegistry -> [Hub] -> Bool -> Html
|
||||
typeForm entry hubs isNew = [hsx|
|
||||
<div class="bg-white rounded-lg border border-gray-200 p-6 max-w-lg">
|
||||
<div class="space-y-4">
|
||||
@@ -119,29 +137,7 @@ typeForm entry hubs isNew = [hsx|
|
||||
</div>
|
||||
|]
|
||||
|
||||
instance View NewAnnotationCategoryView where
|
||||
html NewAnnotationCategoryView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={AnnotationCategoryRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Annotation Categories</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Annotation Category</h1>
|
||||
<form method="POST" action={CreateAnnotationCategoryAction}>
|
||||
{typeForm entry hubs True}
|
||||
</form>
|
||||
|]
|
||||
|
||||
instance View EditAnnotationCategoryView where
|
||||
html EditAnnotationCategoryView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={AnnotationCategoryRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Annotation Categories</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Annotation Category</h1>
|
||||
<form method="POST" action={UpdateAnnotationCategoryAction (entry.id)}>
|
||||
{typeForm entry hubs False}
|
||||
</form>
|
||||
|]
|
||||
|
||||
renderNameField :: Bool -> Text -> Html
|
||||
renderNameField :: (?context :: ControllerContext, ?formContext :: FormContext AnnotationCategoryRegistry) => Bool -> Text -> Html
|
||||
renderNameField True _ = [hsx|
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Name <span class="text-gray-400 text-xs">(permanent, lowercase-underscored)</span></label>
|
||||
|
||||
@@ -93,7 +93,25 @@ instance View ShowEventTypeView where
|
||||
</div>
|
||||
|]
|
||||
|
||||
typeForm :: EventTypeRegistry -> [Hub] -> Bool -> Html
|
||||
instance View NewEventTypeView where
|
||||
html NewEventTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={EventTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Event Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Event Type</h1>
|
||||
{formFor entry (typeForm entry hubs True)}
|
||||
|]
|
||||
|
||||
instance View EditEventTypeView where
|
||||
html EditEventTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={EventTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Event Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Event Type</h1>
|
||||
{formFor entry (typeForm entry hubs False)}
|
||||
|]
|
||||
|
||||
typeForm :: (?context :: ControllerContext, ?formContext :: FormContext EventTypeRegistry) => EventTypeRegistry -> [Hub] -> Bool -> Html
|
||||
typeForm entry hubs isNew = [hsx|
|
||||
<div class="bg-white rounded-lg border border-gray-200 p-6 max-w-lg">
|
||||
<div class="space-y-4">
|
||||
@@ -119,29 +137,7 @@ typeForm entry hubs isNew = [hsx|
|
||||
</div>
|
||||
|]
|
||||
|
||||
instance View NewEventTypeView where
|
||||
html NewEventTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={EventTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Event Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Event Type</h1>
|
||||
<form method="POST" action={CreateEventTypeAction}>
|
||||
{typeForm entry hubs True}
|
||||
</form>
|
||||
|]
|
||||
|
||||
instance View EditEventTypeView where
|
||||
html EditEventTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={EventTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Event Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Event Type</h1>
|
||||
<form method="POST" action={UpdateEventTypeAction (entry.id)}>
|
||||
{typeForm entry hubs False}
|
||||
</form>
|
||||
|]
|
||||
|
||||
renderNameField :: Bool -> Text -> Html
|
||||
renderNameField :: (?context :: ControllerContext, ?formContext :: FormContext EventTypeRegistry) => Bool -> Text -> Html
|
||||
renderNameField True _ = [hsx|
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Name <span class="text-gray-400 text-xs">(permanent, lowercase-underscored)</span></label>
|
||||
|
||||
@@ -93,7 +93,25 @@ instance View ShowPolicyScopeView where
|
||||
</div>
|
||||
|]
|
||||
|
||||
typeForm :: PolicyScopeRegistry -> [Hub] -> Bool -> Html
|
||||
instance View NewPolicyScopeView where
|
||||
html NewPolicyScopeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={PolicyScopeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Policy Scopes</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Policy Scope</h1>
|
||||
{formFor entry (typeForm entry hubs True)}
|
||||
|]
|
||||
|
||||
instance View EditPolicyScopeView where
|
||||
html EditPolicyScopeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={PolicyScopeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Policy Scopes</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Policy Scope</h1>
|
||||
{formFor entry (typeForm entry hubs False)}
|
||||
|]
|
||||
|
||||
typeForm :: (?context :: ControllerContext, ?formContext :: FormContext PolicyScopeRegistry) => PolicyScopeRegistry -> [Hub] -> Bool -> Html
|
||||
typeForm entry hubs isNew = [hsx|
|
||||
<div class="bg-white rounded-lg border border-gray-200 p-6 max-w-lg">
|
||||
<div class="space-y-4">
|
||||
@@ -119,29 +137,7 @@ typeForm entry hubs isNew = [hsx|
|
||||
</div>
|
||||
|]
|
||||
|
||||
instance View NewPolicyScopeView where
|
||||
html NewPolicyScopeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={PolicyScopeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Policy Scopes</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Policy Scope</h1>
|
||||
<form method="POST" action={CreatePolicyScopeAction}>
|
||||
{typeForm entry hubs True}
|
||||
</form>
|
||||
|]
|
||||
|
||||
instance View EditPolicyScopeView where
|
||||
html EditPolicyScopeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={PolicyScopeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Policy Scopes</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Policy Scope</h1>
|
||||
<form method="POST" action={UpdatePolicyScopeAction (entry.id)}>
|
||||
{typeForm entry hubs False}
|
||||
</form>
|
||||
|]
|
||||
|
||||
renderNameField :: Bool -> Text -> Html
|
||||
renderNameField :: (?context :: ControllerContext, ?formContext :: FormContext PolicyScopeRegistry) => Bool -> Text -> Html
|
||||
renderNameField True _ = [hsx|
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Name <span class="text-gray-400 text-xs">(permanent, lowercase-hyphenated)</span></label>
|
||||
|
||||
@@ -94,7 +94,25 @@ instance View ShowWidgetTypeView where
|
||||
</div>
|
||||
|]
|
||||
|
||||
typeForm :: WidgetTypeRegistry -> [Hub] -> Bool -> Html
|
||||
instance View NewWidgetTypeView where
|
||||
html NewWidgetTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={WidgetTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Widget Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Widget Type</h1>
|
||||
{formFor entry (typeForm entry hubs True)}
|
||||
|]
|
||||
|
||||
instance View EditWidgetTypeView where
|
||||
html EditWidgetTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={WidgetTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Widget Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Widget Type</h1>
|
||||
{formFor entry (typeForm entry hubs False)}
|
||||
|]
|
||||
|
||||
typeForm :: (?context :: ControllerContext, ?formContext :: FormContext WidgetTypeRegistry) => WidgetTypeRegistry -> [Hub] -> Bool -> Html
|
||||
typeForm entry hubs isNew = [hsx|
|
||||
<div class="bg-white rounded-lg border border-gray-200 p-6 max-w-lg">
|
||||
<div class="space-y-4">
|
||||
@@ -120,29 +138,7 @@ typeForm entry hubs isNew = [hsx|
|
||||
</div>
|
||||
|]
|
||||
|
||||
instance View NewWidgetTypeView where
|
||||
html NewWidgetTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={WidgetTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Widget Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Register Widget Type</h1>
|
||||
<form method="POST" action={CreateWidgetTypeAction}>
|
||||
{typeForm entry hubs True}
|
||||
</form>
|
||||
|]
|
||||
|
||||
instance View EditWidgetTypeView where
|
||||
html EditWidgetTypeView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={WidgetTypeRegistryAction} class="text-sm text-gray-500 hover:text-gray-700">← Widget Types</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">Edit Widget Type</h1>
|
||||
<form method="POST" action={UpdateWidgetTypeAction (entry.id)}>
|
||||
{typeForm entry hubs False}
|
||||
</form>
|
||||
|]
|
||||
|
||||
renderNameField :: Bool -> Text -> Html
|
||||
renderNameField :: (?context :: ControllerContext, ?formContext :: FormContext WidgetTypeRegistry) => Bool -> Text -> Html
|
||||
renderNameField True _ = [hsx|
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Name <span class="text-gray-400 text-xs">(permanent identifier, lowercase-hyphenated)</span></label>
|
||||
|
||||
Reference in New Issue
Block a user