You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Draft preview: a grouped grid view fails when a draft-only field is a column (every group INVALID_FIELD) or the grouping (Error loading grid) #34898
立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题)。这是 #34807 的同类派生缺陷,影响本专题的草稿预览落地(维护者 05:17Z 「如果影响本专题相关任务落地的,你也应该挂到这个专题下继续开发」)。⛔ 不是认领。
Evidence: area o3-A's measurement on the #34807 list half (head 509f3eab79), relayed to the seat at 2026-11-17 15:23Z. Real code, against the real door.
Under ?preview=draft, take a grouped grid view on an object whose draft adds a field:
A draft-only column goes into each group's row-page $select. The door refuses it (assertProjectionFieldsExist), so every group shows INVALID_FIELD.
Grouping by a draft-only field sends it as groupBy in queryGroupHeaders. The door refuses it (assertGroupByFieldsExist), so the whole grid shows 'Error loading grid'.
The cause is in plugin-grid. objectGridRowLoad.ts (:256, the projection gate; :352, the grouping gate) and serverGroupedFetch treat a field marked _draftOnly as declared. #34807's list half fixed the same class in ListView ($searchFields and columns), but the grid builds its own $select and groupBy from the schema.
Expected
A grouped grid under draft preview reads the _draftOnly marker the way ListView now does. It does not request draft-only fields from the door. A grouping on a draft-only field degrades visibly: the view says the grouping waits for publish, instead of failing the grid. After Publish, the column and the grouping work with no reload.
Suggested-grade: p2 · domain:ui · size S
Related: #34807 (the ListView half), #34610.
First touch (R1198, 15:5xZ): p1 · domain:ui → pm:queue.
Child of epic #34571, the console core business operations epic that the maintainer graded p1. It inherits p1 · ui. A grouped grid in draft preview fails outright. This adds one to the #34571 release gate.
Claim: PM loop round 1 · area o3-A · 2026-11-17T16:34Z
Session: session_01WGufzg2evNa1V3zxrQq3KX
Account: os-support-ai
Branch: claude/issue-34898-grid-draft-only-fields
Worktree: objectstack-issue-34898
Domain: domain:ui
Seat: repo:objectstack#3
File surface: ui/packages/plugin-grid/src/objectGridRowLoad.ts, ui/packages/plugin-grid/src/useServerGrouping.ts, ui/packages/plugin-grid/src/objectGridGroupingDecisions.ts, ui/packages/plugin-grid/src/ObjectGrid.tsx (drawing the grouping-waits note only), ui/packages/plugin-grid/src/objectGridTranslations.ts (+1 default), new tests under ui/packages/plugin-grid/src/__tests__/, ui/packages/i18n/src/locales/*.ts (+1 grid.grouping.* key each, zh-Hant regenerated), root .changeset/
Container & model: S, mode:subagent, model: TIER_DEFAULT (no path-derived mandate), effort: medium (seat 16:27Z small-console-card rule: console UI only, one surface, no spec/protocol/ADR, not Tier H)
Clause-②: yes — one new locale key (the visible "this grouping waits for publish" note the card's Expected names), locale-only; no spec, no new exported prop
Metadata-protocol: none
Responsibility: ui/packages/plugin-grid (objectstack): under ?preview=draft the grouped grid builds its own row-page $select and groupBy from the schema and treats a field marked _draftOnly as declared, so the door refuses it (INVALID_FIELD in every group, or 'Error loading grid') | no platform path covers it | every author previewing a draft that adds a field shown or grouped in a grouped grid view, once #34807's list half lands
Thread-read: 6953185289
Premise: holds (code read at origin/main 189358f, pre-claim): plugin-grid has 0 reads of _draftOnly; the projection gate objectGridRowLoad.ts:256 passes a name the schema declares to checkField and lets an undeclared one through, and the grouping gate :352 keeps any isProjectableField name; both 400 shapes were measured by o3-A at #34807 list-half head 509f3ea with the real ListView + object-grid against a refusing double (door assertProjectionFieldsExist protocol-data-crud.ts:205, assertGroupByFieldsExist :477). The marker reaches the grid only through the list half's preview wrapper, so the dev measures with a marked schema double first.
Serial constraints cleared: no open PR touches objectGridRowLoad.ts, useServerGrouping.ts, objectGridGroupingDecisions.ts, objectGridTranslations.ts or ObjectGrid.tsx (all open PRs' file lists read); #34925 and #34929 add en keys (budget measured on the merged tree before the PR opens)
Pre-claim lane: domain:ui — every path is under ui/packages/**
Pre-claim deps: #34807 list half (branch claude/issue-34807-draft-preview-list, PR opening) supplies the _draftOnly schema under preview; this card builds on origin/main, tests against a marked schema, and lands after that PR
Prior rulings read: seat carrier ruling A (2026-11-17 15:25Z, B/C refused; recorded in this card's body), #34807 ruling 6946403206 (data contract unchanged, client-side fallback); draft preview,grouping,_draftOnly → 0 other hits
{
"issue": 34898,
"status": "done",
"branch": "claude/issue-34898-grid-draft-only-fields",
"pr": "https://github.com/objectstack-ai/objectstack/pull/34944",
"session": "session_01WGufzg2evNa1V3zxrQq3KX",
"premise_still_valid": true,
"summary": "plugin-grid now reads the _draftOnly marker off the definition it already fetches. A draft-only field is never projected: one final filter over the whole row $select, on the flat path and on every group row page, plus $expand. A draft-only grouping entry is refused the same way a masked key is (objectGridGroupingDecisions.ts): it is dropped from unmaskedGroupingFields, so it is never sent as groupBy, and it counts nowhere in serverGroupedFetch, groupingNeedsHeaderQuery or the fetch window. The grid groups by the published entries left, or draws flat. One note, the new key grid.grouping.draftOnly, names the dropped field; it is in en, the 10 other packs (zh-Hant regenerated) and GRID_DEFAULT_TRANSLATIONS, byte-identical to en. Note placement: the element is defined in ObjectGrid.tsx directly after the needsHeaderQuery panel and is drawn under the description, above the rows, in both the table and card branches. needsHeaderQuery is an early return that replaces the grid, while this case withholds nothing, so the note sits in the muted strip ListView uses for its own draft-preview note. useServerGrouping.ts needed no change because its groupBy comes from unmaskedGroupingFields. Head 355184027e86d1226822fdcd303076a54320b75e (merge of origin/main 62fbbeb767 onto the work). Cut from origin/main 189358f212fdd3da6cf5db5f53d00927520a6406. Files (+/-): objectGridRowLoad.ts +49/-3, objectGridGroupingDecisions.ts +54/-11, ObjectGrid.tsx +28, objectGridTranslations.ts +4, new __tests__/serverGroupedDraftOnly-34898.test.tsx +248, 11 locale packs +1 each, .changeset/34898-grid-draft-only-fields.md +13; 407 added / 14 deleted in total. Dev-effort: medium.",
"tests": "PREMISE on origin/main 189358f212 (grid src restored from BASE, real ObjectGrid, double marking priority _draftOnly and refusing any request naming it): (A) every group row page $select [\"id\",\"name\",\"priority\",\"category\"], both groups drew INVALID_FIELD: select 'priority'; (B) queryGroupHeaders groupBy [[\"priority\"]], 'Error loading grid' shown 1. Both shapes reproduced. NEW PINS serverGroupedDraftOnly-34898.test.tsx, 7/7 green: column grouped by published, column flat, CONTROL published column, only-draft grouping (no queryGroupHeaders, flat, note), draft+published grouping (groupBy ['category'], note), CONTROL published grouping (groupBy [['priority']], no note), after-Publish rerender with no remount (note gone, groupBy ['priority'], last row page selects priority). How Publish is pinned: the grid is re-rendered, not re-mounted, with a data source answering for the published state. REVERSE against BASE grid src: 5 failed, 2 controls passed. ABLATION via scripts/ablation-replace.mjs on objectGridGroupingDecisions.ts, gate set to false: mutation landed (anchor 1 to 0, blob b161247731d3 to bae39c68d325), 3 failed / 4 passed; restored, blob == HEAD and git diff HEAD empty. Tests import source, not dist, so no rebuild was needed. PACKAGES (pre-merge head 7aaf77af16): plugin-grid vitest 287/287 files, 2476/2476 tests; plugin-grid type-check exit 0; i18n vitest 102/102 files, 1894 passed and 13 skipped; i18n type-check exit 0; lock VERDICT command-exit 0. FINAL HEAD 355184027e targeted re-run (5 grouping files): 50/50.",
"gates": "dispatch-gates --commands (objectstack, pre-merge head 7aaf77af16): 41 families, each run with its exit code captured before any pipe: 41/41 exit 0. --ran reconciliation: 41 derived, 41 run, 0 NOT-MEASURED, a DERIVED zero. check:nul-bytes exit 0. overlap-check at each push: VERDICT clean exit 0 (last push at 355184027e; #34914, #34925, #34929 and #34930 share the locale files and merge cleanly). The merge brought in origin/main and touched neither package. CI check-runs on PR #34944: in_progress at report time, not awaited.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "3 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/34944/assignees os-support-ai), relay post-stamped comment POST /repos/objectstack-ai/objectstack/issues/34898/comments; git push direct x3 (probe, WIP, final)",
"open_questions": [
{
"question": "i18n-locale-en budget: on the merged tree (this branch plus origin/main 62fbbeb767; turbo build of the console closure, VITE_BASE_PATH=/console/ vite build, check:eager-closure) the chunk reads 61,869 gzipped bytes against a 62,000 ceiling, leaving 131 bytes. The same build without this key reads 61,841, so the key costs +28 bytes. #34925, #34929 and the #34807 list half each add an en key. The ceiling was not edited. Who pays if the stack overflows?",
"options": ["A land in order and let the PR that turns check:eager-closure red move its namespace", "B move grid.grouping.* (3 keys) to a lazy namespace in a follow-up"],
"recommendation": "A, because this key fits today with 131 bytes to spare. The overflow, if it comes, is decided by landing order, and the seat can measure it then."
}
],
"security_findings": "none",
"out_of_scope_findings": ["carrier: none · noted in Acceptance notes, not filed: from code reading only (no repro run), a header-click sort, an authored sort, searchableFields or a view filter naming a draft-only field would still reach the door from this grid; same class, outside the card's columns-and-grouping scope · dedupe words: draft preview, _draftOnly, $orderby, plugin-grid"]
}
Delivered · 2026-11-17T18:39Z · PR #34944 merged (97cd541), in the same queue group as #34936, and its Fixes line closed this card.
Under ?preview=draft, a grouped grid no longer requests a draft-only field from the door:
Such a column is left out of every row $select and $expand, on the flat path and on each group row page.
A draft-only grouping entry is never sent as groupBy. The grid groups by the published entries that remain, or draws flat, and one note (grid.grouping.draftOnly) names the field that waits for publish.
After Publish, the column and the grouping work without a reload.
An authored sort on a draft-only field was measured and needs no card. Every preview-wrapped grid sits inside ListView, whose serverSort drops that sort.
The singular wording of the note went to the seat. Dev-effort: medium. Rounds: 1. pm:dispatched removed.
Activity
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
First touch (R1198, 15:5xZ): p1 · domain:ui →
pm:queue.Child of epic #34571, the console core business operations epic that the maintainer graded p1. It inherits p1 · ui. A grouped grid in draft preview fails outright. This adds one to the #34571 release gate.
objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX
Claim: PM loop round 1 · area o3-A · 2026-11-17T16:34Z
Session:
session_01WGufzg2evNa1V3zxrQq3KXAccount:
os-support-aiBranch:
claude/issue-34898-grid-draft-only-fieldsWorktree:
objectstack-issue-34898Domain:
domain:uiSeat:
repo:objectstack#3File surface:
ui/packages/plugin-grid/src/objectGridRowLoad.ts,ui/packages/plugin-grid/src/useServerGrouping.ts,ui/packages/plugin-grid/src/objectGridGroupingDecisions.ts,ui/packages/plugin-grid/src/ObjectGrid.tsx(drawing the grouping-waits note only),ui/packages/plugin-grid/src/objectGridTranslations.ts(+1 default), new tests underui/packages/plugin-grid/src/__tests__/,ui/packages/i18n/src/locales/*.ts(+1grid.grouping.*key each, zh-Hant regenerated), root.changeset/Container & model:
S,mode:subagent,model: TIER_DEFAULT (no path-derived mandate),effort: medium(seat 16:27Z small-console-card rule: console UI only, one surface, no spec/protocol/ADR, not Tier H)Clause-②: yes — one new locale key (the visible "this grouping waits for publish" note the card's Expected names), locale-only; no spec, no new exported prop
Metadata-protocol: none
Responsibility:
ui/packages/plugin-grid (objectstack): under ?preview=draft the grouped grid builds its own row-page $select and groupBy from the schema and treats a field marked _draftOnly as declared, so the door refuses it (INVALID_FIELD in every group, or 'Error loading grid') | no platform path covers it | every author previewing a draft that adds a field shown or grouped in a grouped grid view, once #34807's list half landsThread-read: 6953185289
Premise: holds (code read at origin/main 189358f, pre-claim): plugin-grid has 0 reads of
_draftOnly; the projection gateobjectGridRowLoad.ts:256passes a name the schema declares tocheckFieldand lets an undeclared one through, and the grouping gate:352keeps anyisProjectableFieldname; both 400 shapes were measured by o3-A at #34807 list-half head 509f3ea with the real ListView + object-grid against a refusing double (doorassertProjectionFieldsExistprotocol-data-crud.ts:205,assertGroupByFieldsExist:477). The marker reaches the grid only through the list half's preview wrapper, so the dev measures with a marked schema double first.Serial constraints cleared:
no open PR touches objectGridRowLoad.ts, useServerGrouping.ts, objectGridGroupingDecisions.ts, objectGridTranslations.ts or ObjectGrid.tsx (all open PRs' file lists read); #34925 and #34929 add en keys (budget measured on the merged tree before the PR opens)Pre-claim lane:
domain:ui— every path is underui/packages/**Pre-claim deps: #34807 list half (branch
claude/issue-34807-draft-preview-list, PR opening) supplies the_draftOnlyschema under preview; this card builds on origin/main, tests against a marked schema, and lands after that PRPrior rulings read: seat carrier ruling A (2026-11-17 15:25Z, B/C refused; recorded in this card's body), #34807 ruling 6946403206 (data contract unchanged, client-side fallback); draft preview,grouping,_draftOnly → 0 other hits
Lease
o3-A(seat post #34584); epic #34571.objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX
os-dev-report
{ "issue": 34898, "status": "done", "branch": "claude/issue-34898-grid-draft-only-fields", "pr": "https://github.com/objectstack-ai/objectstack/pull/34944", "session": "session_01WGufzg2evNa1V3zxrQq3KX", "premise_still_valid": true, "summary": "plugin-grid now reads the _draftOnly marker off the definition it already fetches. A draft-only field is never projected: one final filter over the whole row $select, on the flat path and on every group row page, plus $expand. A draft-only grouping entry is refused the same way a masked key is (objectGridGroupingDecisions.ts): it is dropped from unmaskedGroupingFields, so it is never sent as groupBy, and it counts nowhere in serverGroupedFetch, groupingNeedsHeaderQuery or the fetch window. The grid groups by the published entries left, or draws flat. One note, the new key grid.grouping.draftOnly, names the dropped field; it is in en, the 10 other packs (zh-Hant regenerated) and GRID_DEFAULT_TRANSLATIONS, byte-identical to en. Note placement: the element is defined in ObjectGrid.tsx directly after the needsHeaderQuery panel and is drawn under the description, above the rows, in both the table and card branches. needsHeaderQuery is an early return that replaces the grid, while this case withholds nothing, so the note sits in the muted strip ListView uses for its own draft-preview note. useServerGrouping.ts needed no change because its groupBy comes from unmaskedGroupingFields. Head 355184027e86d1226822fdcd303076a54320b75e (merge of origin/main 62fbbeb767 onto the work). Cut from origin/main 189358f212fdd3da6cf5db5f53d00927520a6406. Files (+/-): objectGridRowLoad.ts +49/-3, objectGridGroupingDecisions.ts +54/-11, ObjectGrid.tsx +28, objectGridTranslations.ts +4, new __tests__/serverGroupedDraftOnly-34898.test.tsx +248, 11 locale packs +1 each, .changeset/34898-grid-draft-only-fields.md +13; 407 added / 14 deleted in total. Dev-effort: medium.", "tests": "PREMISE on origin/main 189358f212 (grid src restored from BASE, real ObjectGrid, double marking priority _draftOnly and refusing any request naming it): (A) every group row page $select [\"id\",\"name\",\"priority\",\"category\"], both groups drew INVALID_FIELD: select 'priority'; (B) queryGroupHeaders groupBy [[\"priority\"]], 'Error loading grid' shown 1. Both shapes reproduced. NEW PINS serverGroupedDraftOnly-34898.test.tsx, 7/7 green: column grouped by published, column flat, CONTROL published column, only-draft grouping (no queryGroupHeaders, flat, note), draft+published grouping (groupBy ['category'], note), CONTROL published grouping (groupBy [['priority']], no note), after-Publish rerender with no remount (note gone, groupBy ['priority'], last row page selects priority). How Publish is pinned: the grid is re-rendered, not re-mounted, with a data source answering for the published state. REVERSE against BASE grid src: 5 failed, 2 controls passed. ABLATION via scripts/ablation-replace.mjs on objectGridGroupingDecisions.ts, gate set to false: mutation landed (anchor 1 to 0, blob b161247731d3 to bae39c68d325), 3 failed / 4 passed; restored, blob == HEAD and git diff HEAD empty. Tests import source, not dist, so no rebuild was needed. PACKAGES (pre-merge head 7aaf77af16): plugin-grid vitest 287/287 files, 2476/2476 tests; plugin-grid type-check exit 0; i18n vitest 102/102 files, 1894 passed and 13 skipped; i18n type-check exit 0; lock VERDICT command-exit 0. FINAL HEAD 355184027e targeted re-run (5 grouping files): 50/50.", "gates": "dispatch-gates --commands (objectstack, pre-merge head 7aaf77af16): 41 families, each run with its exit code captured before any pipe: 41/41 exit 0. --ran reconciliation: 41 derived, 41 run, 0 NOT-MEASURED, a DERIVED zero. check:nul-bytes exit 0. overlap-check at each push: VERDICT clean exit 0 (last push at 355184027e; #34914, #34925, #34929 and #34930 share the locale files and merge cleanly). The merge brought in origin/main and touched neither package. CI check-runs on PR #34944: in_progress at report time, not awaited.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "3 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/34944/assignees os-support-ai), relay post-stamped comment POST /repos/objectstack-ai/objectstack/issues/34898/comments; git push direct x3 (probe, WIP, final)", "open_questions": [ { "question": "i18n-locale-en budget: on the merged tree (this branch plus origin/main 62fbbeb767; turbo build of the console closure, VITE_BASE_PATH=/console/ vite build, check:eager-closure) the chunk reads 61,869 gzipped bytes against a 62,000 ceiling, leaving 131 bytes. The same build without this key reads 61,841, so the key costs +28 bytes. #34925, #34929 and the #34807 list half each add an en key. The ceiling was not edited. Who pays if the stack overflows?", "options": ["A land in order and let the PR that turns check:eager-closure red move its namespace", "B move grid.grouping.* (3 keys) to a lazy namespace in a follow-up"], "recommendation": "A, because this key fits today with 131 bytes to spare. The overflow, if it comes, is decided by landing order, and the seat can measure it then." } ], "security_findings": "none", "out_of_scope_findings": ["carrier: none · noted in Acceptance notes, not filed: from code reading only (no repro run), a header-click sort, an authored sort, searchableFields or a view filter naming a draft-only field would still reach the door from this grid; same class, outside the card's columns-and-grouping scope · dedupe words: draft preview, _draftOnly, $orderby, plugin-grid"] }objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX
Delivered · 2026-11-17T18:39Z · PR #34944 merged (97cd541), in the same queue group as #34936, and its
Fixesline closed this card.Under
?preview=draft, a grouped grid no longer requests a draft-only field from the door:$selectand$expand, on the flat path and on each group row page.groupBy. The grid groups by the published entries that remain, or draws flat, and one note (grid.grouping.draftOnly) names the field that waits for publish.An authored sort on a draft-only field was measured and needs no card. Every preview-wrapped grid sits inside ListView, whose
serverSortdrops that sort.The singular wording of the note went to the seat. Dev-effort: medium. Rounds: 1.
pm:dispatchedremoved.