ConusAI vendor 81941888f

This commit is contained in:
ConusAI vendor 81941888f
2026-10-07 08:47:51 +00:00
commit c3c6526952
135 changed files with 13010 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
export { AuditPage } from './ui/AuditPage'
+11
View File
@@ -0,0 +1,11 @@
import { AuditTimeline } from '@/widgets/audit-timeline'
export function AuditPage() {
return (
<main>
<h1>Audit</h1>
<p>Every change this app made, as the platform recorded it.</p>
<AuditTimeline />
</main>
)
}
+1
View File
@@ -0,0 +1 @@
export { DashboardPage } from './ui/DashboardPage'
+25
View File
@@ -0,0 +1,25 @@
import { CreateNoteForm } from '@/features/create-note'
import { SimulateTrafficButton } from '@/features/simulate-traffic'
import { UsageMeter } from '@/widgets/usage-meter'
import { Attachments } from '@/widgets/attachments'
import { EnableCard } from '@/widgets/enable-card'
import { ModulePanel } from '@/widgets/module-panel'
import { NoteList } from '@/widgets/note-list'
export async function DashboardPage({ searchParams }: { searchParams: Promise<{ q?: string }> }) {
const { q } = await searchParams
return (
<main>
<h1>ConusAI Showcase</h1>
<p>Notes with attachments, audited, observed and metered.</p>
<CreateNoteForm />
<SimulateTrafficButton />
<UsageMeter />
<NoteList extra={(noteId) => <Attachments noteId={noteId} />} />
<ModulePanel query={q} enable={(service) => <EnableCard service={service} />} />
<p>
<a href="/audit">Audit timeline</a> · <a href="/platform">Platform</a>
</p>
</main>
)
}
+1
View File
@@ -0,0 +1 @@
export { PlatformPage } from './ui/PlatformPage'
+28
View File
@@ -0,0 +1,28 @@
import { platformInfo } from '@/shared/api'
import { getEnv, modules } from '@/shared/config'
/**
* The platform's own description, read through the typed API (plan §4.4), and the
* optional services this deployment is linked to. The platform has no token-accessible
* listing of a project's services (D8), so the linked list is read from the variables
* the platform injected at deploy time.
*/
export async function PlatformPage() {
const info = await platformInfo()
const linked = modules(getEnv())
return (
<main>
<h1>Platform</h1>
<h2>Linked services</h2>
<ul>
{(Object.keys(linked) as Array<keyof typeof linked>).map((name) => (
<li key={name}>
{name}: {linked[name] ? 'linked' : 'not linked'}
</li>
))}
</ul>
<h2>Description</h2>
<pre>{JSON.stringify(info, null, 2)}</pre>
</main>
)
}