Uh oh!
There was an error while loading. Please reload this page.
feat(detail+fields+components+app-shell): record inline-edit polish — expanded-value passthrough, approval-lock preflight, numeric inputs, edit-CTA gate, keyboard shortcuts (#2572) - #2604
Merged
Conversation
…2572) Follow-up polish to the record-level inline edit (#2407), from the live showcase verification pass: - InlineFieldInput passes $expand-ed reference values through to LookupField/UserField uncollapsed, so the picker shows the display name it already has instead of re-fetching via findOne; LookupField collapses to bare ids (normalizeId) before handing the value to its Level-2 pickers (PeoplePicker / RecordPickerDialog). - Approval-lock preflight: RecordDetailView re-reads the approval state on every record invalidation (a save can trigger a locking approval flow), derives one approvalLocked signal (approval_status OR pending request), gates InlineEditProvider.canEdit with it, and drives the save bar's locked/lockedHint. - number/currency/percent inline-edit via the real form widgets (NumberField/CurrencyField/PercentField); NumberField/CurrencyField surface metadata min/max, NumberField honors explicit step and steps by 1 for scale: 0. - Header Edit CTA is disabled while an inline session is active (sys_edit carries disableDuringInlineEdit; page:header renderer greys flagged actions out while InlineEditContext.editing). - Keyboard shortcuts on the save bar: Esc cancels (deferring to open Radix layers), Cmd/Ctrl+Enter saves; both respect saving/locked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQjNZDdqmz2QHGQndpjZrR
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 16, 2026 13:26
Uh oh!
There was an error while loading. Please reload this page.
os-zhuang added a commit
that referenced
this pull request
Jul 16, 2026
…ive e2e (#2572) (#2615) Live dogfood follow-up to the #2572 polish (PR #2604): DetailSection and HeaderHighlight enrich the field they hand InlineFieldInput from an explicit whitelist of objectSchema keys, and that list dropped the numeric range/step constraints — so a currency field declaring min: 0 rendered its number input with no min/max/step. Both enrichments now pass min/max/step through. Also adds e2e/live/inline-edit-polish-2572.spec.ts, a live spec driving the whole #2572 polish set against the real showcase stack (expanded-lookup passthrough with zero hydration fetches, currency min/step, header Edit CTA disable, Esc/Ctrl+Enter, and the approval-lock preflight via the showcase_budget_approval flow). Verified green end-to-end. Claude-Session: https://claude.ai/code/session_01JQjNZDdqmz2QHGQndpjZrR Co-authored-by: Claude <noreply@anthropic.com>
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.
Closes#2572 — all five polish items from the live showcase verification pass of the record-level inline edit (#2407 / #2529 / #2542 / #2549).
1. Expanded-value passthrough (no more re-fetch just to show a name)
InlineFieldInputno longer collapses an$expand-ed reference record to a bare id before handing it toLookupField/UserField— the picker'sresolveSelectedOptionmaps the object directly, so the display name the record page'spopulate=already delivered renders synchronously with zero hydrationfindOne. Complementary fix inLookupField: the Level-2 pickers (PeoplePicker/RecordPickerDialog) do operate on bare ids (seed queries, selected-row matching), so the value handed to them is collapsed via the existingnormalizeId— an object-shaped id can no longer leak into a$inseed filter.extractLookupIdstays exported for write-side callers.2. Approval-lock preflight
RecordDetailViewnow:useRecordApprovals().refresh()on every record invalidation (skipping the initial mount) — a save can trigger an approval flow (verified live:flow:showcase_budget_approval), and the approvals snapshot previously stayed frozen at page load;approvalLockedsignal —approval_statuspending/in_approval(what the DetailView lock band keys off) or an open pending request from the approvals API;InlineEditProvider.canEditwith it, so a locked record hides the hover pencils andenter()no-ops — users can no longer type a whole draft only to be rejected withRECORD_LOCKEDat Save;locked+lockedHintprops from the same signal.3. Numeric field types edit with real numeric widgets
number/currency/percentroute toNumberField/CurrencyField/PercentField— the SAME widgets the form uses — instead of the free-text fallback: numeric keyboard, currency symbol adornment, fraction↔percent display conversion, and numbers (not strings) staged into the draft. Supporting widget fixes:NumberField+CurrencyFieldsurface metadatamin/maxon the input (Project.budget'smin: 0is no longer ignored);NumberFieldhonors an explicit metadatastepand steps by 1 forscale: 0(previously0was falsy →step="any").decimal/integerare not@objectstack/specFieldTypes (metadata should declarenumberwithscale), so per AGENTS.md commandment #0.1 they are deliberately not aliased in the renderer.4. Header Edit CTA stands down during an inline session
The synthesized
sys_editaction carries a newdisableDuringInlineEditflag; thepage:headerrenderer greys flagged actions out (inline buttons and overflow menu items) whileInlineEditContext.editingis true — the classic form-edit surface can no longer be stacked on top of a live inline draft. Outside anInlineEditProviderthe hook returns null and nothing changes.5. Keyboard shortcuts for the shared edit session
InlineEditSaveBarinstalls record-level bindings while the session is active:[data-radix-popper-content-wrapper], opendialog/alertdialog) — popovers keep owning Escape for "close";saving/lockedand standing down while the conflict dialog drives the session.Verification
findOne, name renders), currency/number/percent inline editors (min, scale-0 step, numeric emission, % conversion), header-CTA disable under a live session, all five shortcut behaviors (commit, locked no-op, cancel, defer-to-popover, inert-when-idle), NumberField min/max/step.turbo run buildgreen for the four touched packages (includestsctypecheck for app-shell/fields).page-header-actions.test.tsx(Cannot create components during renderon the untouchedPageHeaderhelper) exists onmainand is not introduced here.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQjNZDdqmz2QHGQndpjZrR
Generated by Claude Code