Skip to content

feat(reskinnable-demo): generative UI in Intelligence trajectories, analytics, and agent-ready Ledgerline setup - #7762

Merged
davidmckayv merged 8 commits into
mainfrom
david/ledgerline-intelligence-genui
Oct 10, 2026
Merged

davidmckayv merged 8 commits into
mainfrom
david/ledgerline-intelligence-genui

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #7570. Brings the Ledgerline Automatic Learning demo's Intelligence screens and chat up to presenter quality, and documents setup so anyone (or their coding agent) can run it from main. All changes are inside examples/showcases/reskinnable-demo.

Intelligence screens (/intelligence)

  • Generative UI inside trajectories: where the agent drew a card, the timeline now renders Ledgerline's own React components, read-only (clicks blocked, API calls refused), labelled Generative UI · <Component> · toolName. Covered: close status card, review card (incl. confirmed), report card and table, learned-skill card, and the ChatGPT MCP App for ChatGPT trajectories. The screens moved into a (workspace) route group so these render with the app's own styles.
  • Grouped tool calls: consecutive agent tool calls collapse into one row (count, duration, tool chips, error count), even when the in-app agent and ChatGPT interleave. Each group expands on its own.
  • Insight evidence draws in the trajectory view's look (agent bubble, click, screen, network and tool rows) instead of plain quotes.
  • Product Analytics and Product Insights are real screens: activity by surface, tool usage under Ledgerline's tool names, refusal codes, live month-end close numbers, and insights citing today's trajectories.
  • A published skill's drawer shows its Supporting Insights instead of "unavailable on this server version".

Ledgerline chat

  • Each run of tool calls collapses to its newest line until prose or a card arrives. The newest line shimmers while the agent works, and +N expands that run. Lines are hidden in the same frame they arrive, so the chat does not jump.

Docs

  • src/skins/ledgerline/README.md now opens with setup a person or a coding agent can follow (install, .env, run, reset, ChatGPT via a Cloudflare quick tunnel), the four-exception story, and the click-by-click demo script.

Reskin skill impact: none. No skin was added, renamed or removed, and nothing under .claude/skills/reskin/ changes.

Verification

  • tsc --noEmit is clean. The vitest suites for src/intelligence-ui and src/skins/ledgerline pass, and so does the full app suite. ESLint reports 0 errors on the changed files.
  • Driven in Chrome on a reset server: the agent fails on Priya's card, a person clears the four exceptions and closes September, Learn runs and the skill is approved, and the skill closes Marcus's card in the app. Each Intelligence screen was screenshotted after that run, and the tool-run collapse was checked live.

Summary by CodeRabbit

  • New Features
    • Added Product Analytics and Product Insights pages, with activity metrics, tool reliability data, live month-end status, and linked trajectories and skills.
    • Trajectory details can now display recorded interactive UI, reports, review cards, and supporting evidence timelines.
    • Consecutive tool calls in chat are grouped and can be expanded to view the full run.
    • Product Analytics and Product Insights are now accessible from workspace navigation.
  • Improvements
    • Learning evidence now connects cited messages and events to their supporting trajectory steps.
    • Skill details show supporting insights when available.

…n its drawer

Published skills now carry the Insights they rest on, so the skill drawer
lists them with their evidence instead of saying they are unavailable.
…ectories

Wherever the agent drew UI, a trajectory now shows Ledgerline's own React
component, read-only, from the props the call recorded: the close status
card, the review card (receipts read back in full, confirmed state
included), the report card and table, and the learned-skill card. Each one
renders at /intelligence/genui/<trajectory>/<step> in a frame the
trajectory view keeps alive across re-renders, with clicks blocked and
every API call refused. ChatGPT's cards are Ledgerline's MCP App hosted
through an AppBridge, and show the month closed once the card's Confirm
closed it.

The workspace screens move into a (workspace) route group so the gen UI
page carries the app's styles rather than the shell's. The hand-drawn
stand-ins in the trajectory view are gone, key moments add the learned
skill and the confirmed close, and the seeded history carries report cards
in the app and in ChatGPT.
…dgerline

