Skip to content

feat: Agentic Craft port — React 19, Tailwind v4, conversation + agent components, manifest, release CI - #3

Merged
terraboops merged 9 commits into
mainfrom
agentic-craft-port
Jun 11, 2026
Merged

terraboops merged 9 commits into
mainfrom
agentic-craft-port

Conversation

@terraboops

Copy link
Copy Markdown
Collaborator

Summary

Integrates the long-lived agentic-craft-port branch into main. Production pin has been running bundles built from this branch for weeks — this PR makes the source history match reality and adds a release pipeline so hand-copied builds are dead.

Commits:

  • React 19 + Tailwind v4 + Agentic Craft visual port — Preact → React, react-dom/server.edge for v8go, polyfills, @theme tokens, static <details>-based collapse (no client JS)
  • Conversation + tool-call expansion — Conversation/UserMessage/AssistantMessage/SystemMessage/Thinking, ToolCall args→<dl>, fail state, ToolCallGroup/ToolTree, Finding/Steps refinements
  • Component manifest extraction — ts-morph + JSDoc convention → componentManifest global, drives pin components CLI + /api/library
  • Subagent + ToolCall prose output — Agent Card-style subagent render, outputType="prose" for Skill bodies
  • Release CI — every main push publishes bundle.iife.global.js (+ sha256) as a GitHub Release asset, tagged vYYYY.MM.DD.r<run>

Downstream

pin gains an auto-bump workflow (separate PR) that fetches the latest release asset and opens a bundle-bump PR when it changes.

Test plan

  • CI green on branch (typecheck, 14 vitest tests, build, bundle self-containment check)
  • Release workflow fires on merge and publishes the asset (validated post-merge)

🤖 Generated with Claude Code

terraboops and others added 9 commits May 28, 2026 23:54
A long text value like "@bitcomplete.io" at 1.9rem monospace overflows
the KPI card boundary in a grid track, because:
- the value had no overflow-wrap setting
- the card had no min-width: 0 (so grid couldn't shrink it)

Add overflow-wrap: anywhere + word-break: break-word to the value/label/
trend, and min-width: 0 on the card so it actually participates in grid
shrinking. Numeric values stay big and bold; text values wrap to 2 lines
at the same size.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch from Preact static-HTML to React 19 + Tailwind v4 inside the v8go
sandbox. Vendor agentic-craft's `tool-call` and `tool-tree` from their
shadcn registry verbatim. Rewrite the remaining components (TLDR, KPI,
Callout, Steps, Compare, Finding, Approval, Timeline, Tag, Status, Diff,
Section, Quote, Code, Diagram) using Tailwind classes that mirror
Agentic Craft's editorial visual language, with `data-slot` markers so
each can be swapped for an upstream registry equivalent later.

Build pipeline:
- Tailwind v4 CLI compiles src/styles/tailwind.css → dist/styles.css
- scripts/embed-css.mjs writes it as a TS string for tsup to inline
- tsup bundles the IIFE with React + react-dom/server.edge
- Polyfills (TextEncoder/TextDecoder/AbortController) for v8go

Bundle: 512 KB → 760 KB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Catch-up commit covering the UX audit + tool-call work that shipped
to pin (tags 16-18) and the conversation components needed by the
share-session rewrite. Bundle is already deployed; this just commits
the source-of-truth alongside.

- New <Conversation> / <UserMessage> / <AssistantMessage> /
  <SystemMessage> / <Thinking> (src/components/ui/conversation.tsx)
- ToolCall expanded panel: JSON args parse into a <dl> definition
  list under an ARGS label; output gets its own OUTPUT label;
  status="fail" turns ERROR
- Steps: rounded card frame + colored dot per status, no
  line-through (status="done" means "verified", not "obsolete")
- Finding: bulleted prose format, severity-colored dot
- Theme tokens moved into @theme so Tailwind v4 actually generates
  bg-card / bg-muted / text-foreground utilities

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each exported component now carries a JSDoc with summary, @category,
and @example. scripts/extract-manifest.mjs walks every export via
ts-morph, pulls description + type + JSDoc tags + parameter defaults,
and emits dist/manifest.json + src/components/manifest.ts. The
IIFE bundle exposes the manifest at globalThis.componentManifest so
pin can serve it through /api/library at runtime.

Type aliases (CalloutType, KPITone, Severity, …) expand to their
literal unions in the output so agents reading `pin components` get
the actual permitted values, not opaque names. Built-in types
(boolean, React.ReactNode) are kept as-is to avoid bloating the
output with synthetic unions.

Build wire-up: pnpm build:manifest runs first in pnpm build, before
the CSS+JS passes. CI catches missing JSDoc because the extractor
exits non-zero with a clear pointer at the offending file — no
silent fallback to derived metadata.

Tests:
  - manifest.test.ts validates 28 components, Callout shape, no
    internal primitives leak in
  - compile.test.ts switched from `bc-*` class checks to data-slot
    checks (carry-over from the agentic-craft port that hadn't
    been updated)
  - vitest.config.ts adds the @/ → src/ alias that vitest needs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Subagent renders Agent (Task) tool calls as a named identity card —
prompt collapsed into details, agent's report rendered as prose.
Inspired by agentic-craft's Agent Card pattern.

ToolCall gains outputType="prose" so Skill bodies render as real
markdown instead of monospace pre. Default stays "code" for raw
shell / JSON output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Releases dist/bundle.iife.global.js (+ sha256) as a GitHub Release
asset, tagged vYYYY.MM.DD.r<run>. Downstream consumers fetch the
asset instead of hand-copying local builds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Releases become intentional: bump package.json version in a PR,
merge, and the workflow publishes that version to npm with
provenance, tags vX.Y.Z, and attaches the bundle to a GitHub Release.
Unchanged-version pushes are no-ops.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Temporary unblock while @bitcomplete npm org access is pending: the
GitHub Release (tag vX.Y.Z + bundle asset + sha256) is the artifact
channel. The npm publish step self-gates on NPM_TOKEN presence, so
configuring the secret later turns on npm publishing with no workflow
change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@terraboops
terraboops merged commit ec3ecbd into main Jun 11, 2026
1 check passed
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