fix: Render Cloud Config Date params as dates after refresh#3391
fix: Render Cloud Config Date params as dates after refresh#3391dblythy wants to merge 1 commit into
Conversation
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Closes #2566
A Cloud Config parameter of type
Daterenders correctly right after it is created, but after a page refresh it shows the raw wire object{"__type":"Date","iso":"..."}instead of a date.Cause: config values are fetched via
GET /configand stored without decoding, so a Date arrives as{__type:'Date', iso}.Config#tableDatarehydratedFileandGeoPointwire objects back into real instances but had no branch forDate, so the value failed theisDatecheck and fell through toJSON.stringify. It looked correct before a refresh only because the local store keeps the originalDateuntil the next fetch.Fix: a small
lib/decodeConfigValuehelper rehydratesFile/GeoPoint/Datewire objects, applied both intableData(table render) and in the edit-modal refetch path (which read the raw value and would otherwise feed a non-Date into the date picker).Before
Refresh shows the Date param as an
Object.After
Refresh shows the Date param as a date.
Opening the editor shows a populated date picker (this path is also fixed by decoding the refetched value):
Regression: File/GeoPoint/String/Number render and edit unchanged (GeoPoint editor shown):
Covered by a unit test (
src/lib/tests/decodeConfigValue.test.js). The broader date-input UX ideas from the issue (unified text input, optional calendar picker, ISO placeholder) are left as a follow-up.