fix: accept .trace files and unblock .log in macOS file picker#10
fix: accept .trace files and unblock .log in macOS file picker#10
Conversation
Add .trace to the upload screen's accepted extensions and broaden the file input's accept attribute with text/plain and application/octet-stream. macOS' UTI-based file picker was greying out .log (and would do the same for .trace) despite the extensions being listed; the broader MIME hints let users select them while JS-side validation still enforces the strict extension allowlist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for pvm-debugger ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis pull request adds support for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
spec/ui/sprint-10-file-upload.md (1)
72-87:⚠️ Potential issue | 🟡 MinorAcceptance/verification sections should include the newly discovered edge cases.
The spec now lists
.trace, but the formal Acceptance Criteria and Verification block still miss explicit checks for macOS picker behavior and unsupported-extension rejection.📌 Suggested spec patch
## Acceptance Criteria - Load page uses a two-column layout. - File upload supports drag-and-drop and file picker. +- File picker allows selecting `.log` and `.trace` on macOS browsers. - Selected file shows name and byte count. - Format is auto-detected. - Continue enables only after valid selection. +- Unsupported extensions (for example, `.txt`) are rejected with an inline error. - `cd apps/web && npx vite build` succeeds. - E2E tests pass. ## Verification ```bash cd apps/web && npx vite build npx playwright test e2e/sprint-10-file-upload.spec.ts +# Manual checks: +# - In macOS Chrome, confirm `.log` and `.trace` are selectable in file picker. +# - Upload a `.trace` file and verify Trace format detection. +# - Upload an unsupported extension (e.g. `.txt`) and verify inline rejection.</details> As per coding guidelines, `spec/**/*.md`: Mark spec files as implemented by adding `Status: Implemented` to the top and enhance acceptance criteria with edge cases, pitfalls, and verification steps discovered during implementation. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@spec/ui/sprint-10-file-upload.mdaround lines 72 - 87, Add "Status:
Implemented" at the top of the spec and update the Acceptance Criteria and
Verification sections to explicitly cover the newly discovered edge cases:
include macOS picker behavior (confirm.logand.traceare selectable in
macOS Chrome), verify.traceuploads trigger Trace format auto-detection, and
verify inline rejection for unsupported extensions (e.g.,.txt). Update the
Verification block to include the new manual checks (macOS picker selection,
.tracedetection, unsupported-extension rejection) alongside the existing
build and E2E commands so the spec and verification steps match the implemented
behavior.</details> </blockquote></details> </blockquote></details>🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Outside diff comments: In `@spec/ui/sprint-10-file-upload.md`: - Around line 72-87: Add "Status: Implemented" at the top of the spec and update the Acceptance Criteria and Verification sections to explicitly cover the newly discovered edge cases: include macOS picker behavior (confirm `.log` and `.trace` are selectable in macOS Chrome), verify `.trace` uploads trigger Trace format auto-detection, and verify inline rejection for unsupported extensions (e.g., `.txt`). Update the Verification block to include the new manual checks (macOS picker selection, `.trace` detection, unsupported-extension rejection) alongside the existing build and E2E commands so the spec and verification steps match the implemented behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID:
cddd168f-a55b-4245-bd0b-7930742ff426📒 Files selected for processing (3)
apps/web/src/components/load/FileUpload.tsxdocs/usage-guide.mdspec/ui/sprint-10-file-upload.md
Summary
.traceto the upload screen's accepted extensionsacceptattribute withtext/plainandapplication/octet-streamso macOS' UTI-based picker stops greying out.log/.tracefilesACCEPTED_EXTENSIONSdocs/usage-guide.mdandspec/ui/sprint-10-file-upload.mdTest plan
.logand.tracefiles are selectable (not greyed out)fixtures/trace-001.log→ format badge shows "Trace", file loads.trace→ accepted; format auto-detected.txt) → rejected with inline errornpm run lintpassesnpm run buildpasses🤖 Generated with Claude Code