Repository navigation
fix(site): display tasks link when no templates contain an AI task - #19184
Conversation
Fixes #19059 We now remove the call to `HasTemplateVersionsWithAITask`, and set `tasks-tab-visible` to the opposite of `HideAITasks`. As this was the only usage of `HasTemplateVersionsWithAITask`, the query has been removed. If required, it can always be added back in the future.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThis change removes all code related to dynamically checking the database for the presence of AI task templates to control the visibility of the Tasks tab. Instead, the Tasks tab visibility is now determined solely by the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant Backend
User->>Frontend: Load site
Frontend->>Backend: (No longer queries for AI task templates)
Frontend->>Frontend: Show Tasks tab if !HideAITasks
Frontend->>User: Display Tasks tab and placeholder with docs link if no templates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (9)
💤 Files with no reviewable changes (7)
🧰 Additional context used🧠 Learnings (12)📚 Learning: applies to enterprise/audit/table.go : if a feature touches audit logs, update enterprise/audit/tabl...Applied to files:
📚 Learning: applies to enterprise/audit/table.go : if audit errors occur after database changes, update enterpri...Applied to files:
📚 Learning: applies to enterprise/audit/table.go : if audit errors occur after database changes, update enterpri...Applied to files:
📚 Learning: applies to site/src/**/*.tsx : mui components are deprecated - migrate away from these when encounte...Applied to files:
📚 Learning: applies to site/src/**/*.tsx : use shadcn/ui components first - check site/src/components for existi...Applied to files:
📚 Learning: applies to site/src/**/*.tsx : prefer tailwind utilities over custom css when possible...Applied to files:
📚 Learning: applies to site/src/**/*.tsx : replace emotion `css` prop with tailwind classes...Applied to files:
📚 Learning: applies to site/src/**/*.{ts,tsx} : use es modules (import/export) syntax, not commonjs (require)...Applied to files:
📚 Learning: applies to site/**/*.tsx : all user-facing frontend code is developed in typescript using react and ...Applied to files:
📚 Learning: applies to site/src/**/*.tsx : leverage custom color tokens: content-primary, surface-secondary, etc...Applied to files:
📚 Learning: applies to site/**/*.ts : all user-facing frontend code is developed in typescript using react and l...Applied to files:
📚 Learning: applies to site/src/**/*.{ts,tsx} : never mutate props, state, or values returned by hooks. always c...Applied to files:
🔇 Additional comments (4)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
johnstcn
left a comment
There was a problem hiding this comment.
Backend changes look good to me!
Deferring to Bruno on the copy changes.
Fixes #19059
We now remove the call to
HasTemplateVersionsWithAITask, and settasks-tab-visibleto the opposite ofHideAITasks. As this was the only usage ofHasTemplateVersionsWithAITask, the query has been removed. If required, it can always be added back in the future.