Skip to content

Conversation

@dimaMachina
Copy link
Collaborator

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

⚠️ No Changeset found

Latest commit: 95fd82c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Jan 28, 2026

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

Project Deployment Review Updated (UTC)
agents-api Ready Ready Preview, Comment Jan 28, 2026 8:12am
agents-docs Ready Ready Preview, Comment Jan 28, 2026 8:12am
agents-manage-ui Ready Ready Preview, Comment Jan 28, 2026 8:12am

Request Review

@dimaMachina dimaMachina requested a review from anubra266 January 28, 2026 08:11
@claude
Copy link

claude bot commented Jan 28, 2026

Claude finished @dimaMachina's task —— View job


I'll review this PR that refactors type exports in the agents-docs package.

Tasks

  • Analyze the deleted types files to understand what was removed
  • Review changes to MDX files and AutoTypeTable usage
  • Check for potential breaking changes or documentation issues
  • Provide comprehensive architectural review feedback

Analysis Summary

This PR refactors how TypeScript types are referenced in documentation by:

  1. Removing intermediate type files:

    • content/talk-to-your-agents/types.ts (exported 10 types from @inkeep/agents-ui)
    • content/typescript-sdk/types.ts (exported 2 types from @inkeep/agents-cli/config)
  2. Direct type imports: Changed from path-based to direct export statements in AutoTypeTable usage:

    • Before: <AutoTypeTable path="./content/talk-to-your-agents/types.ts" name="InkeepChatButtonProps" />
    • After: <AutoTypeTable name="default" type="export { InkeepChatButtonProps as default } from '@inkeep/agents-ui'" />

The approach leverages the fumadocs-typescript generator which can parse inline type export statements directly.


Review Feedback

Strengths

1. Eliminates maintenance burden

  • Removes intermediate type re-export files that were just pass-through layers
  • Reduces the risk of type drift when upstream packages evolve
  • Follows DRY principles by referencing types at their source

2. More explicit and traceable

  • Type imports are now visible directly in the documentation files
  • Clear lineage from documentation to actual package exports
  • Easier to audit which types are being documented

3. Consistent pattern application

  • Applied uniformly across all affected documentation files
  • Uses the same name="default" + type="export..." pattern consistently

⚠️ Areas for Consideration

1. Changeset requirement
As noted by the changeset-bot, this affects the agents-docs package. While this is technically a refactoring that shouldn't change the end-user experience, consider adding a changeset:

pnpm bump patch --pkg agents-docs "Refactor type documentation to use direct exports instead of intermediate files"

2. Documentation maintainability trade-offs
The inline type attribute creates longer, more verbose AutoTypeTable declarations:

<AutoTypeTable path="./content/talk-to-your-agents/types.ts" name="InkeepChatButtonProps" />


<AutoTypeTable name="default" type="export { InkeepChatButtonProps as default } from '@inkeep/agents-ui'" />

Consideration: For frequently referenced types, the repetition could make bulk updates more error-prone. However, this trade-off seems reasonable for the benefits gained.

3. Type resolution verification
Since the fumadocs-typescript generator now needs to resolve types directly from package exports rather than local files, ensure that:

  • All referenced packages are properly installed in the docs build environment
  • The TypeScript resolution can find these exports correctly
  • Consider adding a build verification step that confirms all AutoTypeTable references resolve successfully

📋 Minor suggestions

1. Consider abstracting common patterns
If this pattern grows, consider creating constants or helper functions:

// Example: agents-docs/src/lib/type-refs.ts
export const AGENTS_UI_TYPES = {
  InkeepChatButtonProps: "export { InkeepChatButtonProps as default } from '@inkeep/agents-ui'",
  InkeepBaseSettings: "export { InkeepBaseSettings as default } from '@inkeep/agents-ui/types'",
  // ...
} as const;

2. Documentation pattern
Consider documenting this pattern in the repository's documentation style guide to help future contributors understand when to use direct exports vs. local type files.

🔍 System Design Assessment

Architecture alignment: This change aligns well with modern documentation practices by:

  • Reducing indirection layers
  • Making dependencies explicit
  • Following "single source of truth" principles

Scalability: The approach scales well as new types are added to the underlying packages without requiring updates to intermediate files.

Maintainability: Net positive impact - fewer files to maintain, more explicit dependencies, clearer audit trail.

Recommendation

This is a solid refactoring that improves the documentation system's architecture. The changes are well-executed and consistent. I recommend:

  1. Approval - The changes are beneficial and well-implemented
  2. Add changeset - For proper versioning and changelog tracking
  3. Consider the minor suggestions above for future iterations

The removal of 118 net lines while maintaining the same functionality is a good indicator of successful simplification.

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.

2 participants