Feature tile types#197
Merged
Merged
Conversation
…ONAL, CONTEXT, SYSTEM) This is phase 1 of the tile type classification feature. Changes include: Schema changes: - Extend MapItemType enum with ORGANIZATIONAL, CONTEXT, SYSTEM values - Remove deprecated BASE type - Add migration (0014) to convert existing BASE tiles: - Favorited tiles + descendants → 'system' - All other BASE tiles → 'context' - USER tiles unchanged Code updates: - Replace all MapItemType.BASE references with MapItemType.CONTEXT (23+ files) - Update error message from BASE_ITEM_MUST_HAVE_PARENT to NON_USER_ITEM_MUST_HAVE_PARENT - Add comprehensive TDD tests for type classification The new types enable type-aware agent behavior: - organizational: Navigation structure (always visible) - context: Reference material (explore on-demand) - system: Executable capability (invoke via hexecute) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace 'module' variable name with 'toolsModule' to avoid Next.js warning - Use nullish coalescing operator instead of logical OR for safer defaults - Add eslint-disable comment for typeof import() pattern (necessary for dynamic import typing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation for itemType support in MCP tools: - Table showing type values and their semantic meanings - Which tools support itemType (addItem, updateItem, GET tools) - How agents should interpret each type 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Write tests BEFORE implementation (TDD red phase): - TypeSelectorField component tests (rendering, interaction, disabled state) - TileForm integration tests with type selector - useTileState hook tests for itemType state management Tests define expected behavior: - Dropdown with Organizational/Context/System options - Hidden for USER type tiles (root tiles) - itemType included in save callback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add itemType support to the tile creation and editing UI: - Create _TypeSelectorField component with dropdown for type selection - Update useTileState hook to track editItemType state - Integrate TypeSelectorField into TileForm - Update _handleSave to include itemType in save callback - Pass itemType through TileWidget props to TileForm Type options: Organizational, Context (default), System Hidden for USER type tiles (root tiles cannot change type) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove HTMLSelectElement type assertion that ESLint flagged as unnecessary. Use toBeDisabled() matcher instead of checking .disabled property. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation for itemType support in the tile editing UI: - Table showing type values and their UI behavior - Key behaviors for type selector visibility and defaults - Updated responsibilities to include type editing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the new MapItemType enum values and their semantic meanings: CLAUDE.md: - Add Tile Types section explaining USER, ORGANIZATIONAL, CONTEXT, SYSTEM - Document agent behavior expectations for each type - Add migration note about BASE → split types UBIQUITOUS.md: - Add comprehensive definitions for each tile type - Explain semantic classification purpose - Document when agents should explore vs invoke tiles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…chemas and handlers
The itemType field was not being passed from UI dropdown changes through to the API mutation, causing updates to not persist after page reload. Changes: - Add itemType to UpdateMapItemAttrsSchema in parameters.ts - Add toItemTypeEnum converter in mutation-callbacks.ts - Thread itemType through MutationCoordinator and mutation wrappers - Include itemType in TileData adapt function and tile handlers - Update all test files to include mandatory itemType in mock TileData 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Make itemType required in API schema (map-schemas.ts) instead of optional - Remove default fallback in service layer (_item-crud.service.ts) - Add itemType to all callers: agentic.ts, execute-task route, MCP tools - Thread itemType through frontend mutation coordinator chain - Create createTestItem factory helper with sensible defaults for tests - Update 38 test files to use factory instead of direct addItemToMap calls This ensures itemType is always explicitly passed in application code while tests can use the factory's default (CONTEXT) when they don't care about the specific type. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add NonUserMapItemType, NonUserMapItemTypeString, VisibilityString types - Replace hardcoded string unions with proper types across ~15 files - Add structural constraints for tile type hierarchies: - SYSTEM tiles must have SYSTEM structural descendants - CONTEXT tiles must have CONTEXT structural descendants - ORGANIZATIONAL tiles can only be under USER or ORGANIZATIONAL parents - Add batchUpdateItemTypeWithStructuralDescendants SQL query for cascade updates - When updating to SYSTEM/CONTEXT, cascade to structural descendants (1-6) - Skip hexplans (direction 0) and composition children (-1 to -6) - Add comprehensive integration tests for hierarchy validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…used import - Extend test file ESLint override to disable no-unsafe-* rules - ESLint's TypeScript parser fails to resolve types from test helper factories, causing 320 false positive errors (pnpm typecheck passes) - Remove unused MapItemCreateAttributes import from _mutation-wrappers.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.