Conversation
- cypress CI: install deps before secrets + --ignore-scripts - Mention schema: escape id/label before innerHTML (XSS) - ChargeFilter: clearTimeout cleanup in effect - Radio + MultipleComboBox: key before spread - check-translations / TableCommands: hoist repeated property reads - doctor.config: ignore two verified false-positive unused-file hits
- index-map lookups replace find() in loops (Invoices, useAddSubscription, useCreateCreditNote) - Set replaces includes() in loops (useFilters, ChargeFilter) - flatMap replaces map().filter(Boolean) double-pass (useFieldError, TextInputFieldForTanstack, PricingBlockView) - reduce replaces sort()[0] for max (getMostRecentPaymentMethodId) - length check before every() (mapFromApiToForm) - structuredClone replaces JSON parse/stringify (CustomerInvoiceRegenerate)
ansmonjol
marked this pull request as draft
July 3, 2026 12:50
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.
Fixes a batch of the highest-value react-doctor findings. Each change was verified against the tool, types pass, and affected tests are green.
Security
cypress.yml): install deps before any secret is exposed to a step env, with--ignore-scripts, so a malicious package script can't run arbitrary code or read secrets during install.Mention.schema.ts): escapeid/labelbefore writing them toinnerHTML, closing a stored-XSS vector via mention labels.Bugs (error severity)
ChargeFilter.tsx):clearTimeoutin the effect cleanup so a stale timer can't fire on an unmounted node.RadioGroupField,RadioGroupFieldForTanstack,MultipleComboBox): a{...spread}could clobber the explicitkeyand scramble React's list tracking.Performance
.find()in loops ->Maplookups (Invoices,useAddSubscription,useCreateCreditNote).includes()in loops ->Set(useFilters,ChargeFilter).map().filter(Boolean)double-pass ->flatMap(useFieldError,TextInputFieldForTanstack,PricingBlockView).sort()[0]-> single-passreduce(getMostRecentPaymentMethodId).every()(mapFromApiToForm)JSON.parse(JSON.stringify())->structuredClone(CustomerInvoiceRegenerate)check-translations,TableCommands)Config
doctor.config.json: ignore two verified false-positiveunused-filehits (check-translations.jsis a manually-run team CLI;CustomerInvoiceVoid.tsxis reachable via a lazy template-literal route import).