Repository navigation
refactor(ui): drop dead optional chains, unused reset and barrel exports - #222
Merged
jackchuma merged 1 commit intoOct 30, 2026
Merged
Conversation
J-Engine-Session: toshi:27750643-050f-4c78-9efd-99679f5d4263
Collaborator
✅ Heimdall Review Status
|
Collaborator
Author
Review round 1Reviewers: cbhq-openai/gpt-6.1-sol
🤖 Reply generated with Toshi |
jackchuma
marked this pull request as ready for review
October 30, 2026 18:04
mw2000
approved these changes
Oct 30, 2026
jackchuma
deleted the
toshi/cleanup-dead-chains-reset-barrel-exports-9c0dcbf0
branch
October 30, 2026 18:15
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.
What changed? Why?
Removes dead code in the validation and signing UI. Behavior stays the same.
page.tsx,ValidationResults.tsx: drop?.onValidationData.expectedand.actual. Both are required in the type, and every response fromvalidation-service.tssets them, so the chains never short-circuit. The?.on the optionaldomainAndMessageHashesstays.useValidationRunner: drop the twoas ValidationDatacasts. The!validationResult.dataguard already narrows the type.HardwareSigning.tsx: dropdisabled={loading}from the Sign button.Buttonalready setsdisabled={disabled || isLoading}, and the button passesisLoading={loading}.ValidationResults.tsx:getIconloses itssizeparameter. Both callers passed 24, so the icons now setsize={24}directly.Interfaces removed:
resetfromuseValidationRunner's return value. Its only consumer,ValidationResults.tsx, destructureserror,result,isLoading,isInstallingDeps,runValidationand never readsreset. No other file references it. It came from the refactor in c4ab7f3 (chore: refactor ValidationResults.tsx #86), with no sign it was meant for later use.Badge,Button,Card,HeaderandSectionHeaderre-exports fromcomponents/ui/index.ts. The barrel's only importer,page.tsx, takesPageShellandStepIndicator; every other file imports./ui/<Component>directly.Notes to reviewers
Found by the cleanup scanner. README, DEPENDENCY-OVERRIDES.md and test fixtures reference none of the removed code.
How has it been tested?
npm run build,npm run lint,npx tsc --noEmit,npm test(159 passed) and prettier on tracked files all pass. No tests were added: nothing here changes behavior, and the typecheck covers the removed references.Why this cleanup
Production: 31 lines removed, 14 added, net −17 across 5 files. Tests: unchanged.
Interfaces removed:
resetfromuseValidationRunner's return value, and theBadge,Button,Card,HeaderandSectionHeaderre-exports fromcomponents/ui/index.ts.A reader no longer has to wonder whether
expected/actualcan be missing, whetherresethas a hidden caller, why two casts are there, whether the Sign button disables differently fromButton's default, or whygetIcontakes a size.Keep-gate judge: safe dead-code removal with behavior unchanged; nothing removed is used or planned, and bundled together the items are worth a short review.