Skip to content

OpenUI<>Crayon variables parity - #417

Closed
pr3khar wants to merge 7 commits into
mainfrom
crayon-openui-variables-parity
Closed

OpenUI<>Crayon variables parity#417
pr3khar wants to merge 7 commits into
mainfrom
crayon-openui-variables-parity

Conversation

@pr3khar

@pr3khar pr3khar commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

ankit-thesys and others added 7 commits March 25, 2026 11:53
This commit prepares the OpenUI react-ui package for c1's migration
from @crayonai/react-ui. It adds the Share Thread feature natively
to OpenUI and fixes chart export naming.

Share Thread (new feature):
- Add ShareThread component, ShareThreadModal (Radix Dialog), and
  supporting hooks (useShareThread, useShareMessages)
- Add generateShareLink prop to SharedChatUIProps — when provided,
  a share button appears in the chat header for all three variants
- Wire into FullScreen (MobileHeader + ThreadHeader), Copilot (Header),
  and BottomTray (Header)
- Add @radix-ui/react-dialog dependency
- Add storybook stories for all three variants with share link

Charts exports fix:
- Remove Scrollable* aliases from Charts/index.ts — export AreaChart,
  BarChart, LineChart under their original names (matching subpath
  exports and consumer expectations)
- Fix genui-lib chart condensed imports to use correct paths

Shell Thread fixes:
- Export AssistantMessageComponent type from _shared/types
- Minor fixes to Shell, CopilotShell, BottomTray Thread components

Checkpoint: openui-comp side of c1 migration is complete. The c1 repo
(composition) has separate commits for Phases 1-6 covering the full
migration from @crayonai to @openuidev.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace generateShareLink((messages) => url) with
generateShareLink((threadId) => url). The consumer's backend
looks up messages by threadId — no need to pass the full message
array client-side.

Changes:
- Delete useShareMessages.ts (message selection no longer needed)
- Rewrite useShareThread.ts to get selectedThreadId from store
- Update ShareThread props and types to (threadId: string)
- Remove Message type import from SharedChatUIProps

This is a cleaner API that avoids message format conversion
concerns and simplifies the hook from ~130 lines to ~28 lines.

Checkpoint: Share Thread feature complete with threadId-based API.
Builds on 8552f33 which added the initial messages-based version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ocs-design

Made-with: Cursor

# Conflicts:
#	pnpm-lock.yaml
@pr3khar pr3khar closed this Apr 2, 2026
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