Skip to content

Feature tile types#197

Merged
Diplow merged 14 commits into
developfrom
feature-tile-types
Jan 2, 2026
Merged

Feature tile types#197
Diplow merged 14 commits into
developfrom
feature-tile-types

Conversation

@Diplow
Copy link
Copy Markdown
Owner

@Diplow Diplow commented Jan 2, 2026

No description provided.

Diplow and others added 11 commits January 1, 2026 15:57
…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>
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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 2, 2026

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

Project Deployment Review Updated (UTC)
hexframe Ready Ready Preview, Comment Jan 2, 2026 4:56am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- 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>
@Diplow Diplow merged commit 23cef3e into develop Jan 2, 2026
12 of 14 checks passed
@Diplow Diplow deleted the feature-tile-types branch January 2, 2026 04:57
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