fix(WP-0017/E3): Layer 3 error fixes — controllers and views
Fix compilation errors across 6 controllers and 29 views: import cleanup, ResponseException pattern for API auth, type fixes, unused import removal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
58cad31042
commit
c40f11d657
35 changed files with 96 additions and 116 deletions
|
|
@ -54,16 +54,7 @@ instance View AdapterCompatibilityDashboardView where
|
|||
</div>
|
||||
</div>
|
||||
{renderCoverageBar adapterBacked nativeCount}
|
||||
{forEach coverageBySpec (\(sid, cnt) ->
|
||||
let mSpec = find (\s -> s.id == sid) specs
|
||||
label = maybe "(unknown)" (.name) mSpec
|
||||
in [hsx|
|
||||
<div class="flex items-center gap-3 mt-2 text-xs text-gray-600">
|
||||
<span class="bg-purple-100 text-purple-700 px-1.5 py-0.5 rounded">{label}</span>
|
||||
<span>{show cnt} widgets</span>
|
||||
</div>
|
||||
|]
|
||||
)}
|
||||
{forEach coverageBySpec (renderCoverageSpecRow specs)}
|
||||
</div>
|
||||
|
||||
<!-- Panel 3: Contract versions in use -->
|
||||
|
|
@ -116,6 +107,17 @@ instance View AdapterCompatibilityDashboardView where
|
|||
in sortBy (comparing (Down . snd))
|
||||
[ (sid, length (filter (== sid) assigned)) | sid <- specIds ]
|
||||
|
||||
renderCoverageSpecRow :: [WidgetAdapterSpec] -> (Id WidgetAdapterSpec, Int) -> Html
|
||||
renderCoverageSpecRow ss (sid, cnt) =
|
||||
let mSpec = find (\s -> s.id == sid) ss
|
||||
label = maybe "(unknown)" (.name) mSpec
|
||||
in [hsx|
|
||||
<div class="flex items-center gap-3 mt-2 text-xs text-gray-600">
|
||||
<span class="bg-purple-100 text-purple-700 px-1.5 py-0.5 rounded">{label}</span>
|
||||
<span>{show cnt} widgets</span>
|
||||
</div>
|
||||
|]
|
||||
|
||||
renderActiveSpecsTable :: [WidgetAdapterSpec] -> Html
|
||||
renderActiveSpecsTable [] = [hsx|<p class="text-sm text-gray-400">No active adapter specs.</p>|]
|
||||
renderActiveSpecsTable ss = [hsx|
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ instance View AntifragilityDashboardView where
|
|||
{renderRecurrenceSection recurrenceLeaderboard widgets}
|
||||
</div>
|
||||
|]
|
||||
where
|
||||
where
|
||||
deployedIds = map (.id) allDeployments
|
||||
openGaps = filter (\d -> any (\r -> r.decisionId == d.id) allImplRefs
|
||||
&& not (any (\dp -> dp.decisionId == d.id) allDeployments))
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ instance View GovernanceDashboardView where
|
|||
</table>
|
||||
</div>
|
||||
|]
|
||||
where
|
||||
where
|
||||
awaitingDecision = filter (isAwaitingDecision allDecisions) allRequirements
|
||||
regressedWidgets = filter (\w -> w.id `elem` regressionWidgetIds) widgets
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue