Repository navigation
Remove integration guide and README files from the frontend directory… - #89
Conversation
… to streamline project documentation. These files contained outdated information and were no longer necessary for the current project structure.
There was a problem hiding this comment.
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.mdandcode/frontend/INTEGRATION_GUIDE.mdfrom 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.
| const [fileUploadProgress, setFileUploadProgress] = useState<{ sent: number; total: number }>({ sent: 0, total: 0 }); | ||
|
|
There was a problem hiding this comment.
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.
| <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> |
There was a problem hiding this comment.
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.
| {(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> | ||
| )} |
There was a problem hiding this comment.
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).
| setUploadFiles((prev) => prev.map((file) => (file.id === uploadFile.id ? { ...file, progress } : file))); | ||
| }); | ||
| } | ||
| setFileUploadProgress({ sent: fileIdx + 1, total: targets.length }); |
There was a problem hiding this comment.
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.
… to streamline project documentation. These files contained outdated information and were no longer necessary for the current project structure.
Closes #76