Repository navigation
fix(ledger): a report package's block selects its entity - #260
Merged
Merged
Conversation
2.10.0 added entityId to the information-block documents but not to the report package's block, so a report block no longer typed as an InformationBlock. A type assertion keeps the two selections in step.
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.
Summary
2.10.0 (#259) added
entityIdto the information-block documents, which makes it a required key onInformationBlock. The report package'sitems[].blockselection didn't get it, so a report block stopped typing as anInformationBlock. roboledger-app's report page passes one to the sameBlockViewthe close panels use, and fails typecheck on 2.10.0.reportPackageselectsentityIdon each item's block.LedgerClient.tschecks thatReportPackageItem['block']is assignable toInformationBlock, so the two selections can't drift apart again. Verified that it fails without the query fix.Patch, as the follow-on to 2.10.0 (→ 2.10.1). Like 2.10.0, it names a field the server serves from robosystems #1752.
Test plan
npm run generate:graphqlagainst the local stacknpm test426 passedreports/[id]/content.tsx, which is this mismatch🤖 Generated with Claude Code