Skip to content

fix(app-shell): ActionResultDialog renders rows for unresolved field paths (labelled undefined) #2673

Description

@baozhoutao

Problem

packages/app-shell/src/views/ActionResultDialog.tsx renders one row per declared resultDialog.fields[] entry unconditionally. When a field's dot path does not resolve in the response payload (readPath returns undefined), the row still renders; the text/secret format guards see a non-string and degrade to JsonBlock, which prints the literal undefined under the field's label.

Real triggers (framework sys_user.create_user resultDialog)

  1. Admin types the password manually → the create-user response has no temporaryPassword key (it is only present when the server mints one), yet the dialog shows a Temporary Password row with undefined — right under the copy-it-now warning text.
  2. We want to add user.phoneNumber echo to the dialog, but the response carries phoneNumber only for phone-based accounts — for email-only users the declared field would render a dirty row. Blocks feat(platform-objects): create_user result dialog should echo the sign-in phone number framework#3260.

Proposed fix

Resolve values when building the render plan and skip any entry whose non-empty path resolves to undefined. Keep the empty-path (path: '') whole-payload JSON fallback as-is. Declared fields become safe to use for response-shape-dependent keys.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions