Repository navigation
chore(skills): add project React performance guidance - #147
Conversation
Register Vercel React Best Practices in the canonical .ai skill system. Vendor 70 upstream rules and generate the Codex and Claude adapters.
AmitAvital1
left a comment
There was a problem hiding this comment.
Requesting changes for the line-level correctness and security issues noted in this review.
Seven vendored Vercel rules taught incorrect or unsafe patterns: - rendering-usetransition-loading: transitions do not cancel requests, so ignore stale responses instead of letting them overwrite newer results. - js-cache-function-results: cache only pure functions, bounded by size; context-dependent caches need explicit invalidation. - bundle-conditional: a typeof window guard in an effect does not affect bundling; effects never run during server rendering. - server-cache-lru: key shared caches by tenant and scope, and check authorization on every request. - rendering-hydration-no-flicker: the pre-hydration class change is still a mismatch; mark it with suppressHydrationWarning. - async-api-routes: mark early-started promises handled and return before dependent work when authentication fails. - advanced-event-handler-refs: Effect Events are not stable references. The skill now records these local corrections against the upstream revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AmitAvital1
left a comment
There was a problem hiding this comment.
Five previous threads are resolved. Two earlier issues remain incomplete, and three new line-level correctness issues were found in the full re-review.
- rendering-hydration-no-flicker: the title and label no longer claim the pattern avoids a hydration mismatch; the mismatch is marked as intentional. - server-cache-lru: only an unexported loader touches the shared cache, and the exported function authorizes the caller before any cached value. - js-cache-storage: invalidation resets the cookie cache, cookie values may contain "=", and the rule explains that cookie changes raise no event. - bundle-preload: removes the typeof window guard and its false bundling claim, matching bundle-conditional. - server-after-nonblocking: awaits the logging in after(), stops logging the session cookie, and notes that after() work is lost if the process stops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AmitAvital1
left a comment
There was a problem hiding this comment.
Four reported issues are fixed and resolved. The re-review found two remaining correctness inconsistencies plus a repository-wide whitespace failure in the added rule files; details are in the line threads.
- server-cache-lru: build the cache key with JSON.stringify, so IDs that contain a separator cannot collide across tenants. - advanced-use-latest: drop the "stable callback" claim; Effect Events get a new identity every render and stay out of dependency arrays. - Remove trailing whitespace from the copied rules; git diff --check against main is now clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AmitAvital1
left a comment
There was a problem hiding this comment.
All remaining review findings are fixed and verified. The full re-review found no additional blocking issues; generation and Git whitespace checks are clean, and GitHub CI is the merge gate.
Register Vercel React Best Practices in the canonical .ai skill system. Vendor 70 upstream rules and generate the Codex and Claude adapters.