refactor: Export isFinalId from id-compressor internally and reference it in SharedTree#27306
refactor: Export isFinalId from id-compressor internally and reference it in SharedTree#27306Abe27342 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Exports isFinalId from the id-compressor /internal entrypoint and replaces inline >= 0 / < 0 checks in SharedTree with it for clarity.
Changes:
- Export
isFinalIdfrom id-compressor/internaland add@internal+@privateRemarksdocs. - Replace explicit short-id sign checks with
isFinalIdcalls in SharedTree codecs. - Remove related TODO comments.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/id-compressor/src/index.ts | Re-exports isFinalId. |
| packages/runtime/id-compressor/src/identifiers.ts | Adds @internal and explanatory privateRemarks to isFinalId. |
| packages/dds/tree/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts | Uses isFinalId for narrowing. |
| packages/dds/tree/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts | Uses isFinalId on stream value. |
| packages/dds/tree/src/core/tree/detachedFieldIndexCodecV2.ts | Replaces sign checks with isFinalId. |
| packages/dds/tree/src/core/tree/detachedFieldIndexCodecV1.ts | Replaces sign checks with isFinalId. |
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (36 lines, 6 files), I've queued these reviewers:
How this works
|
Description
Replaces explicit checks against 0 for short ids with
isFinalId, exporting it from the/internalentrypoint.