Skip to content

Remove integration guide and README files from the frontend directory… - #89

Merged
LoganSutton13 merged 1 commit into
mainfrom
fix/add-upload-progress-bar
Apr 15, 2026
Merged

LoganSutton13 merged 1 commit into
mainfrom
fix/add-upload-progress-bar

Conversation

@LoganSutton13

Copy link
Copy Markdown
Owner

… to streamline project documentation. These files contained outdated information and were no longer necessary for the current project structure.

Closes #76

… to streamline project documentation. These files contained outdated information and were no longer necessary for the current project structure.
Copilot AI review requested due to automatic review settings April 15, 2026 21:59
@LoganSutton13
LoganSutton13 merged commit 943e308 into main Apr 15, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes outdated frontend documentation files and adds a UI progress indicator to the imagery upload flow in the frontend, aligning with the issue’s goal of improving upload feedback.

Changes:

  • Added file-count upload progress tracking and a “Files sent” progress bar to the imagery upload step.
  • Removed code/frontend/README.md and code/frontend/INTEGRATION_GUIDE.md from the frontend directory.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
code/frontend/src/components/UploadView.tsx Introduces fileUploadProgress state and renders a “Files sent” progress bar during uploads.
code/frontend/README.md Deleted outdated frontend documentation.
code/frontend/INTEGRATION_GUIDE.md Deleted outdated integration documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +105 to 106
const [fileUploadProgress, setFileUploadProgress] = useState<{ sent: number; total: number }>({ sent: 0, total: 0 });

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

PR metadata/title says this change removes frontend documentation files, but this diff also introduces a new upload progress indicator/state in UploadView.tsx. Please align the PR title/description with the actual functional change (or split documentation removal and UI behavior into separate PRs) so reviewers and release notes accurately reflect what shipped.

Copilot uses AI. Check for mistakes.
Comment on lines +656 to +663
<div className="h-2 w-full overflow-hidden rounded bg-dark-600">
<div
className="h-full bg-primary-500 transition-all"
style={{
width: `${fileUploadProgress.total > 0 ? Math.round((fileUploadProgress.sent / fileUploadProgress.total) * 100) : 0}%`,
}}
/>
</div>

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

The progress indicator is implemented as styled <div> elements without any accessibility metadata. Consider adding role="progressbar" plus aria-valuemin, aria-valuemax, and aria-valuenow (and/or an aria-label) so screen readers can announce upload progress.

Copilot uses AI. Check for mistakes.
Comment on lines +648 to +665
{(isUploading || (fileUploadProgress.total > 0 && fileUploadProgress.sent > 0)) && (
<div className="rounded-lg border border-dark-600 bg-dark-700/60 p-3">
<div className="mb-2 flex items-center justify-between text-xs text-dark-300">
<span>Files sent</span>
<span>
{fileUploadProgress.sent} / {fileUploadProgress.total}
</span>
</div>
<div className="h-2 w-full overflow-hidden rounded bg-dark-600">
<div
className="h-full bg-primary-500 transition-all"
style={{
width: `${fileUploadProgress.total > 0 ? Math.round((fileUploadProgress.sent / fileUploadProgress.total) * 100) : 0}%`,
}}
/>
</div>
</div>
)}

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

The new file-level progress card remains visible after an upload finishes because the render condition includes (fileUploadProgress.total > 0 && fileUploadProgress.sent > 0) even when isUploading is false. Consider resetting fileUploadProgress to {sent: 0, total: 0} in the success/error paths (e.g., in finally or after completion) or tightening the condition so the indicator only shows while an upload is active (or while there is an actionable upload error).

Copilot uses AI. Check for mistakes.
Comment on lines 298 to +301
setUploadFiles((prev) => prev.map((file) => (file.id === uploadFile.id ? { ...file, progress } : file)));
});
}
setFileUploadProgress({ sent: fileIdx + 1, total: targets.length });

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

setFileUploadProgress({ sent: fileIdx + 1, ... }) only runs after all chunks of a file finish uploading, so the overall "Files sent" progress will stay at 0 for the entire duration of the first (potentially large) file. If the intent is to show meaningful progress during chunked uploads, consider updating the file counter when starting each file and/or tracking overall chunk progress across all files (e.g., completedChunks/totalChunks) so the bar advances continuously.

Copilot uses AI. Check for mistakes.
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.

add progress indicator for chunked drone imagery upload to backend

2 participants