Skip to content

fix: status update subject field, pending guard, hoist statusIcons#20

Merged
eurobuddha merged 1 commit intomasterfrom
fix/status-update-subject-pending-guard
Mar 23, 2026
Merged

fix: status update subject field, pending guard, hoist statusIcons#20
eurobuddha merged 1 commit intomasterfrom
fix/status-update-subject-pending-guard

Conversation

@eurobuddha
Copy link
Copy Markdown
Owner

Summary

  • shop/service.js: saveMessageToDb was missing the subject column — STATUS_UPDATE messages saved by the service worker showed 'CONFIRMED' in the buyer's inbox list instead of 'Order status: Confirmed' when the service beat app.js in the save race
  • inbox/app.js: added guard in sendStatusUpdateToBuyer to skip if pendingStatusUpdateUid is already set, preventing the first pending UID being orphaned when two status updates are sent back-to-back
  • shop/app.js: hoisted statusIcons to module-level STATUS_ICONS constant — was defined identically inside both renderMessageList and renderMessageDetail

🤖 Generated with Claude Code

…Icons

- shop/service.js: add subject column to saveMessageToDb INSERT so
  STATUS_UPDATE (and REPLY) messages saved by the service get their
  subject stored; without this the buyer inbox list showed raw 'CONFIRMED'
  instead of 'Order status: Confirmed' when service.js won the race
- inbox/app.js: skip sendStatusUpdateToBuyer if pendingStatusUpdateUid
  is already set — prevents the first pending UID being orphaned when
  two status updates are sent in quick succession
- shop/app.js: hoist statusIcons to module-level STATUS_ICONS constant
  to avoid the two copies diverging

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eurobuddha eurobuddha merged commit 435198d into master Mar 23, 2026
5 checks passed
@eurobuddha eurobuddha deleted the fix/status-update-subject-pending-guard branch March 23, 2026 15:16
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