generated from coulomb/repo-seed
Some checks failed
Test / test (push) Has been cancelled
Closes the IHF improvement loop. Full antifragility chain now traversable: Widget → Annotation → Candidate → Requirement → Decision → Deployment → OutcomeSignal New artifacts: - DeploymentRecord (immutable, links DecisionRecord to a deployed version) - OutcomeSignal (append-only; DB trigger prevents UPDATE/DELETE) - ChangeEvaluation (one-per-deployment; UNIQUE constraint; 1–5 score) New capabilities: - DeploymentRecordsController (index, show, new, create) - RecordOutcomeSignalAction — capture improved/regressed/neutral/inconclusive signals - Pre/post comparison panel on deployment show (±30-day event/annotation counts) - Regression detection — improved signal followed by high/critical annotation - ChangeEvaluation — idempotent score+rationale per deployment - Recurrence tracking — cycle count per widget, leaderboard - AntifragilityDashboardAction (autoRefresh, 5 panels) per hub - Phase 4 integration tests (T01–T08 logic coverage) - docs/phase4-summary.md; SCOPE.md updated to Phase 4 complete State Hub: workstream 07e9c860 → completed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
72 lines
2.9 KiB
Haskell
72 lines
2.9 KiB
Haskell
module Web.FrontController where
|
|
|
|
import IHP.RouterPrelude
|
|
import IHP.LoginSupport.Middleware
|
|
import Generated.Types
|
|
import Web.Types
|
|
import Web.Routes ()
|
|
|
|
-- Controllers
|
|
import Web.Controller.Hubs ()
|
|
import Web.Controller.Widgets ()
|
|
import Web.Controller.InteractionEvents ()
|
|
import Web.Controller.Annotations ()
|
|
import Web.Controller.AnnotationThreads ()
|
|
import Web.Controller.RequirementCandidates ()
|
|
import Web.Controller.Requirements ()
|
|
import Web.Controller.DecisionRecords ()
|
|
import Web.Controller.DeploymentRecords ()
|
|
import Web.Controller.Sessions ()
|
|
|
|
instance FrontController WebApplication where
|
|
controllers =
|
|
[ parseRoute @SessionsController
|
|
, parseRoute @HubsController
|
|
, parseRoute @WidgetsController
|
|
, parseRoute @InteractionEventsController
|
|
, parseRoute @AnnotationsController
|
|
, parseRoute @AnnotationThreadsController
|
|
, parseRoute @RequirementCandidatesController
|
|
, parseRoute @RequirementsController
|
|
, parseRoute @DecisionRecordsController
|
|
, parseRoute @DeploymentRecordsController
|
|
]
|
|
|
|
instance InitControllerContext WebApplication where
|
|
initContext = do
|
|
setLayout defaultLayout
|
|
initAuthentication @User
|
|
|
|
defaultLayout :: Layout
|
|
defaultLayout inner = [hsx|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>inter-hub</title>
|
|
{autoRefreshMeta}
|
|
<link rel="stylesheet" href="/app.css" />
|
|
<script src="/vendor/morphdom.js"></script>
|
|
<script src="/vendor/ihp-auto-refresh.js"></script>
|
|
</head>
|
|
<body class="bg-gray-50 text-gray-900">
|
|
<nav class="bg-white border-b border-gray-200 px-6 py-3 flex items-center gap-6">
|
|
<a href={HubsAction} class="font-semibold text-indigo-600">inter-hub</a>
|
|
<a href={HubsAction} class="text-sm text-gray-600 hover:text-gray-900">Hubs</a>
|
|
<a href={WidgetsAction} class="text-sm text-gray-600 hover:text-gray-900">Widgets</a>
|
|
<a href={RequirementCandidatesAction} class="text-sm text-gray-600 hover:text-gray-900">Candidates</a>
|
|
<a href={RequirementsAction} class="text-sm text-gray-600 hover:text-gray-900">Requirements</a>
|
|
<a href={DecisionRecordsAction} class="text-sm text-gray-600 hover:text-gray-900">Decisions</a>
|
|
<a href={DeploymentRecordsAction} class="text-sm text-gray-600 hover:text-gray-900">Deployments</a>
|
|
<div class="ml-auto">
|
|
<a href={DeleteSessionAction} class="text-sm text-gray-500 hover:text-gray-700">Sign out</a>
|
|
</div>
|
|
</nav>
|
|
<main class="max-w-5xl mx-auto px-6 py-8">
|
|
{inner}
|
|
</main>
|
|
</body>
|
|
</html>
|
|
|]
|