Skip to content

Daniel/mehga#645

Open
dadukhankevin wants to merge 3 commits intodevfrom
daniel/mehga
Open

Daniel/mehga#645
dadukhankevin wants to merge 3 commits intodevfrom
daniel/mehga

Conversation

@dadukhankevin
Copy link
Copy Markdown
Contributor

No description provided.

@dadukhankevin dadukhankevin linked an issue Feb 19, 2026 that may be closed by this pull request
@dadukhankevin dadukhankevin changed the base branch from main to dev March 22, 2026 20:40
dadukhankevin and others added 3 commits March 22, 2026 15:45
- Add optional `id` field to all edit history types (EditHistoryBase, EditFor, etc.)
- Add `CellValueOnDisk` type: `{ selectedEdit, updatedAt }` for on-disk cell values
- Add `activeEditId` to cell metadata and QuillCellContent for O(1) edit lookup
- Add `generateEditId()` using SHA-256 via existing uuidUtils
- Add `resolveCellValue()` helper for reading raw .codex JSON safely
- Serializer bridge: deserialize resolves object→string, serialize writes string→object
- Merge dedup uses edit `id` as primary key (composite fallback for legacy)
- `applyEditToCell` saves value as `{ selectedEdit, updatedAt }` when edit has id
- CodexDocument: all new edits get `id: randomUUID()`, sets `activeEditId`
- New `selectEdit(cellId, editId)` method for rollbacks preserving validations
- `getCellValueData` does O(1 lookup by activeEditId with scan fallback
- Migration `migration_editValueObject`: backfills IDs, converts cell.value to object
- Updated raw-JSON touchpoints (matcher, updater, cellUtils, sharedUtils)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update test assertions to handle CellValueOnDisk object format on disk:
- codexCellEditor.test.ts: check edit value via selectedEdit lookup
- codexCellEditorProvider.test.ts: same pattern for disk persistence
- editMapUtils.test.ts: duplicate edit needs same id for dedup
- providerMergeResolve.test.ts: merged cell.value is now an object

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CodexCellDocument reads .codex files directly via JSON.parse, bypassing
the serializer. When cell.value is saved as { selectedEdit, updatedAt }
on disk, the constructor needs to resolve it to a string just like the
serializer does, otherwise downstream code breaks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dadukhankevin dadukhankevin force-pushed the daniel/mehga branch 2 times, most recently from dbafc52 to 960b6a4 Compare March 22, 2026 20:51
@BenjaminScholtens BenjaminScholtens changed the base branch from dev-old to dev March 27, 2026 16:36
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.

MEHGA

1 participant