Product Analytics shows the week's runtime activity by surface, tool usage
by the agent's real tool names in the app and over MCP, reliability with
the Ledgerline API's refusal codes and the trajectories the agent failed,
and the month-end close read live from the Card close board. Product
Insights lists frictions, opportunities and wins, each citing its
trajectories (today's captured closes included) and its Automatic Learning
skill once it exists. Both are live in the sidebar.
Consecutive agent-trace steps now collapse into one group row even when two
threads interleave, and a lone tool call is a group of one, so tool calls no
longer sit in the timeline as separate cards. The summary shows the call
count, total duration, one chip per tool with a count, and an error count.
Groups are keyed by their first step, so expanding one run no longer opens
every run from the same thread.
…s look

Each cited moment carries the step it came from, so the evidence browser
draws agent messages as the agent bubble, clicks, network calls and page
views as product event cards, and tool calls as trace cards, stacked on the
trajectory rail for the drawer's narrow column. Quotes are matched to their
message, tool result, screen label or network call; anything unmatched
still shows as a plain quote.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: CopilotKit/CopilotKit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91bb4b47-6186-4055-9eef-5dde476e0e57

📥 Commits

Reviewing files that changed from the base of the PR and between 04bc56a and 354e8a0.


📒 Files selected for processing (45)
  • examples/showcases/reskinnable-demo/src/app/api/learning/v1/trajectories/[id]/agui/route.ts
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/analytics/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/evals/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/export/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/fine-tune/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/insights/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/layout.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/learning/[container]/[[...tab]]/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/learning/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/overview/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/threads/[id]/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/trajectories/[id]/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/(workspace)/trajectories/page.tsx
  • examples/showcases/reskinnable-demo/src/app/intelligence/genui/[trajectoryId]/[stepId]/page.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/SOURCES.md
  • examples/showcases/reskinnable-demo/src/intelligence-ui/data/contract.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/genui/chatgpt-widget.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/genui/derive.test.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/genui/derive.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/genui/genui-view.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/genui/registry.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/genui/server.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/learning/evidence-step.module.css
  • examples/showcases/reskinnable-demo/src/intelligence-ui/learning/evidence-step.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/learning/learning-api.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/learning/learning-drawers.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/learning/learning-evidence-browser.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/ledgerline-learning-api.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/ledgerline/analytics-data.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/screens/analytics-screen.module.css
  • examples/showcases/reskinnable-demo/src/intelligence-ui/screens/analytics-screen.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/screens/insights-screen.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/screens/overview-screen.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/seed/history.ts
  • examples/showcases/reskinnable-demo/src/intelligence-ui/shell/intelligence-shell.tsx
  • examples/showcases/reskinnable-demo/src/intelligence-ui/trajectory-view/SOURCE.md
  • examples/showcases/reskinnable-demo/src/intelligence-ui/trajectory-view/adapter.js
  • examples/showcases/reskinnable-demo/src/intelligence-ui/trajectory-view/index.html
  • examples/showcases/reskinnable-demo/src/skins/ledgerline/README.md
  • examples/showcases/reskinnable-demo/src/skins/ledgerline/genui/views.ts
  • examples/showcases/reskinnable-demo/src/skins/ledgerline/learned-skills.tsx
  • examples/showcases/reskinnable-demo/src/skins/ledgerline/mcp-app/main.tsx
  • examples/showcases/reskinnable-demo/src/skins/ledgerline/theme.css
  • examples/showcases/reskinnable-demo/src/skins/ledgerline/tools.tsx

 ________________________________________________________________
< I like what you did here. I don't like *that* you did it here. >
 ----------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@davidmckayv
davidmckayv added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 190338b Oct 10, 2026
20 of 21 checks passed
@davidmckayv
davidmckayv deleted the david/ledgerline-intelligence-genui branch October 10, 2026 18:13
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.

2 participants