Skip to content

[AI-stack FB0] fresh-ui: register the ai collection + chat primitives as manifest items (PREREQUISITE) #253

Description

@rickylabs

Verify and close the gap on ai collection resolution so netscript ui:add ai is a proven, regression-guarded entry point onto the 7 chat primitives.

Context

Part of epic #238 · cluster fresh-ui · wave v1-min · depends-on none.

This is the entry point for the whole fresh-ui plane of #238: FA-series chat/gen-ui slices assume
ui:add ai already resolves, so it must land (or be confirmed) before any of them are scheduled.

Problem / motivation

packages/fresh-ui/registry.manifest.ts already carries manifest entries for all 7 chat primitives
(message, tool-call-card, code-block, chart-block, citation-chip, model-selector,
prompt-input, plus avatar) and an ai collection (registered in PR #190) listing
theme-seed, citation-chip, model-selector, tool-call-card, prompt-input, message, command-palette, search. What is unverified is the full resolution path: avatar, code-block, and chart-block
are only reachable transitively through message's registryDependencies, not as explicit
collection members, and there is no CLI regression test asserting netscript ui:add ai actually
resolves end to end through packages/cli/src/kernel/application/ui/registry.ts and the
CLI-embedded registry.generated.ts mirror (built via .llm/tools/generate-cli-assets-barrel.ts).
Today an eis-chat-style consumer would have to hand-verify this by reading source; there is no
codified guarantee.

Scope

Ships

  • Explicit review of the ai collection's items list in packages/fresh-ui/registry.manifest.ts:
    add avatar, code-block, chart-block as explicit members if direct (non-transitive)
    resolution is required for ui:add UX, or record why transitive-only is sufficient. The 7
    primitive + avatar manifest entries (registryDependencies + css) are verified, not
    re-authored.
  • Regenerate/confirm packages/fresh-ui/registry.generated.ts is in sync with the manifest via
    .llm/tools/generate-cli-assets-barrel.ts.
  • CLI regression test (packages/cli/src/public/features/ui/registry.test.ts or sibling) asserting
    netscript ui:add ai resolves the full item set, including chart-block/code-block/avatar
    transitively or explicitly.
  • Subsumes ui:add-wiring verification: confirm the add-ui-command.ts resolution path
    (packages/cli/src/public/features/ui/add/add-ui-command.ts) copies files + css for every
    resolved item without missing targets.

Out of scope

  • Markdown/inline-markup rendering inside message — owned by a later FA markdown slice.
  • Chat-render orchestration (thread state, streaming render) — owned by fresh/ai chat-render slice.
  • MCP tool surfacing in tool-call-card — owned by the MCP slice.
  • Generative-UI renderer composition — owned by the gen-ui slice.
  • New component authoring — all 7 primitives + avatar already exist as component files/tests.

Public surface

  • packages/fresh-ui/registry.manifest.ts: ai collection items array (add avatar,
    code-block, chart-block if scoped in), no new manifest item names.
  • packages/fresh-ui/registry.generated.ts: regenerated mirror of the above (build artifact, not
    hand-edited).
  • New/updated test file under packages/cli/src/public/features/ui/ asserting ui:add ai
    resolution (exact file TBD by implementer; extend registry.test.ts if it already covers
    collection resolution).

Acceptance & fitness gates

  • netscript ui:add ai resolves and copies all files for every item in the collection
    (directly or transitively), with no missing @ui/*.tsx / @assets/ui/*.css targets.
  • CLI regression test added/extended proving the ai collection resolves deterministically
    (item list + registryDependencies closure).
  • registry.generated.ts matches registry.manifest.ts (regenerated, no manual drift).
  • F-5: any manifest/description text touched still respects the public-surface doc conventions
    used elsewhere in registry.manifest.ts.
  • gate:e2e — deno task e2e:cli run scaffold.runtime --cleanup --format pretty covers a
    project that runs ui:add ai and type-checks the resulting workspace cleanly.

Dependencies

None (depends-on: []). This slice is a prerequisite for the rest of the fresh-ui wave in the #238
DAG checklist (GitHub numbers tracked there); it is not blocked by #239.

Size

S

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions