Skip to content

Rebuild web-ui against current kernel GraphQL schema (subject model)#2

Merged
Shooksie merged 5 commits into
mainfrom
feat/kernel-schema-rebuild
Jun 16, 2026
Merged

Rebuild web-ui against current kernel GraphQL schema (subject model)#2
Shooksie merged 5 commits into
mainfrom
feat/kernel-schema-rebuild

Conversation

@Shooksie

Copy link
Copy Markdown
Contributor

Rebuild the web-ui against the current kernel GraphQL schema

main is built against a stale GraphQL schema and does not compile against the current kernel: tasks.graphql still queries the removed tasks { statusRaw, taskType, priorityRaw, … } model, and settings-pages.tsx uses workflowConfig / saveAgentProfile — all removed from the kernel during the v0.5 subject-model unification. Running npm run codegen against the current schema fails with ~94 validation errors across 11 operation files.

This PR repoints codegen at the current schema (generated from the now-fully-wired animus-transport-graphql) and rebuilds the UI on the real kernel surface.

What changed

  • Codegen repointed to the current embedded/schema.graphql (subject model, rich Subject with nativeStatus/attachments/statusMetadata, Workflow, QueueEntry.state + QueueStats, DaemonHealth.checks, PluginInfo, subscription root). Codegen now succeeds with 0 errors.
  • Dropped pages with no kernel backend (the source of ~−9k LOC): projects, planning/vision, builder, reviews, settings (workflowConfig/saveAgentProfile gone), plus errors/skills pages whose queries don't exist. Routes/nav/tests/project-context removed accordingly.
  • Rebuilt surviving pages on the subject model: dashboard, tasks→subjects, requirements (kind=requirement), workflows, queue (state), daemon, dispatch (functional via executeWorkflow), plugins, agents, history, ops-map, output.
  • Real-time events via the daemonEvents GraphQL subscription (graphql-ws) instead of the old polling.
  • Subject create/edit: create form + assignee/label edit + status transitions wired to createSubject/updateSubject/setSubjectStatus; mutations invalidate queries so lists refresh (matches CLI behavior).
  • Structured workflow detail rendering instead of a raw JSON dump.
  • Rust wrapper pin bumped to animus-protocol v0.5.12 (restored transport_backend_main).

Verification

  • npm run codegen: 0 errors
  • npm test: 43/43 pass
  • npm run build (vite): builds (2457 modules). The check:performance-budgets post-step fails only on a missing ../embedded/index.html packaging artifact, which is environmental (fails on main too).
  • tsc --noEmit: 20 errors — all pre-existing/unrelated (shadcn asChild typing, implicit-any, etc.); main had 98. No new schema/codegen-driven errors.

Fleet reconciliation note

This supersedes the cosmetic settings cleanup in #1 (settings is dropped — its operations no longer exist in the kernel) and will require the open chore/remove-dead-auto-policy-knobs branch to rebase onto the subject-model surface. Left as TODO for follow-up passes: output-page phase-output rendering, dispatch workflow catalog, daemon logs/pause (no control verb yet), per-workflow live updates.

Pairs with: animus-protocol v0.5.12, animus-transport-graphql v0.1.1, animus-transport-http v0.1.1.

Shooksie added 5 commits June 15, 2026 13:27
…seline)

Repoint codegen at the new full kernel SDL (embedded/schema.graphql) and
get the project to a compiling, build-passing baseline with dead surface
removed.

Schema repoint:
- All GraphQL operations rewritten to the new lean kernel schema: subject
  model (subject/subjectById/subjectNext, createSubject/updateSubject/
  setSubjectStatus), QueueEntry.state + QueueStats, flat Workflow with
  `detail` JSON blob, DaemonHealth.plugins + daemon status + daemonAgents.
  codegen succeeds with 0 errors; generated client regenerated.
- The new schema exposes NO subscription root: the events page is now a
  polled daemon-activity view (daemonAgents + daemonHealth) instead of a
  live subscription.

Pages/operations DELETED (no backend in kernel):
- projects (projects-pages, project-context, projects.graphql)
- planning/vision/requirements-as-distinct (planning-screens, planning.graphql)
- builder (builder-pages, builder.graphql)
- reviews (review-page, reviews.graphql)
- settings (settings-pages, settings.graphql: saveAgentProfile/workflowConfig)
- errors-page, skills-page (no backing queries)
- their router routes, nav entries, and tests

Pages KEPT and updated to new schema (compile + render real data):
- dashboard, tasks->subjects (+ /requirements via kind), workflows, queue,
  daemon, dispatch, events, agents, history, ops-map, output.
- requirements now route to TasksPage with kind=requirement.
- CustomDispatch now functional via executeWorkflow.

Verification: codegen 0 errors; vitest 36/36 pass; vite build passes.
Remaining tsc(tsconfig.app.json) errors are all pre-existing, unrelated
patterns (shadcn Button asChild typing, implicit-any, ReactMarkdown
className) not gated by the build. Several kept pages carry
`// TODO(E-followup): richer rendering` for the later rich-rebuild pass.
…ured workflow detail

- events-page: stream daemonEvents over graphql-ws subscription (replaces poll);
  keep a cheap agents/health snapshot poll alongside the live feed
- add DaemonEvents/WorkflowEvents/SubjectChanged subscription ops + codegen
- tasks: assignee + label add/remove editing on subject detail via updateSubject
- mutations now invalidate all cached queries so lists/detail refresh (CLI parity)
- workflow detail: structured phases/decisions/checkpoints view with collapsible
  fallback for unrecognized detail shapes (no longer a raw JSON dump)
- tests: new events-subject-edit suite (7 tests)
…opped — workflowConfig/saveAgentProfile removed from kernel)

# Conflicts:
#	src/app/settings-pages.tsx
tsc cleanup (20 -> 0 errors, tsconfig.app.json):
- Button asChild -> base-ui render prop (dashboard, queue, shell SheetTrigger)
- shared Markdown: drop unsupported className prop (wrap in div), remove
  unused Badge import + unused code-component props
- shell NAV_GROUPS: explicit NavItem/NavGroup types so flatMap unifies (was
  producing `item: unknown` across shell + tests); fixes nav tuple errors
- test typing: screens.test module index, shell.test route-set widening

Polish TODOs (schema-backed only):
- WorkflowDetailPage: consume workflowEvents(workflowId) subscription -> live
  refetch + "live"/last-event indicator; paused once terminal
- TasksPage: consume subjectChanged(kind) subscription -> live list refetch
- TaskOutputPage: render workflow detail via shared structured WorkflowDetailView
  (phases/decisions/checkpoints) with raw+search fallback toggle

Schema-gap TODOs left with explanatory NOTEs (no backing op in animus-protocol
v0.5.12 schema): dispatch workflow catalog (no definitions query), daemon
logs/pause/resume (only startDaemon exists; stop/restart forbidden; no
pauseDaemon/resumeDaemon/daemonLogs), per-agent output stream.

Adds live-updates.test.tsx (5 tests). 48 tests green, codegen clean,
tsc 0 errors, vite build passes.
@Shooksie
Shooksie merged commit 3c10fd7 into main Jun 16, 2026
1 check failed
@Shooksie
Shooksie deleted the feat/kernel-schema-rebuild branch June 16, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant