ci: add sherif monorepo validation to CI checks#1260
Conversation
📝 WalkthroughWalkthroughThis pull request adds a new GitHub Actions CI job named "sherif" for static analysis and updates project dependencies across multiple package.json files, including version bumps for Zod, TanStack DB, and Hono server, plus explicit peer dependency declarations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/hooks/useFileTree.ts (1)
93-129:⚠️ Potential issue | 🟠 MajorStale
childrenCachewhenincludeHiddentoggles.When
includeHiddenchanges (user toggles hidden files), the root query refetches automatically (new query key), butchildrenCacheis never cleared. The early return on line 97 will keep serving stale cached children that were fetched with the oldincludeHiddenvalue. Only the explicitrefetch()(line 135-138) clears the cache.Consider clearing
childrenCachewhenincludeHiddenchanges:🐛 Proposed fix
Add an effect to clear the children cache when
includeHiddenchanges (or fold it into existing logic):+ useEffect(() => { + setChildrenCache({}); + }, [includeHidden]); + const loadChildren = useCallback(Alternatively, incorporate
includeHiddeninto the cache key structure so entries fetched with different settings don't collide.
🧹 Nitpick comments (2)
apps/desktop/src/lib/trpc/routers/workspaces/utils/teardown.ts (1)
14-18: Nit:runTeardownuses three positional parameters.Per coding guidelines, functions with 2+ parameters should use object parameters. This is pre-existing, so not blocking.
♻️ Suggested signature
-export async function runTeardown( - mainRepoPath: string, - worktreePath: string, - workspaceName: string, -): Promise<TeardownResult> { +export async function runTeardown({ + mainRepoPath, + worktreePath, + workspaceName, +}: { + mainRepoPath: string; + worktreePath: string; + workspaceName: string; +}): Promise<TeardownResult> {As per coding guidelines: "Use object parameters for functions with 2 or more parameters instead of positional arguments."
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/hooks/useFileTree.ts (1)
45-45: Nit: shorthand property.
includeHidden: includeHiddencan be shortened toincludeHidden.♻️ Proposed fix
- includeHidden: includeHidden, + includeHidden,Same applies on line 105.
3d57dbc to
ac2e703
Compare
Summary
sherifjob to the CI workflow that validates monorepo workspace conventionspostinstall, but wasn't enforced in CITest plan
sherifCI job passes on this PRSummary by CodeRabbit