feat(chat): generative UI structured components (PR #210 rebased on develop) - #415
Draft
esafwan wants to merge 1 commit into
Draft
feat(chat): generative UI structured components (PR #210 rebased on develop)#415esafwan wants to merge 1 commit into
esafwan wants to merge 1 commit into
Conversation
Cherry-picked from PR #210 (dev/huf-generative-ui-evaluation-ec71, commit 20ea060) onto develop. Re-implements the MessageContentWithArtifacts integration against develop's shared parsing pipeline (parseMessagePreviewContent + messageId prop + safe decodeHtmlEntities) instead of the PR's pre-refactor shape; UI components are extracted first, preserving parse order UI -> JSX -> web-preview -> artifact. Parser relocated from frontend/src/utils/uiComponentParser.ts to frontend/src/components/chat/ui-components/uiComponentParser.ts to stay within the allowed change scope. Fixes latent TS2339 union-type errors in Area/Line chart renderers and a stale 'lazy-loaded' comment in registry.ts. Docs commits 5b928aa and a55b25e (docs/evaluations/*) intentionally omitted: outside allowed scope.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Repairs #210 (Generative UI: structured component system for rich chat responses). The original branch was 4 months stale and bot-authored; 14 of 16 files were conflict-free, and the one conflicting file (
MessageContentWithArtifacts.tsx) is re-implemented here against develop's shared parsing pipeline (parseMessagePreview). Docs-only commits (docs/evaluations/*) deliberately not carried over.Scope (14 files, +943)
frontend/src/components/chat/ui-components/:uiComponentParser.ts(relocated parser, import paths adjusted to develop's layout) + renderers (ProgressCard, StatsCard, etc.)MessageContentWithArtifacts.tsx: re-implemented against the shared pipelinetypes/artifact.types.tsand chat integration wiringKey decisions
components/chat/ui-components/uiComponentParser.ts(develop layout), not the PR's original path.uiComponentParser.test.ts) is tracked as a follow-up (suite can't run on develop until fix(tests): migrate off deprecated FrappeTestCase so the suite runs on Frappe 16 #407 lands anyway).Agent contributions
Intake dossier + repair (cherry-pick + conflict re-implementation + verification) by the release-orchestration pipeline; the pipeline verified the diff (14 files, in-scope).
Tests executed
npx tsc -b,npx vite build,npx eslinton changed dirs — all green.yarn buildgreen,/hufserves 200.Risks and limitations
Rollback
Revert the branch; chat falls back to plain message rendering.
Remaining work
uiComponentParser.test.ts(dossier T4) after fix(tests): migrate off deprecated FrappeTestCase so the suite runs on Frappe 16 #407.