Skip to content

Conversation

@Adarsh9977
Copy link
Contributor

@Adarsh9977 Adarsh9977 commented Jan 6, 2026

What does this PR do?

  • As talked in
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Before
Screen.Recording.2026-01-06.at.1.08.39.PM.mov
  • After
Screen.Recording.2026-01-06.at.1.05.56.PM.mov

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

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.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Summary by cubic

Switches the Out of Office list to standard pagination using limit/offset and removes infinite scroll. Aligns with the Linear request to use consistent pagination in OOO.

  • Refactors
    • Web: Use useQuery with limit/offset from DataTable; set paginationMode="standard"; remove infinite scroll props and isFetching checks.
    • API: Replace cursor with offset in schema; use skip/take in handler; remove nextCursor; return rows and meta.totalRowCount.
    • UX/Permissions: Simplify loading states; apply canEditAndDelete only for team entries via reportingUserIds; disable edit/delete based on isPending.

Written for commit 01bb02a. Summary will update on new commits.

@vercel
Copy link

vercel bot commented Jan 6, 2026

@Adarsh9977 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 Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "fix:OOO pagination updated to standard and removed infinite scroll". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@Adarsh9977 Adarsh9977 changed the title fix:OOO pagination updated to standard and removed infinite scroll fix: OOO pagination updated to standard and removed infinite scroll Jan 6, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/trpc/server/routers/viewer/ooo/outOfOfficeEntriesList.schema.ts">

<violation number="1" location="packages/trpc/server/routers/viewer/ooo/outOfOfficeEntriesList.schema.ts:5">
P2: Missing minimum constraint on `offset`. Negative values would cause Prisma `skip` errors. Consider adding `.min(0)` for consistency with `limit` validation.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Adarsh9977 Adarsh9977 mentioned this pull request Jan 6, 2026
3 tasks
Copy link
Member

@dhairyashiil dhairyashiil left a comment

Choose a reason for hiding this comment

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

This change alters the intended behavior, so it would need to go through a new feature request first. Could you please create an issue using the feature request template and link this PR to it?
Once a team member approves the change, we can come back and continue reviewing this PR.

On a personal note, I think the infinite scroll looks good. I’m not sure why we need pagination just for consistency and it’s unlikely most users will have enough OOO entries to benefit from it.

@dhairyashiil dhairyashiil marked this pull request as draft January 6, 2026 19:11
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 size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants