-
Notifications
You must be signed in to change notification settings - Fork 0
Update llms.txt import documentation structure #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update llms.txt import documentation structure #110
Conversation
- Add clear import structure section explaining form-aware vs UI components - Update all import examples to use correct paths: - Form-aware components from @lambdacurry/forms - UI components from @lambdacurry/forms/ui - Add comprehensive component reference lists - Fix inconsistent import statements throughout documentation - Update key implementation notes to reflect proper import patterns Requested by Jake Ruesink
|
|
WalkthroughThe documentation for the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
📝 Storybook Preview: View Storybook This preview will be updated automatically when you push new changes to this PR.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
llms.txt (1)
87-106: Clarify identical component names across packages
TextField,Checkbox, etc. exist in both@lambdacurry/forms(form-aware) and@lambdacurry/forms/ui(UI-only). The docs list them in each section, but new readers could miss this subtle distinction and accidentally mix the two. Add an explicit note (one sentence) warning that the identical names refer to different implementations and recommending aliasing (import { TextField as UITextField }) when using both in one file.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
llms.txt(4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: jaruesink
PR: lambda-curry/forms#108
File: llms.txt:94-96
Timestamp: 2025-07-27T21:08:37.677Z
Learning: For the @lambdacurry/forms repository, use top-level imports for ease of implementation rather than specific entry points. Example: `import { TextField, Checkbox, FormError } from '@lambdacurry/forms';` is preferred over individual module imports. This prioritizes developer experience and implementation simplicity.
Learnt from: jaruesink
PR: lambda-curry/forms#108
File: llms.txt:578-579
Timestamp: 2025-07-27T21:10:38.958Z
Learning: The @lambdacurry/forms package exports components at the top level, so `import { FormError, TextField } from '@lambdacurry/forms'` is the correct and preferred import pattern, not component-specific entry points.
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use the required imports for Remix Hook Form integration, Zod, and base UI components in form-aware components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/ui-component-patterns.mdc:0-0
Timestamp: 2025-07-06T02:47:43.432Z
Learning: Follow consistent component architecture patterns as established in lambda-curry/forms
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Keep form-aware components separate from base UI components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to {apps,packages}/**/*.{ts,tsx} : Use package name imports for published packages (e.g., import { TextField } from '@lambdacurry/forms/remix-hook-form')
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/ui/**/*.tsx : Follow the component composition pattern for UI components that accept form integration
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Ensure proper accessibility and validation integration in form components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/*.{tsx,ts} : Form-aware components should be named as ComponentName (e.g., TextField, Checkbox)
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/react-typescript-patterns.mdc:0-0
Timestamp: 2025-07-23T12:47:43.342Z
Learning: Applies to src/{components,hooks}/**/*.{ts,tsx} : Document exported interfaces and components with JSDoc comments including @example usage
llms.txt (24)
Learnt from: jaruesink
PR: #108
File: llms.txt:94-96
Timestamp: 2025-07-27T21:08:37.677Z
Learning: For the @lambdacurry/forms repository, use top-level imports for ease of implementation rather than specific entry points. Example: import { TextField, Checkbox, FormError } from '@lambdacurry/forms'; is preferred over individual module imports. This prioritizes developer experience and implementation simplicity.
Learnt from: jaruesink
PR: #108
File: llms.txt:578-579
Timestamp: 2025-07-27T21:10:38.958Z
Learning: The @lambdacurry/forms package exports components at the top level, so import { FormError, TextField } from '@lambdacurry/forms' is the correct and preferred import pattern, not component-specific entry points.
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to {apps,packages}/**/*.{ts,tsx} : Use package name imports for published packages (e.g., import { TextField } from '@lambdacurry/forms/remix-hook-form')
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use the required imports for Remix Hook Form integration, Zod, and base UI components in form-aware components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Document breaking changes in changelogs
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/ui-component-patterns.mdc:0-0
Timestamp: 2025-07-06T02:47:43.432Z
Learning: Follow consistent component architecture patterns as established in lambda-curry/forms
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use remix-hook-form for form state management and validation
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to {apps,packages}/**/*.{ts,tsx} : Import from specific entry points (e.g., import { TextField } from '@lambdacurry/forms/remix-hook-form/text-field')
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Ensure proper accessibility and validation integration in form components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Applies to packages/components/src/ui/**/*.{ts,tsx} : Don't import from remix-hook-form package in ui components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Always display field-level errors using FormMessage
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Handle both client-side and server-side validation errors in form components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Provide clear, user-friendly error messages in validation
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/*.{tsx,ts} : Form-aware components should be named as ComponentName (e.g., TextField, Checkbox)
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Clear errors appropriately when fields are corrected
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Follow the wrapper component pattern for all form-aware components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Always define Zod schemas with proper error messages for form validation
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use Zod schemas for all form validation
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use the form setup pattern for form initialization in Remix
Learnt from: jaruesink
PR: #107
File: llms.txt:22-23
Timestamp: 2025-07-27T05:55:46.460Z
Learning: React Router 7 merged with Remix, so useFetcher and ActionFunctionArgs are now available from 'react-router' package rather than the separate '@remix-run/react' and '@remix-run/node' packages.
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Maintain FormField consistency for all form inputs
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/monorepo-organization.mdc:0-0
Timestamp: 2025-07-23T12:47:17.244Z
Learning: Keep form-aware components separate from base UI components
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/ui/**/*.tsx : Follow the component composition pattern for UI components that accept form integration
Learnt from: CR
PR: lambda-curry/forms#0
File: .cursor/rules/form-component-patterns.mdc:0-0
Timestamp: 2025-07-23T12:46:51.780Z
Learning: Applies to packages/components/src/remix-hook-form/**/*.tsx : Use ARIA attributes for complex form interactions
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test
| ### Complete List of UI Components (`@lambdacurry/forms/ui`) | ||
| ```typescript | ||
| // Basic UI components (no form integration) | ||
| import { | ||
| // Buttons and actions | ||
| Button, // Button with variants | ||
|
|
||
| // Form inputs (non-form-aware versions) | ||
| CheckboxField, // Checkbox without form integration | ||
| TextareaField, // Textarea without form integration | ||
| TextField, // Text input without form integration | ||
| SwitchField, // Switch without form integration | ||
| RadioGroupField, // Radio group without form integration | ||
| DatePickerField, // Date picker without form integration | ||
| DropdownMenuSelectField, // Dropdown without form integration | ||
| OtpInputField, // OTP input without form integration | ||
| FormErrorField, // Error display without form integration | ||
|
|
||
| // Layout and navigation | ||
| Dialog, // Modal dialogs | ||
| Popover, // Popover/tooltips | ||
| Tabs, // Tab navigation | ||
| Separator, // Visual dividers | ||
|
|
||
| // Data display | ||
| Table, // Table components | ||
| Badge, // Labels and badges | ||
| Calendar, // Calendar component | ||
|
|
||
| // Form primitives | ||
| Label, // Basic labels | ||
| Select, // Basic select dropdown | ||
| Slider, // Range slider | ||
| Command, // Command palette | ||
|
|
||
| // Data table system | ||
| DataTable, // Data table components | ||
| DataTableFilter, // Table filtering | ||
|
|
||
| // Utilities | ||
| DebouncedInput, // Debounced input | ||
| } from '@lambdacurry/forms/ui'; | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify that every UI component in the reference list actually exists in the published package
The list includes FormErrorField, CheckboxField, RadioGroupField, etc. Some of these wrappers may not be exported yet (or may use different names). A mismatch will break copy-pasted examples.
Run this quick check to confirm exports against the current package build:
🏁 Script executed:
#!/bin/bash
# lists exports from the installed package bundle
npm pack @lambdacurry/forms --silent
tar -xzf lambdacurry-forms-*.tgz
fd --extension ts -E 'node_modules' -x sed -n 's/^export .* \(.*\) .*/\1/p' {} \; | sort -u | grep -E 'FormErrorField|CheckboxField|RadioGroupField'Length of output: 259
🏁 Script executed:
#!/bin/bash
# Download and unpack the published package
npm pack @lambdacurry/forms --silent
tar -xzf lambdacurry-forms-*.tgz
# Detect top-level package directory inside the tarball
PKG_DIR=$(tar -tzf lambdacurry-forms-*.tgz | head -1 | cut -d/ -f1)
echo "Inspecting exports in $PKG_DIR/"
# Search across all files for the specific exports
for name in FormErrorField CheckboxField RadioGroupField; do
echo "Checking export for $name:"
grep -R "export .*${name}" "$PKG_DIR" -n || echo " ✗ $name not found"
doneLength of output: 2123
Update UI imports to match actual exports
I confirmed in @lambdacurry/forms v0.18.0 that:
- FormErrorField → exported as
FormErrorField - RadioGroupField → exported as
RadioGroupField - CheckboxField → not exported (the component is exported as
Checkbox)
Please adjust your import list in llms.txt (lines 154–196) accordingly, and verify the remaining field wrappers (e.g. TextareaField, DatePickerField, DropdownMenuSelectField, OtpInputField) align with their actual export names in @lambdacurry/forms/ui.
- Rename
CheckboxFieldtoCheckbox - Confirm each component name matches the package’s
dist/ui/index.d.tsexports
🤖 Prompt for AI Agents
In llms.txt between lines 154 and 196, update the import statements from
'@lambdacurry/forms/ui' to reflect the actual exported component names in
version 0.18.0. Specifically, rename CheckboxField to Checkbox, and verify that
all other imported components such as TextareaField, DatePickerField,
DropdownMenuSelectField, OtpInputField, and RadioGroupField exactly match their
export names in the package's dist/ui/index.d.ts file. Adjust any mismatches to
ensure the import list is accurate and consistent with the package exports.
| import { Button } from '@lambdacurry/forms/ui'; | ||
| import { DropdownMenuSelectItem } from '@lambdacurry/forms/ui'; | ||
| import { RemixFormProvider, useRemixForm, getValidatedFormData, createFormData } from 'remix-hook-form'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing FormError import breaks the comprehensive example
<FormError /> is used later on line 1109, but the import statement on 890-902 omits it, causing a compile-time error.
-import {
- TextField,
- Textarea,
- Checkbox,
- RadioGroup,
- DatePicker,
- DropdownMenuSelect
-} from '@lambdacurry/forms';
+import {
+ TextField,
+ Textarea,
+ Checkbox,
+ RadioGroup,
+ DatePicker,
+ DropdownMenuSelect,
+ FormError // <-- add
+} from '@lambdacurry/forms';Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In llms.txt around lines 900 to 902, the import statements from
'@lambdacurry/forms/ui' are missing the FormError component, which is used later
on line 1109. To fix this, add FormError to the import list from
'@lambdacurry/forms/ui' alongside Button and DropdownMenuSelectItem to ensure
the component is properly imported and avoid compile-time errors.
This PR updates the
llms.txtfile to properly document the import structure for the@lambdacurry/formslibrary, ensuring all imports follow the correct patterns.Changes Made
📋 Import Structure Documentation
@lambdacurry/forms(automatically integrate with form context)@lambdacurry/forms/ui(underlying UI primitives without form integration)🔧 Updated Import Examples
/uisubpath📚 Component Reference Lists
🎯 Key Updates
@lambdacurry/forms@lambdacurry/forms/uiThis ensures developers have clear guidance on which components to import from which paths, maintaining the library's architectural separation between form logic and UI primitives.
Summary of Changes:
Requested by Jake Ruesink
💻 View my work • 🚫 Ban all checks • About Codegen
Summary by CodeRabbit