generated from coulomb/repo-seed
feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
Implements IHUB-WP-0009: closes four GAAF-2026 gaps before domain hub work begins. - TypeRegistry helper + controllers/views (hub_kind, hub_capability_manifest) - HubCapabilityManifest entity with validation and registry linkage - ARCHITECTURE-LAYERS.md + CI-enforced boundary contracts - Alembic migration 1743724800, fitness tests (Test/Architecture/) - GAAF spec, Operational Architecture spec, domain hub extension guide - Updates to CLAUDE.md, SCOPE.md, Schema.sql, Routes, FrontController, Types state_hub_sync: pending (tunnel was STALE at completion time; run fix-consistency) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
55
Web/View/HubCapabilityManifests/New.hs
Normal file
55
Web/View/HubCapabilityManifests/New.hs
Normal file
@@ -0,0 +1,55 @@
|
||||
module Web.View.HubCapabilityManifests.New where
|
||||
|
||||
import Web.Types
|
||||
import Generated.Types
|
||||
import IHP.Prelude
|
||||
import IHP.ViewPrelude
|
||||
|
||||
data NewView = NewView
|
||||
{ manifest :: !HubCapabilityManifest
|
||||
, hubs :: ![Hub]
|
||||
}
|
||||
|
||||
instance View NewView where
|
||||
html NewView { .. } = [hsx|
|
||||
<div class="mb-4">
|
||||
<a href={HubCapabilityManifestsAction} class="text-sm text-gray-500 hover:text-gray-700">
|
||||
← Capability Manifests
|
||||
</a>
|
||||
</div>
|
||||
<h1 class="text-xl font-semibold mb-6">New Capability Manifest</h1>
|
||||
<div class="bg-amber-50 border border-amber-200 rounded p-4 mb-6 text-sm text-amber-800">
|
||||
A capability manifest lets a domain or shared hub declare the widget types, event types,
|
||||
annotation categories, and policy scopes it owns. Create a draft, declare your types,
|
||||
then activate to register them with the framework.
|
||||
</div>
|
||||
<form method="POST" action={CreateHubCapabilityManifestAction}>
|
||||
<div class="bg-white rounded-lg border border-gray-200 p-6 max-w-lg space-y-4">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Hub</label>
|
||||
{selectField #hubId (hubOptions hubs)}
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">
|
||||
Capability Description <span class="text-gray-400 text-xs">(optional)</span>
|
||||
</label>
|
||||
{(textareaField #capabilityDescription) { fieldClass = "w-full border border-gray-300 rounded px-3 py-2 text-sm" }}
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">
|
||||
Contact <span class="text-gray-400 text-xs">(team or person)</span>
|
||||
</label>
|
||||
{(textField #contact) { fieldClass = "w-full border border-gray-300 rounded px-3 py-2 text-sm" }}
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<button type="submit"
|
||||
class="bg-indigo-600 text-white text-sm px-4 py-2 rounded hover:bg-indigo-700">
|
||||
Create Draft
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|]
|
||||
|
||||
hubOptions :: [Hub] -> [(Text, Id Hub)]
|
||||
hubOptions hubs = map (\h -> (h.name <> " (" <> h.hubKind <> ")", h.id)) hubs
|
||||
Reference in New Issue
Block a user