Skip to content

React doctor#1

Merged
lexmarcos merged 19 commits into
mainfrom
react-doctor
May 11, 2026
Merged

React doctor#1
lexmarcos merged 19 commits into
mainfrom
react-doctor

Conversation

@lexmarcos
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65d845375d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/(pages)/products/products.model.ts Outdated
const response = await api
.delete(`batches/warehouses/${warehouseId}/products/${deleteProduct.id}/batches`)
.json<DeleteBatchesResponse>();
await api.delete(`products/${deleteProduct.id}`).json();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep deletion scoped to the selected warehouse

This model builds its list from warehouses/{warehouseId}/products, so the delete action is operating in a warehouse-scoped inventory view; switching executeDelete to DELETE products/{id} makes a single-warehouse action soft-delete the product globally across all warehouses. In multi-warehouse tenants, deleting from Warehouse A would unexpectedly remove the product from Warehouse B as well, which is a data-scope regression from the prior warehouse-specific batch-delete flow.

Useful? React with 👍 / 👎.

@lexmarcos
Copy link
Copy Markdown
Owner Author

@codex make the code review of the last commit, i fix the changes that you requested

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 818b539d29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// Sort
const sorted = [...filtered].sort((a, b) => {
const sorted = filtered.toSorted((a, b) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace toSorted with ES2017-compatible sorting

Using filtered.toSorted(...) introduces a runtime dependency on Array.prototype.toSorted, which is not available in ES2017-era browsers and is not automatically polyfilled by TypeScript/Next.js. Since this hook runs on the client, users on older engines will hit TypeError: filtered.toSorted is not a function and the page will fail to render; keep immutable sorting with [...] .sort(...) (and apply the same fix to other new toSorted usages in this commit).

Useful? React with 👍 / 👎.

@lexmarcos lexmarcos merged commit c58f81d into main May 11, 2026
1 check passed
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.

1 participant