fix: keep adjustment cost entry continuous - #482
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The columns computed depended on negativeIdsSig, so an async negative-stock refresh recreated every column def and cell renderer, destroying the active editor mid-typing and truncating the description. Negative-stock rendering stays reactive: isNegativeStock reads props.negativeStockIds inside the cell render callback, so Vue tracks it there. Also corrects two unit_cost clears from null to undefined to match the field contract. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CkGKYWKV4dEbCR8a6zQf8s
Verified green — ready to mergeHead is now `5194fd19` (the four-line fix was uncommitted until now; the previous head `32d3e304` was the broken state). Root cause: the `columns` computed in `SmartCostLinesTable.vue` depended on `negativeIdsSig`. An async negative-stock refresh recreated every column def and cell renderer, destroying the active editor mid-typing — the description got truncated. E2E: Audit of the fix:
Deferred lifecycle improvements remain in KAN-296. Not merging without explicit instruction. |
What changed
Why
Typing an adjustment description inferred the correct kind but kept occupying the only blank row until every save-required field was complete. This interrupted continuous cost entry.
Impact
Users can begin another cost line as soon as they start an adjustment description. Backend APIs and schemas are unchanged.
Validation
Review note
Follow-up review should concentrate on in-flight edits, pending-draft lifecycle during refresh/failure, stable local row identity, and deletion of incomplete promoted drafts.