Uh oh!
There was an error while loading. Please reload this page.
fix(plugin-form): managed 对象按 userActions.edit 逐字段 readonly 渲染,取消一刀切禁用(ADR-0092 D4) - #2395
Merged
Merged
Conversation
…anket-disable fields (ADR-0092 D4)
ObjectForm disabled every field on any non-platform lifecycle bucket
(config/system/append-only/better-auth) — a defensive default from when
those objects had no generic edit affordance. Now that an object can open
per-record editing via userActions.{edit,create} (framework ADR-0092 D4,
e.g. sys_user exposing name/image), the blanket lock lifts for the
current mode when its affordance is true, and each field's own readonly
flag decides. Managed buckets still default the affordance off, so
non-opted-in objects are unchanged. Server-side write guard remains the
real boundary; this is UX only.
Fixes the 'visible but non-functional Edit button' on sys_user surfaced
verifying framework #2817 (framework-side #2833).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGAN5VvvBi4YRGwpNT6e21The 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 11, 2026 09:53
Uh oh!
There was an error while loading. Please reload this page.
5 tasks
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.
概要
ADR-0092 D4 的 objectui 配套。
ObjectForm(packages/plugin-form/src/ObjectForm.tsx:475)此前对任何非platform生命周期桶(config/system/append-only/better-auth)的所有表单字段一刀切disabled—— 这是这些对象过去没有通用编辑 affordance 时的防御默认。framework 侧(ADR-0092 D4 / #2817)已让
sys_user通过userActions:{edit:true}开放档案字段编辑,并对非档案字段逐字段标readonly。但 vendored console 的一刀切禁用把本应可编辑的name/image也锁死 → Edit 按钮"可见但不可用"(framework #2833)。改动
ObjectForm字段生成时:当对象在当前 mode 的 affordance 为true(userActions.edit/userActions.create显式开启)时,取消一刀切锁,改由每个字段自己的readonly决定:sys_user(better-auth + edit:true):name/image(readonly:false)→ 可编辑;readonly 字段仍被既有机制排除在编辑表单外,永不可编。服务端身份写守卫(framework #2828)才是真正边界,本改动仅 UX。
测试
新增
ObjectForm.managedEdit.test.tsx(3 例,全过):better-auth+edit → name 可编辑且无 readonly 字段泄漏为可编辑 input;better-auth 无 edit → 一刀切禁用;platform → 可编辑。plugin-form 全套 196 通过;pnpm --filter @object-ui/plugin-form build通过。联动 / 相关
pnpm objectui:refresh更新 pin SHA + vendored bundle 后,framework refactor(spec-bridge): remove the dead page/dashboard bridges (#1892) #2817(PR feat: gate detail/form edit & delete on the server's effective operation set (#3546) #2832)的 affordance 才真正可用。🤖 Generated with Claude Code
https://claude.ai/code/session_01YGAN5VvvBi4YRGwpNT6e21
Generated by Claude Code