Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-list): gate speculative $select fields by the object's real schema - #1710
Merged
Merged
Conversation
…l schema A list view auto-includes view-binding fields (kanban groupBy, calendar/ gantt/timeline dates, gallery image, timeline status/priority) in $select so alternate view modes render populated. These were added unconditionally on the assumption that "the projection ignores unknown names" — but some backends (notably the cloud multi-tenant runtime) reject an unknown $select column with an EMPTY result set, so a single phantom field zeroes the whole list. An AI-built `product` view requesting status/due_date/image then showed "no data" even though rows existed. Gate the speculative additions through addSpeculative(), which only keeps a field present in the object schema (objectDef.fields, already loaded before the fetch). User-declared columns and expand roots are untouched (already valid). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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 freeto 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.
Problem
A list view auto-includes view-binding fields in
$selectso alternate view modes (kanban groupBy, calendar/gantt/timeline dates, gallery image, timelinestatus/priority) render populated. These were added unconditionally, on the assumption — stated in a code comment — that "the projection ignores unknown names."That assumption is false against the cloud multi-tenant runtime: an unknown
$selectcolumn returns an empty result set, so a single phantom field zeroes the whole list. An AI-builtproductview auto-requestingstatus,name,due_date,image,priority,start_date,end_date(none of which exist onproduct) then renders "Nothing here yet" even though the rows are in the DB.This was diagnosed against a live env:
select=id,product_name,sku→ 6 rows, but the renderer's actualselect=...,status,name,due_date,image,priority,start_date,end_date→ 0 rows.Fix
Gate the speculative additions through
addSpeculative(), which only keeps a field that exists inobjectDef.fields(already loaded before the data fetch). User-declared columns and expand roots are untouched — they're already known-valid.Tests
product-shaped object with timeline/calendar config drops the phantomstatus/priority/*_datefrom$select(fails without the fix).taskobject that hasstatus/prioritykeeps them.🤖 Generated with Claude Code