Skip to content

open custom headers modal if there is validation errors#1738

Merged
dimaMachina merged 3 commits intomainfrom
open-custom-headers-modal
Feb 5, 2026
Merged

open custom headers modal if there is validation errors#1738
dimaMachina merged 3 commits intomainfrom
open-custom-headers-modal

Conversation

@dimaMachina
Copy link
Copy Markdown
Collaborator

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 5, 2026 7:08pm
agents-manage-ui Ready Ready Preview, Comment Feb 5, 2026 7:08pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Feb 5, 2026 7:08pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: 830ab73

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@inkeep/agents-manage-ui Patch
@inkeep/agents-api Patch
@inkeep/agents-cli Patch
@inkeep/agents-core Patch
@inkeep/agents-manage-mcp Patch
@inkeep/agents-mcp Patch
@inkeep/agents-sdk Patch
@inkeep/agents-work-apps Patch
@inkeep/ai-sdk-provider Patch
@inkeep/create-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dimaMachina
Copy link
Copy Markdown
Collaborator Author

@claude add changeset based on changes in this PR

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 5, 2026

Claude encountered an error —— View job


PR Review in Progress

  • Analyze PR context and changes
  • Explore codebase for relevant context
  • Dispatch specialized reviewers
  • Synthesize findings and post review

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 5, 2026

Claude finished @dimaMachina's task in 1m 44s —— View job


Changeset Added ✅

Todo List:

  • Review the changed files to understand the implementation
  • Create changeset file for agents-manage-ui package
  • Commit and push the changeset

Successfully added a changeset for the custom headers modal fix. The changeset:

  • Package: @inkeep/agents-manage-ui
  • Version bump: patch
  • Description: "Fix custom headers modal to automatically open when validation errors are present on mount"

The changeset has been committed and pushed to the PR branch.

Comment thread agents-manage-ui/src/components/agent/playground/custom-headers-dialog.tsx Outdated
@vercel vercel Bot temporarily deployed to Preview – agents-docs February 5, 2026 19:05 Inactive
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 5, 2026

Claude finished @dimaMachina's task in 1m 53s —— View job


PR Review Summary

0 Key Findings | Risk: Low

This is a clean, well-implemented UX improvement that lifts modal state to the parent component to enable auto-opening when validation errors are present on mount.

Changes Reviewed

File Summary
playground.tsx Added isCustomHeadersModalOpen state; useEffect triggers validation on mount and opens modal if invalid
custom-headers-dialog.tsx Removed internal useState for isOpen; now receives isOpen/setIsOpen as props (controlled component)
.changeset/* Proper changeset file added

Analysis

State Lifting Pattern

  • The change correctly lifts isOpen state from CustomHeadersDialog to Playground
  • This follows React's controlled component pattern, enabling the parent to programmatically open the dialog
  • Props isOpen and setIsOpen are appropriately typed

Validation Logic

  • The useEffect correctly triggers form validation on mount via form.trigger()
  • Uses .then() to check validation state after the async validation completes
  • Only opens modal when state.invalid is true (validation failed)

Import Cleanup

  • Correctly removed unused useState import from custom-headers-dialog.tsx
  • The existing inline comment from @dimaMachina about using import type { FC } appears to already be addressed in the current diff

Minor Observations (No Action Required)

The biome-ignore comment useExhaustiveDependencies: validate on mount is appropriate - the empty dependency array is intentional to run validation only once on component mount.


✅ APPROVE

Summary: This is a straightforward UX improvement with clean implementation. The state lifting pattern is correct, the validation logic properly handles async form validation, and the changeset is appropriately scoped. Ship it! 🚀


@dimaMachina dimaMachina merged commit 4d291f1 into main Feb 5, 2026
8 checks passed
@dimaMachina dimaMachina deleted the open-custom-headers-modal branch February 5, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant