Skip to content

feat(parcels): refresh delivery statuses on visit and from sidebar - #26

Merged
rathlinus merged 2 commits into
bulwarkmail:mainfrom
LeonardNJU:fix/parcels-visit-refresh
Oct 28, 2026
Merged

rathlinus merged 2 commits into
bulwarkmail:mainfrom
LeonardNJU:fix/parcels-visit-refresh

Conversation

@LeonardNJU

Copy link
Copy Markdown
Contributor

Problem

Delivery statuses stay stale when returning to webmail unless each shipping email is opened.

Changes

  • Share one background poller between sidebar, periodic hooks and manual checks.
  • On sidebar mount or tab focus, refresh active parcels no more than every 5 minutes.
  • Add an accessible refresh icon at the upper-right of Deliveries content, next to the last lookup time.
  • Manual refresh uses a 10-second minimum per parcel, respects provider Retry-After and the existing 20-parcel round limit.
  • Keep the routine 30-minute poll and stop polling received, expired, stopped and delivered parcels.
  • Add tests; update docs and package v1.2.0.

Verification

  • 188 package tracking unit tests pass.
  • Build and package checks pass (node scripts/build.mjs --check parcels and node scripts/check.mjs).

The host owns the collapsible sidebar section header, so the refresh icon sits directly under it on the right.

Share the background poller across UI hooks, check stale parcels on entry/focus, and add a compact refresh control with latest check time. Respect per-parcel throttling, final states, and provider backoff. Include unit tests and versioned bundle.
@LeonardNJU

Copy link
Copy Markdown
Contributor Author

Follow-up (v1.2.1): moved the compact Refresh control and last checked time into the new sidebar-section-actions inline heading slot. This requires the companion Bulwark host change in webmail#1317, which keeps the collapsible heading and action button independent.

@rathlinus
rathlinus merged commit ba9acec into bulwarkmail:main Oct 28, 2026
@rathlinus

Copy link
Copy Markdown
Member

Merged with small changes: the last-check time uses api.i18n.formatTime when the host has it, so it follows the 12/24-hour setting (165207c). The row test now marks its parcels as just polled, because the refresh on opening the section could change their status before the assertion ran (b9d16c6).

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.

3 participants