-
Notifications
You must be signed in to change notification settings - Fork 227
[comp] Production Deploy #1975
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
[comp] Production Deploy #1975
Conversation
…ge (#1974) * feat(comments): add contextUrl for deep-linking in comment notifications * fix(comments): ensure entity belongs to organization in comment notifications * refactor(comments): filter mention users to show only admin and owner roles --------- Co-authored-by: Tofik Hasanov <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR Summary
Written by Cursor Bugbot for commit 0b6cf11. This will update automatically on new commits. Configure here. |
|
|
Graphite Automations"Auto-assign PRs to Author" took an action on this PR • (01/05/26)1 reviewer was added to this PR based on Mariano Fuentes's automation. |
…#1976) Co-authored-by: Tofik Hasanov <[email protected]>
* feat(layout): optimize header retrieval and sync active organization ID * refactor(onboarding, upgrade): verify membership before syncing active organization ID --------- Co-authored-by: Tofik Hasanov <[email protected]>
* feat(risk, vendor): implement RiskPageClient and VendorPageClient for real-time updates due using SWR * feat(vendor, risk): enhance real-time updates with SWR and normalize API responses --------- Co-authored-by: Tofik Hasanov <[email protected]>
apps/app/src/app/(app)/[orgId]/risk/[riskId]/components/RiskActions.tsx
Outdated
Show resolved
Hide resolved
…als (#1979) Co-authored-by: Tofik Hasanov <[email protected]>
| // Use SWR for real-time updates with polling | ||
| const { risk: swrRisk, isLoading } = useRisk(riskId, { | ||
| organizationId: orgId, | ||
| }); |
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.
SWR hooks not using available initial data for hydration
The RiskPageClient and VendorPageClient components receive initialRisk/initialVendor props from server-side rendering but don't pass them as initialData to the useRisk/useVendor hooks. The hooks were designed to accept initialData to pre-populate SWR's cache and avoid redundant fetches, as indicated by the JSDoc comment "Initial data from server for hydration - avoids loading state on first render". Without this, every page load triggers an unnecessary API call since SWR immediately fetches data that was already fetched server-side. The fallback logic in useMemo works correctly to display content, but the redundant network request impacts performance.
Additional Locations (1)
…1980) Co-authored-by: Tofik Hasanov <[email protected]>
| (key) => typeof key === 'string' && key.includes(`/v1/comments`) && key.includes(riskId), | ||
| undefined, | ||
| { revalidate: true }, | ||
| ); |
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.
Comments cache invalidation uses wrong key type check
The comments cache invalidation checks typeof key === 'string', but useApiSWR creates SWR keys as arrays [endpoint, organizationId]. Since comments keys are arrays like ['/v1/comments?entityId=...', 'org_123'], the string type check always fails and the cache is never invalidated. The risks/vendors invalidation correctly uses Array.isArray(key) && key[0] === 'risks', but the comments invalidation needs a similar array check like Array.isArray(key) && key[0]?.includes('/v1/comments').
Additional Locations (1)
Co-authored-by: Tofik Hasanov <[email protected]>
| website: { | ||
| contains: domain, | ||
| }, | ||
| }, |
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.
Substring domain match may return wrong vendor data
The findById method uses a substring contains filter to match vendor domains against GlobalVendors records. Since extractDomain returns just the hostname (e.g., "example.com"), the query website: { contains: domain } can match unrelated domains where the target is a substring. For example, searching for "comp.ai" would incorrectly match "notcomp.ai" or "encomp.ai", potentially displaying the wrong vendor's risk assessment data to users.
Co-authored-by: chasprowebdev <[email protected]>
|
🎉 This PR is included in version 1.73.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.