Conversation
Signed-off-by: Vaclav Vancura <commit@vancura.dev> Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Vaclav Vancura <commit@vancura.dev>
|
Warning Rate limit exceeded@vancura has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 4 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe PR updates four AI rule documentation files to enhance development guidance. Changes include adding code highlighting and semantic design tokens to website rules, reorganizing file-structure rules from region-based to documentation-focused approach, expanding TypeScript conventions with path aliases and execution patterns, and adding comprehensive Astro/Svelte component examples. Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @ai-rules/astro-svelte.mdc:
- Around line 336-349: Update the "Code Blocks in MDX" supported languages list
to use Shiki's correct identifier by replacing the entries "bash" and "shell"
with "shellscript"; locate the list inside the Code Blocks in MDX section (the
block that enumerates supported languages and the example using Expressive Code)
and edit the comma-separated language tokens so the final list reads:
typescript, javascript, jsx, tsx, html, css, scss, json, yaml, markdown,
shellscript, python, rust, go.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
ai-rules/ambilab-website.mdcai-rules/astro-svelte.mdcai-rules/file-structure.mdcai-rules/typescript.mdc
🔇 Additional comments (15)
ai-rules/typescript.mdc (2)
87-101: Path Aliases table is clear and comprehensive.The mapping is consistent with the path alias definitions in
ambilab-website.mdc(lines 292-301), providing helpful alignment across documentation. The table format makes it easy to reference.
146-172: Logger and Safe Execution patterns are correctly implemented.Both utility functions exist with signatures matching the documented examples:
createLoggerproperly exports fromsrc/utils/logger.tsand acceptsLoggerOptionsparametersafeExecuteproperly exports fromsrc/utils/safe-execute.tswith overloaded signatures supporting the documented usage patternNo updates needed.
ai-rules/ambilab-website.mdc (3)
62-62: Tech stack additions (Expressive Code and Linting) are well-aligned with documentation updates.These additions in the tech stack align well with the Code Blocks guidance in
astro-svelte.mdc(lines 336-349) and the extended linting setup. The information is consistent across documentation files.Also applies to: 66-66
344-344: Hardcoding colors mistake reinforces semantic token guidance effectively.Adding this item to the common mistakes list strengthens the connection to the Semantic Design Tokens section (lines 245-263), providing good cross-reinforcement of the token-based theming approach.
245-263: Semantic Design Tokens implementation is fully verified and correctly documented.The semantic tokens are properly implemented in both
src/styles/global.css(using the @theme directive) andtailwind.config.ts(with theme.extend.colors mappings). All documented token categories and dark mode support with -dark suffix variants are present and functional.ai-rules/astro-svelte.mdc (3)
320-334: Demo Embeds documentation includes important security considerations.The security note about the allowlist (
blit-tech-demos.ambilab.com, HTTPS only) is appropriately placed and aligns with the more detailed security guidance inambilab-website.mdc(lines 199-235). The cross-file consistency is good, though ensure that the DemoEmbed component implementation actually enforces these security constraints.
277-300: Image optimization guidance covers both static and responsive use cases.The separation between Astro's built-in Image component (for static imports) and the ResponsiveImage component (for responsive images with srcset) is clear and practical. This provides good guidance for different image optimization scenarios.
302-318: Icon component correctly implements accessibility features as documented.The Icon component at
src/components/astro/Icon.astroproperly supports both thedecorativeandariaLabelparameters as shown. The implementation is even more robust than the documentation indicates—it enforces that non-decorative icons must provide anariaLabel, preventing accidental accessibility gaps. All 13 icons listed (bluesky, calendar, clock, github, instagram, linkedin, mastodon, pixel-heart, refresh, tag, threads, user, x) are available. The guidance on semantic vs. decorative icon usage is accurate and follows accessibility best practices.ai-rules/file-structure.mdc (7)
1-5: Frontmatter is clear and appropriate.The metadata accurately reflects the file's purpose and the scope is appropriate for TypeScript/JavaScript files.
9-23: File-level documentation guidance is clear and well-exemplified.The example effectively demonstrates the recommended JSDoc pattern with context about why such documentation matters for this particular route configuration file.
25-32: Standard file structure is well-organized and follows established conventions.The six-step structure provides a clear blueprint for file organization that readers can immediately apply.
34-51: Function documentation example is comprehensive and standards-compliant.The JSDoc template covers all essential elements (description, parameters, return value, error handling) and the example is realistic and well-formatted.
53-71: Interface documentation example effectively demonstrates dual-level commenting.The example clearly shows how to document both the interface and individual properties, with appropriate terseness for property descriptions.
73-95: Region syntax section appropriately transitions to optional status.The deprioritization of regions aligns well with the documentation-focused reorganization while still providing clear guidance for files where regions remain useful.
97-117: Practical guidance on region usage is well-qualified and context-aware.The concrete threshold (100 lines) and clear decision criteria make this guidance immediately actionable while respecting the optional nature of regions.
Updated the list of supported languages in the AI rules documentation, replacing 'bash' and 'shell' with 'shellscript' for clarity. Signed-off-by: Vaclav Vancura <commit@vancura.dev>
This PR updates the AI rules documentation for the repository with comprehensive revisions across four configuration files.
ambilab-website.mdc introduces Code Highlighting via Expressive Code (Shiki-based) to the architecture documentation. It adds a new Semantic Design Tokens section covering CSS custom properties, Tailwind color mapping, usage patterns, and dark mode support. The styling guidance is expanded to formalize token-based theming, and the Common Mistakes to Avoid list is updated to include "Hardcoding colors" alongside existing items for accessibility and motion preferences.
astro-svelte.mdc significantly expands Image Optimization documentation with new subsections including Astro Image Component, ResponsiveImage Component for srcset/responsive images, Icons with component usage and accessible labeling, Demo Embeds with security notes, and Code Blocks in MDX using Expressive Code. The reorganization consolidates related content with standardized component approaches replacing previous minimal guidance and preloading/font link snippets.
file-structure.mdc undergoes substantial restructuring, replacing the Region Syntax guidance with a File-Level Documentation approach. The documentation now requires top-level JSDoc comments for each file and establishes a structured layout pattern (File-level documentation, Imports, Type Definitions, Constants/Configuration, Helper Functions, Main Exports). Concrete code examples are added demonstrating JSDoc coverage for functions, interfaces, and properties, reframing the content from region-based organization to comprehensive documentation practices.
typescript.mdc updates the TypeScript configuration documentation to note an extension of strict options with two new sub-options (noImplicitOverride and noFallthroughCasesInSwitch). It introduces new Path Aliases documentation and adds sections detailing Logger Pattern and Safe Execution Pattern with usage examples.
All changes are documentation-only with no modifications to public APIs or exported entity declarations.