Repository navigation
Fix iOS TestFlight archive: handle ChatArtifactError.unknown and panel scope #10283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,8 @@ struct ChatArtifactFailurePresentationTests { | |
| (.localStorageUnavailable, "Local storage unavailable", true), | ||
| (.loadFailed, "Couldn't load file", true), | ||
| (.tooLarge(limitBytes: 1_024), "File too large to preview", false), | ||
| (.unknown(code: "future_error"), "Unrecognized file error", true), | ||
| (.unknown(code: nil), "Unrecognized file error", true), | ||
|
Comment on lines
+46
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Assert both unknown-message variants. The new cases verify only the common title and retry state. They do not verify the behavior changed in Suggested assertions+ let coded = ChatArtifactFailurePresentation(error: .unknown(code: "future_error"), scope: .chat)
+ let uncoded = ChatArtifactFailurePresentation(error: .unknown(code: nil), scope: .chat)
+ `#expect`(coded.message.contains("future_error"))
+ `#expect`(!uncoded.message.contains("future_error"))🤖 Prompt for AI Agents |
||
| ] | ||
|
|
||
| #expect(unreachable.title == "Mac unreachable") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 27725
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 50373
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 50373
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 50372
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 9542
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 393
Restrict
ChatArtifactError.unknown(code:)before display.Because the public case accepts any
String?,unknownMessageinserts every non-empty value into user-facing text. Enforce a short machine-code format before formatting, or omit the value when it does not match.🤖 Prompt for AI Agents
Source: Coding guidelines