feat(dashboard): Notify users to enter custom headers if required in chat or if custom headers are invalid#1699
feat(dashboard): Notify users to enter custom headers if required in chat or if custom headers are invalid#1699dimaMachina merged 56 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 95facf0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
agents-manage-ui/src/components/agent/playground/playground.tsx
Outdated
Show resolved
Hide resolved
packages/agents-core/src/utils/json-schema/json-schema-to-zod.ts
Outdated
Show resolved
Hide resolved
| border: 1px #ef4444 solid; | ||
| &:after { | ||
| content: 'Custom headers are invalid.'; | ||
| position: absolute; |
There was a problem hiding this comment.
[MAJOR] Hardcoded CSS error message has accessibility issues
The CSS ::after content pseudo-element approach:
- Is not announced by screen readers (accessibility issue)
- Shows generic "Custom headers are invalid" instead of specific validation error
- Cannot be internationalized
- Uses hardcoded color
#ef4444
Consider using a proper React component with the specific error message from form.formState.errors.headers?.message instead of CSS content injection.
|
@inkeep can you check for docs changes. |
packages/agents-core/src/utils/json-schema/json-schema-to-zod.ts
Outdated
Show resolved
Hide resolved
packages/agents-core/src/utils/__tests__/convert-json-schema-to-zod.test.ts
Show resolved
Hide resolved
|
Claude finished @dimaMachina's task in 2m 5s —— View job PR Review Summary1 Key Finding | Risk: Low This PR adds a valuable UX feature — notifying users when custom headers are invalid or required in the playground chat. The implementation is solid with proper defensive error handling and comprehensive test coverage. 🟠🔶
|
| Location | Issue | Status |
|---|---|---|
json-schema-to-zod.ts |
Missing required field handling |
✅ Resolved — File deleted, replaced with zod-from-json-schema library |
validation.ts:46 |
Unguarded JSON.parse | ✅ Resolved — Try-catch with error handling added (lines 45-56) |
chat-widget.tsx:81 |
'use memo' invalid directive |
❌ Invalid — Valid React Compiler annotation (docs) |
package.json:65 |
Breaking change: removed export path | ✅ Not breaking — Functions exported from main entry, SDK imports updated |
Minor observations
| Location | Issue | Reason Excluded |
|---|---|---|
chat-widget.tsx:53-65 |
CSS ::after error message not announced by screen readers |
Minor accessibility — functional workaround via button variant change to destructive-outline |
custom-headers-dialog.tsx:27 |
UseFormReturn<any, any, ...> typing |
Minor type looseness — acceptable given form passed from parent with proper typing at source |
packages/agents-core/src/utils/__tests__/convert-json-schema-to-zod.test.ts
Show resolved
Hide resolved
|
Claude finished @dimaMachina's task in 3m 18s —— View job PR Review Summary0 Key Findings | Risk: Low This PR adds a valuable UX feature — notifying users when custom headers are invalid or required in the playground chat. The implementation is solid with proper defensive error handling and comprehensive test coverage. ✅ All Previous Concerns Addressed
Point-fix Edits (0)No new inline comments needed — all previous issues have been addressed. ✅ APPROVESummary: Excellent work on this feature! 🎉 All critical concerns from previous reviews have been addressed:
Other Findings (3)Minor observations (not blocking)
|
|
@claude can you write a changeset based on changes in this PR |
|
Claude finished @dimaMachina's task in 1m 8s —— View job Changeset Created ✅Created changeset for this PR with the following content: ---
"@inkeep/agents-manage-ui": patch
"@inkeep/agents-core": patch
---
Add custom headers validation in playground chat. Users are now notified when custom headers are invalid or required based on the agent's headers schema configuration.Packages affected:
Committed: |
|
Claude finished @dimaMachina's task in 2m 24s —— View job Task List
Changeset CreatedI've created a changeset file with the following configuration: ---
"@inkeep/agents-manage-ui": patch
"@inkeep/agents-core": patch
"@inkeep/agents-api": patch
"@inkeep/agents-sdk": patch
---
Add custom headers validation in playground chat to notify users when headers are invalid or requiredStatus✅ The changeset has been created and committed locally. To complete the changeset addition, you can either:
The changeset follows the AGENTS.md guidelines:
|
Co-authored-by: Dimitri POSTOLOV <undefined@users.noreply.github.com>
…ramework features
Improvements based on human reviewer insights that bots missed:
1. **Custom implementations vs standard libraries** (pr-review-standards)
- Added detection for custom implementations of standard functionality
- Provides heuristics for when to suggest well-maintained libraries
- Reduces maintenance burden and catches incomplete implementations
- Example: Custom jsonSchemaToZod missed 'required' field handling
2. **Framework compiler feature validation** (pr-review-frontend)
- Added validation for framework compiler directives before flagging as invalid
- Checks package.json for compiler plugins (babel-plugin-react-compiler)
- Reduces false positives on valid React Compiler directives ('use memo')
- Includes framework feature database for React, Next.js, Vue
Key learnings:
- Bots excel at syntactic correctness but miss semantic correctness
- Human reviewers caught: spec violations, library alternatives, emerging features
- Standard libraries handle edge cases custom implementations miss
Source: PR #1699 analysis
Reviewers: Sarah (validation semantics), Dima (root cause), Miles (structure)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Learned from PR #1699 human reviewer feedback: 1. **Documentation Check (HIGH priority)** - pr-review-docs now checks if PR modifies user-facing code without docs - Triggers on: new UI components, API routes, schemas, package exports, SDK changes - Creates CRITICAL finding per AGENTS.md requirement - Human reviewer had to manually remind: "can you check for docs changes" 2. **Changeset Check (HIGH priority)** - pr-review-standards now checks if PR modifies published packages without changeset - Triggers on: agents-core, agents-api, agents-sdk, agents-manage-ui, agents-cli, etc. - Creates CRITICAL finding per AGENTS.md requirement - Human reviewer had to manually request: "can you write a changeset" 3. **React Compiler Annotation Fix (MEDIUM priority)** - pr-review-frontend now recognizes 'use memo' as valid React Compiler annotation - Bot incorrectly flagged this as invalid directive in PR #1699 - Human provided documentation link showing it's valid These patterns were identified through systematic analysis of human vs bot comments, meeting all 4 generalizability criteria: actionable, frequent, objectively verifiable, and not already covered.
https://inkeep.slack.com/archives/C08QXR5CWBH/p1770217539550219?thread_ts=1770145326.982309&cid=C08QXR5CWBH