Skip to content

Conversation

@andersonleal
Copy link
Contributor

Summary

Fixed a critical bug where state keys containing colons were being truncated during display and delete operations. The issue occurred because the code was using split(':') which splits on all colons instead of just the first separator between groupId and key.

Example of the bug:

  • Stored key: "groupId:my:complex:key"
  • Before fix: displayed as "my" (truncated) ❌
  • After fix: displays as "my:complex:key"

This fix ensures that state keys with colons are properly handled in both file-based and memory-based state adapters, as well as in the delete API endpoint.

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Other (please describe):

Checklist

  • I have read the CONTRIBUTING.md
  • My code follows the code style of this project
  • I have added tests where applicable
  • I have tested my changes locally
  • I have linked relevant issues
  • I have added screenshots for UI changes (if applicable)

Testing

  • ✅ State keys with colons now display correctly in the states plugin UI
  • ✅ Delete operations work properly for keys containing colons
  • ✅ Both file-based and memory-based state adapters handle complex keys
  • ✅ No linter errors introduced

Additional Context

This bug would have affected any state keys that use colon-separated namespacing or hierarchical naming conventions (e.g., user:profile:settings, cache:session:data, etc.). The fix is backward compatible and doesn't break existing keys without colons.

@vercel
Copy link

vercel bot commented Oct 31, 2025

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

Project Deployment Preview Comments Updated (UTC)
motia-docs Ready Ready Preview Comment Oct 31, 2025 8:47pm
motia-ui Ready Ready Preview Comment Oct 31, 2025 8:47pm

@github-actions
Copy link

E2E Test Results ✅

All tests have completed. Tests passed.

Matrix: 2 OS (Ubuntu, macOS) × 2 Templates (Node.js, Python) = 4 jobs

View detailed test results


This comment is automatically posted by the PR E2E Results workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants