Homework2 - #20
Conversation
| <option value="piece">шт</option> | ||
| <option value="packaging">уп</option> | ||
| <option value="liter">л</option> | ||
| </select> |
There was a problem hiding this comment.
Unit select never persists
Medium Severity
Each item’s unit dropdown is rendered without stored state or a change handler, so any render() rebuilds every select at the default кг and user choices are lost.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit acb28f2. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
There are 4 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 65c56ee. Configure here.
| item.name = newName; | ||
| } | ||
| render(); | ||
| }; |
There was a problem hiding this comment.
Blur rerender drops control clicks
Medium Severity
Inline rename calls render() from the input’s blur handler. Clicking +, -, status, or delete while the field is focused blurs first, rebuilds the list, and the intended control click is often lost, so quantity or status may not update until a second click.
Reviewed by Cursor Bugbot for commit 65c56ee. Configure here.
| <option value="piece">шт</option> | ||
| <option value="packaging">уп</option> | ||
| <option value="liter">л</option> | ||
| </select> |
There was a problem hiding this comment.
Measure unit never persisted
Medium Severity
Each row renders a measure select, but item objects only store id, name, amount, and isBought. Nothing reads or writes the chosen unit, and every render() rebuilds the dropdown at its default, so unit changes never stick or appear in localStorage.
Reviewed by Cursor Bugbot for commit 65c56ee. Configure here.
| } | ||
| }); | ||
| render(); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
Unused duplicate script file
Low Severity
The repo adds both code and code.js, but index.html only loads code.js. The code file is nearly the same shopping-list logic without persistence, so it is dead duplicate code that can drift from the live script.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 65c56ee. Configure here.


Note
Low Risk
Low risk: purely client-side HTML/CSS/JS changes with localStorage persistence and no backend/security-sensitive logic.
Overview
Replaces the placeholder page with a shopping-cart UI (form + product list + bought/remaining side summary) and a full styling overhaul, including responsive layout, tooltips, and an author badge.
Adds client-side list behavior in
code.js: render from anitemsmodel, support add/delete, toggle bought status, increment/decrement quantity with min=1, inline rename for unbought items, and persist the list tolocalStorage(cartItems).Reviewed by Cursor Bugbot for commit 65c56ee. Bugbot is set up for automated code reviews on this repo. Configure here.