Skip to content

feat(reports): keep reports on the phone when the network is down - #202

Merged
anis022 merged 1 commit into
developfrom
feature/188-offline-report-queue
Aug 27, 2026
Merged

feat(reports): keep reports on the phone when the network is down#202
anis022 merged 1 commit into
developfrom
feature/188-offline-report-queue

Conversation

@anis022

@anis022 anis022 commented Aug 27, 2026

Copy link
Copy Markdown
Member

Closes #188

Overview

A patroller who wrote a report with no signal lost it, photo and all. Sending now goes through a normal API route instead of a server action, because a background retry cannot call a server action. When the request cannot reach the server, the report and its photo are saved on the phone and sent later on their own. Each report gets an id made on the phone, so sending it twice only ever creates one row.

Retrying lives in the root layout, so it works anywhere in the app and not just on the report screen. The report screen also shows how many are still waiting.

Testing

296 tests pass, including new ones for saving and rebuilding a queued report with its photo. tsc, eslint, prettier and the build are all clean.

Screenshots / Screencasts

No new screens. The report screen shows a line saying how many reports are waiting, and the confirmation says the report will be sent later when it was saved offline.

Checklist

  • Code is neat, readable, and works
  • Code is commented where appropriate and well-documented
  • Commit messages follow our guidelines
  • Issue number is linked
  • Branch is linked
  • Reviewers are assigned (one of your tech leads)

Notes

None.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
canopee-project Ready Ready Preview Aug 27, 2026 10:50pm

@anis022 anis022 self-assigned this Aug 27, 2026
@anis022 anis022 added the back-end back-end related issue label Aug 27, 2026
@anis022 anis022 added this to the sprint-5 milestone Aug 27, 2026

@anis022 anis022 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM

@anis022
anis022 merged commit c6b92ea into develop Aug 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

back-end back-end related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant