Skip to content

perf: server-side-data-fetching-for-workflows #20773

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

TusharBhatt1
Copy link
Contributor

@TusharBhatt1 TusharBhatt1 commented Apr 19, 2025

What does this PR do?

This PR moves data fetching for /workflows to server side, improving performance and load times.

Visual Demo (For contributors especially)

Before and after :

workflows.mp4

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • 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.

Copy link

vercel bot commented Apr 19, 2025

@TusharBhatt1 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Apr 19, 2025
@graphite-app graphite-app bot requested a review from a team April 19, 2025 14:09
@keithwillcode keithwillcode added the community-interns The team responsible for reviewing, testing and shipping low/medium community PRs label Apr 19, 2025
@dosubot dosubot bot added performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive workflows area: workflows, automations labels Apr 19, 2025
Copy link

graphite-app bot commented Apr 19, 2025

Graphite Automations

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

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

"Add community label" took an action on this PR • (04/19/25)

1 label 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 1 issue across 4 files. View it in mrge.io

@TusharBhatt1 TusharBhatt1 changed the title perf: server-side-data-fetching-for-webflows perf: server-side-data-fetching-for-workflows Apr 19, 2025
import WorkflowList from "../components/WorkflowListPage";

type PageProps = {
filteredList?: Awaited<ReturnType<typeof WorkflowRepository.getFilteredList>>;
hasValidLicense: boolean;
Copy link
Contributor Author

@TusharBhatt1 TusharBhatt1 Apr 19, 2025

Choose a reason for hiding this comment

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

We are not using filteredList anywhere here

Copy link
Contributor

Choose a reason for hiding this comment

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

can you elaborate on what you mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FilteringList is just defined neither passed nor used

);
const _searchParams = await searchParams;
const context = buildLegacyCtx(await headers(), await cookies(), await params, _searchParams);
const session = await getSession(context);
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: Is getSession working correctly? I know this is being used in a few places, but I am not sure if it's working properly. We should getServerSession more often. Can you test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked ! Works well

import WorkflowList from "../components/WorkflowListPage";

type PageProps = {
filteredList?: Awaited<ReturnType<typeof WorkflowRepository.getFilteredList>>;
hasValidLicense: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

can you elaborate on what you mean?

@github-actions github-actions bot marked this pull request as draft April 21, 2025 14:18
@TusharBhatt1 TusharBhatt1 marked this pull request as ready for review April 21, 2025 17:06
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 5 issues across 4 files. View them in mrge.io

</div>
);
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync community-interns The team responsible for reviewing, testing and shipping low/medium community PRs performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive workflows area: workflows, automations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants