GeezerVison is showing github.com — fix(kb): show 'pending' instead of past date for overdue next sync by waleedlatif1 · Pull Request #4039 · simstudioai/sim
Conversation
Summary
- When a connector's
nextSyncAt is in the past (sync overdue / cron delayed), the UI was showing "Next sync: 2 days ago" via formatDistanceToNow. Now shows "Next sync: pending" instead.
Type of Change
Testing
Tested manually
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
greptile-apps[bot] reacted with thumbs up emoji
cursor
Bot
commented
Apr 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
PR Summary
Low Risk
Low risk UI-only change that alters how nextSyncAt is displayed when the scheduled time is in the past; no backend or data-flow behavior changes.
Overview
Updates the connectors list UI to treat overdue nextSyncAt values as pending rather than rendering a relative past time (e.g., "2 days ago"). This uses date-fns isPast to conditionally switch the "Next sync" label for active connectors.
Reviewed by Cursor Bugbot for commit 7abb202. Configure here.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
| Project |
Deployment |
Actions |
Updated (UTC) |
| docs |
Skipped |
|
Apr 8, 2026 5:24am |

|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Greptile Summary
This PR fixes a UX bug in the knowledge base connectors section where nextSyncAt dates in the past (i.e., syncs that are overdue due to cron delay) were being displayed as relative past timestamps (e.g., "Next sync: 2 days ago") instead of a meaningful pending state indicator.
Changes:
- Imports
isPast from date-fns alongside the existing format and formatDistanceToNow imports.
- Wraps the
formatDistanceToNow call in a ternary: if the nextSyncAt date is already in the past, renders the string "pending" instead of the misleading relative timestamp.
Confidence Score: 5/5
Safe to merge — single-file, display-only change with correct logic.
The change is minimal, targeted, and correct. isPast from date-fns reliably detects overdue dates, and the only remaining finding is a P2 style suggestion about a redundant new Date() construction that has no impact on correctness or performance at this scale.
No files require special attention.
Vulnerabilities
No security concerns identified.
Important Files Changed
| Filename |
Overview |
| apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx |
Adds isPast guard so overdue nextSyncAt displays "pending" instead of a past-relative timestamp; logic is correct and minimal. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ConnectorCard renders next sync info] --> B{connector.nextSyncAt && status === 'active'?}
B -- No --> C[No next sync shown]
B -- Yes --> D{isPast nextSyncAt ?}
D -- Yes overdue --> E["Show: 'Next sync: pending'"]
D -- No future --> F["Show: 'Next sync: in X minutes/hours'"]
Loading
Reviews (1): Last reviewed commit: "fix(kb): show 'pending' instead of past ..." | Re-trigger Greptile
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Re: double new Date() instantiation — Ack. Considered both approaches (IIFE and extracted const). The double new Date() is sub-microsecond and this renders once per connector card, so the readability tradeoff isn't worth it here. Keeping as-is.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This branch was previously deployed
1 inactive
deployment
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|