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:
@@ -22,7 +22,13 @@ instance View EditView where
|
||||
|
||||
renderForm :: WidgetOwnership -> [Hub] -> Html
|
||||
renderForm ownership hubs = formFor ownership [hsx|
|
||||
{(selectField #stewardHubId hubs){ fieldLabel = "Steward Hub (optional)" }}
|
||||
<div>
|
||||
<label class="ihp-form-label">Steward Hub (optional)</label>
|
||||
<select name="stewardHubId" class="ihp-form-field">
|
||||
<option value="">— None —</option>
|
||||
{forEach hubs renderHubOption}
|
||||
</select>
|
||||
</div>
|
||||
{(selectField #ownershipType ownershipTypes){ fieldLabel = "Ownership Type" }}
|
||||
{dateTimeField #effectiveUntil}
|
||||
{textareaField #notes}
|
||||
@@ -31,3 +37,6 @@ renderForm ownership hubs = formFor ownership [hsx|
|
||||
where
|
||||
ownershipTypes :: [(Text, Text)]
|
||||
ownershipTypes = [("local","local"), ("delegated","delegated"), ("global","global")]
|
||||
|
||||
renderHubOption :: Hub -> Html
|
||||
renderHubOption h = [hsx|<option value={tshow h.id}>{h.name}</option>|]
|
||||
|
||||
@@ -24,7 +24,13 @@ renderForm :: WidgetOwnership -> [Widget] -> [Hub] -> Html
|
||||
renderForm ownership widgets hubs = formFor ownership [hsx|
|
||||
{(selectField #widgetId widgets) { fieldLabel = "Widget" }}
|
||||
{(selectField #ownerHubId hubs) { fieldLabel = "Owner Hub" }}
|
||||
{(selectField #stewardHubId hubs){ fieldLabel = "Steward Hub (optional)" }}
|
||||
<div>
|
||||
<label class="ihp-form-label">Steward Hub (optional)</label>
|
||||
<select name="stewardHubId" class="ihp-form-field">
|
||||
<option value="">— None —</option>
|
||||
{forEach hubs renderHubOption}
|
||||
</select>
|
||||
</div>
|
||||
{(selectField #ownershipType ownershipTypes){ fieldLabel = "Ownership Type" }}
|
||||
{dateTimeField #effectiveFrom}
|
||||
{dateTimeField #effectiveUntil}
|
||||
@@ -34,3 +40,6 @@ renderForm ownership widgets hubs = formFor ownership [hsx|
|
||||
where
|
||||
ownershipTypes :: [(Text, Text)]
|
||||
ownershipTypes = [("local","local"), ("delegated","delegated"), ("global","global")]
|
||||
|
||||
renderHubOption :: Hub -> Html
|
||||
renderHubOption h = [hsx|<option value={tshow h.id}>{h.name}</option>|]
|
||||
|
||||
Reference in New Issue
Block a user