Skip to content

perf: server-fetch data for all pages in /settings/my-account #20712

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Apr 15, 2025

What does this PR do?

  • Fixes CAL-[FILL IN]

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Please use the latest Vercel preview and test please 🙏.

@hbjORbj hbjORbj requested review from a team as code owners April 15, 2025 18:41
@hbjORbj hbjORbj marked this pull request as draft April 15, 2025 18:41
@graphite-app graphite-app bot requested a review from a team April 15, 2025 18:41
@keithwillcode keithwillcode added core area: core, team members only foundation labels Apr 15, 2025
@hbjORbj hbjORbj changed the title perf: settings my account server fetch perf: server-fetch data for all pages in /settings/my-account Apr 15, 2025
@dosubot dosubot bot added the performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive label Apr 15, 2025
Copy link

graphite-app bot commented Apr 15, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/15/25)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link

@mrge-io mrge-io bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrge found 8 issues across 25 files. View them in mrge.io

};

export function CalendarListContainer({
connectedCalendars: data,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter destructuring renames 'connectedCalendars' to 'data' internally which creates confusing access patterns throughout the component

@@ -158,6 +129,7 @@ const AppearanceView = ({
const mutation = trpc.viewer.me.updateProfile.useMutation({
onSuccess: async (data) => {
await utils.viewer.me.invalidate();
revalidateSettingsAppearance();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling revalidateSettingsAppearance in onSuccess is redundant as it's also called in onSettled

@@ -106,6 +65,7 @@ const GeneralView = ({ localeProp, user, travelSchedules, revalidatePage }: Gene
const mutation = trpc.viewer.me.updateProfile.useMutation({
onSuccess: async (res) => {
await utils.viewer.me.invalidate();
revalidateSettingsGeneral();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate revalidation calls in both onSuccess and onSettled callbacks


const GeneralView = ({ localeProp, user, travelSchedules, revalidatePage }: GeneralViewProps) => {
const GeneralView = ({ user, travelSchedules }: GeneralViewProps) => {
const localeProp = user.locale ?? "en";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing user.locale default handling in the original component

description={t("profile_description", { appName: APP_NAME })}
borderInShellHeader={true}>
<SkeletonContainer>
<div className="border-subtle space-y-6 rounded-b-lg border border-t-0 px-4 py-8">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent border radius class: 'rounded-b-lg' is used here while other skeleton components use 'rounded-b-xl'

description={t("profile_description", { appName: APP_NAME })}
borderInShellHeader={true}>
<SkeletonContainer>
<div className="border-subtle space-y-6 rounded-b-lg border border-t-0 px-4 py-8">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing responsive padding: This component doesn't include 'sm:px-6' which is present in other similar skeleton components

if (!user) {
redirect("/auth/login");
}
return <GeneralView user={user} travelSchedules={travelSchedules ?? []} />;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Component no longer uses SettingsHeader which affects UI consistency across settings pages

);
};

export const ConferencingAppsViewWebWrapper = () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ConferencingAppsViewWebWrapper component signature has been changed without updating all usages. This breaks backward compatibility.

Copy link

vercel bot commented Apr 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Apr 21, 2025 7:22pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 21, 2025 7:22pm

Copy link
Contributor

github-actions bot commented Apr 15, 2025

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only foundation performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants