-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: Bazza UI Filters #57
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
Changes from all commits
7be3144
877be65
5d300f0
19aba65
4d6e82f
449cf57
d3580c6
8024a2a
af3693c
319330f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| description: Guidelines for creating and maintaining Cursor rules to ensure consistency and effectiveness. | ||
| globs: .cursor/rules/*.mdc | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| - **Required Rule Structure:** | ||
| ```markdown | ||
| --- | ||
| description: Clear, one-line description of what the rule enforces | ||
| globs: path/to/files/*.ext, other/path/**/* | ||
| alwaysApply: boolean | ||
| --- | ||
|
|
||
| - **Main Points in Bold** | ||
| - Sub-points with details | ||
| - Examples and explanations | ||
| ``` | ||
|
|
||
| - **File References:** | ||
| - Use `[filename](mdc:path/to/file)` ([filename](mdc:filename)) to reference files | ||
| - Example: [prisma.mdc](mdc:.cursor/rules/prisma.mdc) for rule references | ||
| - Example: [schema.prisma](mdc:prisma/schema.prisma) for code references | ||
|
|
||
| - **Code Examples:** | ||
| - Use language-specific code blocks | ||
| ```typescript | ||
| // ✅ DO: Show good examples | ||
| const goodExample = true; | ||
|
|
||
| // ❌ DON'T: Show anti-patterns | ||
| const badExample = false; | ||
| ``` | ||
|
|
||
| - **Rule Content Guidelines:** | ||
| - Start with high-level overview | ||
| - Include specific, actionable requirements | ||
| - Show examples of correct implementation | ||
| - Reference existing code when possible | ||
| - Keep rules DRY by referencing other rules | ||
|
|
||
| - **Rule Maintenance:** | ||
| - Update rules when new patterns emerge | ||
| - Add examples from actual codebase | ||
| - Remove outdated patterns | ||
| - Cross-reference related rules | ||
|
|
||
| - **Best Practices:** | ||
| - Use bullet points for clarity | ||
| - Keep descriptions concise | ||
| - Include both DO and DON'T examples | ||
| - Reference actual code over theoretical examples | ||
| - Use consistent formatting across rules |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| description: Guidelines for continuously improving Cursor rules based on emerging code patterns and best practices. | ||
| globs: **/* | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| - **Rule Improvement Triggers:** | ||
| - New code patterns not covered by existing rules | ||
| - Repeated similar implementations across files | ||
| - Common error patterns that could be prevented | ||
| - New libraries or tools being used consistently | ||
| - Emerging best practices in the codebase | ||
|
|
||
| - **Analysis Process:** | ||
| - Compare new code with existing rules | ||
| - Identify patterns that should be standardized | ||
| - Look for references to external documentation | ||
| - Check for consistent error handling patterns | ||
| - Monitor test patterns and coverage | ||
|
|
||
| - **Rule Updates:** | ||
| - **Add New Rules When:** | ||
| - A new technology/pattern is used in 3+ files | ||
| - Common bugs could be prevented by a rule | ||
| - Code reviews repeatedly mention the same feedback | ||
| - New security or performance patterns emerge | ||
|
|
||
| - **Modify Existing Rules When:** | ||
| - Better examples exist in the codebase | ||
| - Additional edge cases are discovered | ||
| - Related rules have been updated | ||
| - Implementation details have changed | ||
|
|
||
| - **Example Pattern Recognition:** | ||
| ```typescript | ||
| // If you see repeated patterns like: | ||
| const data = await prisma.user.findMany({ | ||
| select: { id: true, email: true }, | ||
| where: { status: 'ACTIVE' } | ||
| }); | ||
|
|
||
| // Consider adding to [prisma.mdc](mdc:.cursor/rules/prisma.mdc): | ||
| // - Standard select fields | ||
| // - Common where conditions | ||
| // - Performance optimization patterns | ||
| ``` | ||
|
|
||
| - **Rule Quality Checks:** | ||
| - Rules should be actionable and specific | ||
| - Examples should come from actual code | ||
| - References should be up to date | ||
| - Patterns should be consistently enforced | ||
|
|
||
| - **Continuous Improvement:** | ||
| - Monitor code review comments | ||
| - Track common development questions | ||
| - Update rules after major refactors | ||
| - Add links to relevant documentation | ||
| - Cross-reference related rules | ||
|
|
||
| - **Rule Deprecation:** | ||
| - Mark outdated patterns as deprecated | ||
| - Remove rules that no longer apply | ||
| - Update references to deprecated rules | ||
| - Document migration paths for old patterns | ||
|
|
||
| - **Documentation Updates:** | ||
| - Keep examples synchronized with code | ||
| - Update references to external docs | ||
| - Maintain links between related rules | ||
| - Document breaking changes | ||
| Follow [cursor_rules.mdc](mdc:.cursor/rules/cursor_rules.mdc) for proper rule formatting and structure. | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # API Keys (Required to enable respective provider) | ||
| ANTHROPIC_API_KEY=your_anthropic_api_key_here # Required: Format: sk-ant-api03-... | ||
| PERPLEXITY_API_KEY=your_perplexity_api_key_here # Optional: Format: pplx-... | ||
| OPENAI_API_KEY=your_openai_api_key_here # Optional, for OpenAI/OpenRouter models. Format: sk-proj-... | ||
| GOOGLE_API_KEY=your_google_api_key_here # Optional, for Google Gemini models. | ||
| MISTRAL_API_KEY=your_mistral_key_here # Optional, for Mistral AI models. | ||
| XAI_API_KEY=YOUR_XAI_KEY_HERE # Optional, for xAI AI models. | ||
| AZURE_OPENAI_API_KEY=your_azure_key_here # Optional, for Azure OpenAI models (requires endpoint in .taskmasterconfig). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "models": { | ||
| "main": { | ||
| "provider": "anthropic", | ||
| "modelId": "claude-3-7-sonnet-20250219", | ||
| "maxTokens": 120000, | ||
| "temperature": 0.2 | ||
| }, | ||
| "research": { | ||
| "provider": "perplexity", | ||
| "modelId": "sonar-pro", | ||
| "maxTokens": 8700, | ||
| "temperature": 0.1 | ||
| }, | ||
| "fallback": { | ||
| "provider": "anthropic", | ||
| "modelId": "claude-3.5-sonnet-20240620", | ||
| "maxTokens": 120000, | ||
| "temperature": 0.1 | ||
| } | ||
| }, | ||
| "global": { | ||
| "logLevel": "info", | ||
| "debug": false, | ||
| "defaultSubtasks": 5, | ||
| "defaultPriority": "medium", | ||
| "projectName": "Taskmaster", | ||
| "ollamaBaseUrl": "http://localhost:11434/api", | ||
| "azureOpenaiBaseUrl": "https://your-endpoint.openai.azure.com/" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,9 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| import { Command } from '@lambdacurry/forms/ui'; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import type { Decorator } from '@storybook/react'; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import { NuqsAdapter } from 'nuqs/adapters/react-router/v7'; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import type { ComponentType } from 'react'; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import { DayPickerProvider } from 'react-day-picker'; | ||||||||||||||||||||||||||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||||||||||||||||||||||||||
| type ActionFunction, | ||||||||||||||||||||||||||||||||||||||||||||||||
| type IndexRouteObject, | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -40,6 +44,9 @@ interface RemixStubOptions { | |||||||||||||||||||||||||||||||||||||||||||||||
| initialPath?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // Create a single QueryClient instance outside the decorator | ||||||||||||||||||||||||||||||||||||||||||||||||
| const queryClient = new QueryClient(); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+47
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Potential issue with singleton QueryClient in Storybook Creating a single QueryClient instance outside the decorator means all stories will share the same cache, which could lead to unexpected behavior when testing components that depend on query state. Consider creating a new QueryClient for each story to isolate the query cache: - // Create a single QueryClient instance outside the decorator
- const queryClient = new QueryClient();
export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorator => {
const { routes, initialPath = '/' } = options;
// This outer function runs once when Storybook loads the story meta
return (Story, context) => {
+ // Create a new QueryClient for each story
+ const queryClient = new QueryClient();
// This inner function runs when the story component actually renders📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents (early access) |
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorator => { | ||||||||||||||||||||||||||||||||||||||||||||||||
| const { routes, initialPath = '/' } = options; | ||||||||||||||||||||||||||||||||||||||||||||||||
| // This outer function runs once when Storybook loads the story meta | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -53,13 +60,11 @@ export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorat | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // Get the base path (without existing query params from options) | ||||||||||||||||||||||||||||||||||||||||||||||||
| const basePath = initialPath.split('?')[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // Get the current search string from the actual browser window, if available | ||||||||||||||||||||||||||||||||||||||||||||||||
| // If not available, use a default search string with parameters needed for the data table | ||||||||||||||||||||||||||||||||||||||||||||||||
| const currentWindowSearch = typeof window !== 'undefined' | ||||||||||||||||||||||||||||||||||||||||||||||||
| ? window.location.search | ||||||||||||||||||||||||||||||||||||||||||||||||
| : '?page=0&pageSize=10'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| const currentWindowSearch = typeof window !== 'undefined' ? window.location.search : '?page=0&pageSize=10'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // Combine them for the initial entry | ||||||||||||||||||||||||||||||||||||||||||||||||
| const actualInitialPath = `${basePath}${currentWindowSearch}`; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -69,7 +74,18 @@ export const withReactRouterStubDecorator = (options: RemixStubOptions): Decorat | |||||||||||||||||||||||||||||||||||||||||||||||
| initialEntries: [actualInitialPath], // Use the path combined with window.location.search | ||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| return <RouterProvider router={router} />; | ||||||||||||||||||||||||||||||||||||||||||||||||
| // Wrap existing providers with QueryClientProvider and DayPickerProvider | ||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||
| <QueryClientProvider client={queryClient}> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <DayPickerProvider initialProps={{}}> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <NuqsAdapter> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <Command> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <RouterProvider router={router} /> | ||||||||||||||||||||||||||||||||||||||||||||||||
| </Command> | ||||||||||||||||||||||||||||||||||||||||||||||||
| </NuqsAdapter> | ||||||||||||||||||||||||||||||||||||||||||||||||
| </DayPickerProvider> | ||||||||||||||||||||||||||||||||||||||||||||||||
| </QueryClientProvider> | ||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
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.
Incorrect
globspattern in front matter.The
globsfield is set to**/*, which may apply this guideline to every file rather than just rule files. It should be scoped to.cursor/rules/*.mdcto target the intended documents.🤖 Prompt for AI Agents (early access)