Add Q as a UI component - #360
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new first-class Q surface to @mieweb/ui by wrapping the @mieweb/q agent config generator and exposing it via a dedicated @mieweb/ui/q entry point, plus presets and Storybook examples.
Changes:
- Add
Qwrapper component and presets (qAgentSchema,qTwilioAgentSchema, config factories). - Add
@mieweb/ui/qexport surface + tsup entry for a dedicated bundle boundary. - Add a local TypeScript shim for
@mieweb/qand wire in the@mieweb/qdependency.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tsup.config.ts | Adds q and components/Q build entries; externalizes @mieweb/q. |
| src/q.ts | New @mieweb/ui/q entry re-exporting Q surface. |
| src/components/Q/Q.tsx | Adds Q wrapper around @mieweb/q’s AgentConfigGenerator. |
| src/components/Q/Q.stories.tsx | Adds Storybook examples for Q and presets. |
| src/components/Q/presets.ts | Adds Twilio + agent-only preset schemas and default configs. |
| src/components/Q/mieweb-q.d.ts | Adds local TS module declarations for @mieweb/q (+ /universal and css). |
| src/components/Q/index.ts | Defines the public re-export surface for @mieweb/ui/q. |
| package.json | Adds ./q export and introduces @mieweb/q as peer/dev dependency. |
| pnpm-lock.yaml | Locks @mieweb/q@1.0.0 and its dependency tree. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
pnpm-lock.yaml:7077
@mieweb/qpulls in@mieweb/ui@0.2.4pluslucide-react@0.344.0, whose peer range isreact: ^16.5.1 || ^17 || ^18(but this repo is on React 19). This can lead to peer-dependency warnings/failures in consumer installs (especially with strict peer deps) and potentially duplicate UI copies at runtime.
8319f73 to
b79b74b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (3)
pnpm-lock.yaml:7073
- The lockfile shows
@mieweb/q@1.0.0depends on@mieweb/ui@0.2.4. Adding@mieweb/ui/qmay therefore pull a second, older copy of@mieweb/uiinto consumer installs (in addition to the consumer’s top-level@mieweb/ui), which can lead to duplicated code/CSS and inconsistent component behavior. It would be safer if@mieweb/qtreated@mieweb/uias a peer dependency instead of a hard dependency (or if@mieweb/qwere updated to a version that does).
src/q.ts:1 - The new optional entry point
src/q.tsis missing the usage docblock pattern that the other optional entry points (ag-grid/esheet/kerebron) include. Without it, consumers won't know they need to install the optional peer dependency and likely also need to include@mieweb/q’s stylesheet for correct rendering.
export * from './components/Q';
pnpm-lock.yaml:4352
@mieweb/q@1.0.0pulls inlucide-react@0.344.0, which only declares React peer support up to React 18. Since this package supports React 19, React 19 consumers may see peer-dependency warnings or strict-install failures when adding@mieweb/q. Consider updating@mieweb/qto a build that depends on a React 19-compatiblelucide-react(or otherwise aligning that dependency).
b79b74b to
5564196
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
pnpm-lock.yaml:7172
- The resolved
@mieweb/q@1.0.0dependency graph includes a direct dependency on@mieweb/ui@0.2.4. In consumer projects that install@mieweb/ui(this package) plus@mieweb/qto use@mieweb/ui/q, this can result in two copies of@mieweb/uibeing installed/bundled, which risks duplicated styling/theme/context and increases bundle size.
If possible, prefer a @mieweb/q version that has @mieweb/ui as a peer dependency (or coordinate an upstream change) to avoid shipping a nested UI copy.
pnpm-lock.yaml:4400
@mieweb/qpulls inlucide-react@0.344.0, whose peer dependency range does not include React 19 (react: ^16.5.1 || ^17.0.0 || ^18.0.0). This will produce peer-dependency warnings (and can be install-blocking in repos that treat peer mismatches as errors) for consumers adopting the new Q entry point.
Consider updating to a @mieweb/q release that depends on a lucide-react version that supports React 19 (or getting @mieweb/q updated upstream).
|
Updated Q section headers to neutral gray (neutral-300 / neutral-900) and added dark-mode equivalents (neutral-700 / neutral-300). Also scoped Q form, active-tab, and Reset colors for dark mode, added a DarkMode Storybook story, and verified all five Q a11y stories pass. |
62e863d to
90db940
Compare



Summary
Closes #359.
Adds Q as a UI component backed by
@mieweb/q, with a dedicated@mieweb/ui/qentry point so consumers can import Q directly from the UI package.Changes
Qcomponent wrapper around@mieweb/q'sAgentConfigGenerator.@mieweb/ui/qpackage export and tsup entry.@mieweb/qbecause the published package declares types but does not include the referenced.d.tsfile.Checks
pnpm run typecheckpnpm run lintpnpm run testpnpm run buildpnpm run formatgit diff --check -- package.json pnpm-lock.yaml tsup.config.ts src/q.ts src/components/Q/Q.tsx src/components/Q/Q.stories.tsx src/components/Q/index.ts src/components/Q/mieweb-q.d.ts src/components/Q/presets.tspnpm run build-storybook