@inkeep/agents-manage-ui: remove unused exports
🦋 Changeset detected
Latest commit: 62bdd5e334bc23c37748ebb1e6106de537dd26e1
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 9 packages
| Name | Type |
|---|---|
| @inkeep/agents-manage-ui | Patch |
| @inkeep/agents-manage-api | Patch |
| @inkeep/agents-run-api | Patch |
| @inkeep/agents-cli | Patch |
| @inkeep/agents-core | Patch |
| @inkeep/agents-sdk | Patch |
| @inkeep/ai-sdk-provider | Patch |
| @inkeep/create-agents | Patch |
| test-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
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| agents-docs | Preview | Comment | Nov 6, 2025 6:02pm | |
| agents-manage-api | Preview | Comment | Nov 6, 2025 6:02pm | |
| agents-manage-ui | Preview | Comment | Nov 6, 2025 6:02pm | |
| agents-run-api | Preview | Comment | Nov 6, 2025 6:02pm |
Claude finished @dimaMachina's task —— View job
Code Review: Remove Unused Exports PR
I've completed a comprehensive review of this PR that systematically removes unused exports across the codebase using Knip.
Overview
This PR introduces automated tooling to detect and remove unused exports, focusing primarily on the @inkeep/agents-manage-ui package. The changes span 43 files with +409/-76 lines, affecting 9 packages via changesets.
✅ Strengths & Positive Aspects
1. Tooling Integration
- Smart Configuration: Added
knip.config.tswithtags: ['-lintignore']- respects existing manual annotations - Automation: Added
pnpm knip --fix-type exportsscript for automated cleanup - Systematic Approach: 25+ commits show methodical, incremental cleanup
2. Strategic Preservation
- UI Component Libraries: Correctly preserves complete API surface for reusable components (
Card*,DropdownMenu*,Table*) - Public APIs: Maintains external-facing exports that may be consumed by other packages
- Selective Cleanup: Uses
/** @lintignore */comments to mark intentionally exported but currently unused items
🚨 Critical Issues Requiring Attention
1. Changeset Quality Control
HIGH PRIORITY: The changeset .changeset/fine-dots-live.md contains only "dd" as description:
---
"@inkeep/agents-manage-ui": patch
---
dd
Action Required: Replace with proper description like:
---
"@inkeep/agents-manage-ui": patch
---
Remove unused exports using Knip automation tool
2. Breaking Change Risk Assessment
MEDIUM-HIGH PRIORITY: While this targets internal unused exports, consider:
- Internal Consumers: Other packages in the monorepo may import these exports
- Dynamic Imports: Runtime
require()/import()calls won't be detected by static analysis - External Integration: If these packages are consumed externally, this could be breaking
Recommendations:
- Run full test suite across all packages:
pnpm test - Build all packages:
turbo build - Consider gradual rollout if external consumers exist
3. Potential Over-Automation
MEDIUM PRIORITY: Some preserved exports might actually be unused:
In agents-manage-ui/src/lib/types/agent-full.ts:29, several types are imported but potentially unused:
import {
// ... many imports that might not be used anywhere
type ExternalAgentApiInsert,
type FunctionApiInsert,
// etc.
} from '@inkeep/agents-core/client-exports';
Recommendation: Verify these type imports are actually needed or if they're legacy remnants.
🔍 System Architecture Considerations
1. Maintenance Strategy
- CI Integration: Consider adding
pnpm knip --no-fix-typeto CI to catch unused exports early - Documentation: Add guidelines to
AGENTS.mdabout when to use@lintignore
2. API Design Patterns
The PR shows good judgment in preserving complete component APIs:
// Good: Preserves complete Card component API
export {
Card,
CardHeader,
CardFooter,
CardTitle,
/** @lintignore */
CardAction, // May be used by consumers later
CardDescription,
CardContent,
};
3. Bundle Size Impact
POSITIVE: This cleanup should improve tree-shaking and reduce bundle sizes, especially for selective imports.
📋 Minor Quality Issues
4. Code Consistency
- Pattern Variation: Some files use
@lintignoremore liberally than others - consider establishing clearer guidelines - Import Organization: Some files could benefit from import cleanup alongside export cleanup
5. File-Specific Notes
- UI Components: Good preservation of Radix UI wrapper APIs that follow established patterns
- Server Actions: Nango integration functions appropriately preserve server-side API surface
- Type Definitions: Agent type exports maintain necessary type contracts
🎯 Recommendations
Immediate Actions (Before Merge)
- Fix changeset description (Critical)
- Run comprehensive tests across all packages
- Verify build success for all affected packages
Follow-up Actions
- CI Integration: Add knip check to prevent unused export accumulation
- Documentation: Update development guidelines with knip usage patterns
- Monitoring: Track bundle size improvements from this cleanup
Architecture Evolution
- API Boundaries: Consider formalizing which packages export public APIs vs internal utilities
- Export Strategies: Establish patterns for when to use barrel exports vs direct exports
🔐 Security & Safety Assessment
- No Security Concerns: Changes are purely structural, removing unused code paths
- Type Safety: TypeScript will catch any missed dependencies at compile time
- Runtime Safety: No runtime behavior changes, only build-time optimizations
✅ Final Verdict
This PR demonstrates excellent engineering hygiene and systematic technical debt reduction. The automated approach using Knip is well-implemented with appropriate safeguards.
Approval Contingent On: Fixing the changeset description and confirming all tests/builds pass.
The strategic use of @lintignore shows thoughtful consideration of API design and future extensibility, while the systematic cleanup improves codebase maintainability and bundle efficiency.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.
If this PR is still relevant:
- Rebase it on the latest main branch
- Add a comment explaining its current status
- Request a review if it's ready
Thank you for your contributions!