fix(tables): harden timezone and expiration handling - #7291
Open
j15z wants to merge 11 commits into
Open
Conversation
Avoid Date.UTC's 1900 remapping and retain four-digit years through date and TTL editing.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR hardens table timezone, expiration, deletion-trigger, snapshot-budget, and TTL-cleanup behavior while adding regression coverage.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/row-modal/row-modal.tsx | Replaces the modal-wide timezone gate with per-date-field blocking while preserving unrelated edits through partial updates. |
| apps/sim/hooks/queries/general-settings.ts | Exposes explicit timezone-setting states so consumers can distinguish ready, loading, invalid, and failed preferences. |
| apps/sim/lib/core/utils/timezone.ts | Hardens timezone validation and wall-clock conversion, including preservation of years 0000–0099. |
| apps/sim/lib/table/rows/service.ts | Dispatches row-delete triggers asynchronously and applies the snapshot byte budget to accepted row sizes. |
| apps/sim/background/cleanup-table-row-ttl.ts | Adds byte-budgeted TTL deletion batches and promptly signals successful cleanup work. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Load timezone setting] --> B{Timezone ready?}
B -->|Yes| C[Format and edit Date or Expiration fields]
B -->|No| D[Render raw stored values]
D --> E[Block Date or Expiration edits]
D --> F[Keep unrelated row fields editable]
F --> G[Submit partial row update]
G --> H[Preserve omitted date values]
Reviews (2): Last reviewed commit: "fix(tables): address timezone and delete..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 30 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Bug-bot fixes
Further hardening from code review
Auto: <browser timezone>while preserving the existing browser-timezone fallback.Babysit and review follow-ups
Type of Change
Testing
bun run agent-stream-docs:generatebun run skills:syncbun run lintbun run apps/sim/scripts/check-block-registry.ts origin/stagingbun run check:audits(39 audits)bun run type-checkChecklist