Repository navigation
feat: name the export path when an iWork upload is refused - #31733
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the server already refuses these files, and this only adds a sentence to that error. The allow-list, status and code stay the same. [DESIGN-REVIEWED] b135253 Description read[DESCRIPTION-READ] 32ae77c1a31b95b964fb58b867dc5fcd4a525b32486635bb283c8fdb4a76792a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: both refusal sites get the hint, and the accept list and error code stay the same. What this change shipsInventory (3 items) — 3 justifiedIntent: a user whose Keynote, Pages or Numbers file is refused learns to export an Office or PDF copy and upload that. This is an ADDITION (#26475).
[FIRST-PRINCIPLES-REVIEWED] b135253 Description read[DESCRIPTION-READ] 586b14ebf2d557744efa436684142427d9f5d29b5056c7f5fd1c934dd35e7fa2 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
f514943 to
4eb0493
Compare
|
Rebased: main moved in docs/system-specs/modules/learn-cron-dashboard.md since this head's CI ran (8dbdf04 -> 678769e); CI re-running. The previous head's red shards ( [operator: bolichen97] |
4eb0493 to
0c882e8
Compare
|
Rebased: main moved in docs/system-specs/modules/learn-cron-dashboard.md since this head went green (678769e -> e4611c5); CI re-running. The patch is unchanged. The previous head's only red was the GPT 6.1 lane, which computed a verdict but could not publish it (the API rate limit hit its comment lookup), so the new head's run replaces it. [operator: bolichen97] |
0c882e8 to
b5bbb9d
Compare
|
Rebased: main moved in docs/system-specs/modules/learn-cron-dashboard.md, src/kiro_crew/dashboard/handlers/files.py since this head went green (e4611c5 -> 5f7f8d1); CI re-running. The patch is unchanged. The previous head's red lanes (AI reviews, dependency license, sensitive change, readiness) all stopped on the installation API rate limit before reaching a verdict, so the new head's run replaces them. [operator: bolichen97] |
|
[operator: bolichen97] The only test red on this head is The AI review lanes, the Dependency License Gate and the Sensitive Change Review on this head stopped on GitHub's installation API rate limit before giving a verdict. They will run again on that next push. |
|
[operator: bolichen97] Withdrawn: this budget reset was posted too early. The re-sync budget on this PR stays spent until a maintainer decides on it. |
Uploading an Apple Keynote, Pages or Numbers file to the chat composer or the Files panel failed with a bare "Unsupported file type: .key". That format is a closed binary one nothing here can read, so the refusal stays, but the error now tells the user to use File > Export To in that app and upload the PowerPoint, Word, Excel or PDF copy, which the dashboard already accepts. The allow-list is unchanged. Closes #26475
b5bbb9d to
b135253
Compare
|
[operator: bolichen97] Rebased onto main 759bb96 to clear a red from the older base, not for drift: the previous head's only test red was |
|
[operator: bolichen97] The one red on head b135253 is |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved: PR Readiness passed on b135253, and all five review lanes (Opus 5.5, GPT 6.1, Design, UX, First Principles) report no blocking finding on this head. No conflict and no open change request.
Problem / Motivation
Goal: When a Keynote, Pages or Numbers file is refused at upload, the error tells the user how to get it in: export a PowerPoint, Word, Excel or PDF copy and upload that.
Dropping an Apple Keynote deck (
.key) into the chat composer or the Files panel fails withUpload failed: Unsupported file type: .key. The same happens for.pagesand.numbers. Nothing in the message says what to do next, and renaming the file does not help, because the bytes are not Office XML.Why it matters
Keynote, Pages and Numbers are the default office apps on macOS, so their files arrive often. The way in already works (export to
.pptx,.docx,.xlsxor PDF), but a user who only sees "Unsupported file type" has no reason to know that and gives up on the content.Not a goal
.key,.pagesor.numbersuploads. The allow-list is unchanged, so no file the parser cannot read gets in.What changed (motivation → approach → change)
The refusal for these three names was the generic one every unknown extension gets. iWork files are a closed binary format that no parser here reads, so accepting them would store a file the agent cannot open; the honest fix is a better refusal, the way HEIC photos and unplayable video containers already get one.
Both upload paths,
POST /api/upload/file(chat composer) andPOST /api/directory-upload(Files panel), add one sentence to theunsupported_file_typeerror for.key,.pagesand.numbers: use File > Export To in that app to save a PowerPoint, Word, Excel or PDF copy, and upload that. The sentence opens with "If it is an Apple Keynote, Pages or Numbers document", because.keyis also the usual name of a PEM key. The sentence and the three names sit beside the HEIC hint indashboard/handlers/files.py, and both handlers indashboard/file_api/uploads.pyappend it. The status, the error code and what is accepted stay the same. The dashboard spec's upload section records the hint.Backwards compatibility
Compatible: the same names are refused with the same 400 status and
unsupported_file_typecode; only the error text gains a sentence after the unchangedUnsupported file type: <ext>prefix.Removes nothing: no accepted extension, route, field or code is removed.
Tests
test/test_handlers_files_upload.py::test_upload_iwork_document_names_the_export_remedy(deck.key,Essay.PAGES,budget.numbers): the composer upload answers 400unsupported_file_type, the error keeps itsUnsupported file type: <ext>.prefix and names File > Export To and the four target formats, and nothing lands on disk.test/test_handlers_files_directory_upload.py::test_iwork_document_refusal_names_the_export_remedy: the same refusal and hint on the Files-panel upload, with nothing written to the target folder.Determinism: both new tests green 20 times at
-n0, 10 times at-n 4 --dist loadgroup --max-worker-restart=2besidetest_handlers_files_video_upload.pyandtest_handlers_files_upload.py, and all 118 tests of the two touched files green in a shuffled order (seed 29060).Manual verification
N/A — unit coverage sufficient: the change is one sentence appended to an existing error string, and both handlers are exercised end to end through aiohttp's test client.
Screenshots / video
N/A — no frontend file changes. The composer and the Files panel already show the server's error text as they do today; only that text is longer.
Related Issues
Closes #26475
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.