Skip to content

Clean up warnings and empty the API breakage allowlist - #482

Merged
nezhyborets merged 7 commits into
mainfrom
chore/cleanup-warnings
Nov 3, 2026
Merged

nezhyborets merged 7 commits into
mainfrom
chore/cleanup-warnings

Conversation

@nezhyborets

Copy link
Copy Markdown
Collaborator

Summary

  • Empties .github/api-breakage-allowlist.txt: 0.6.0 is tagged, so it is now the comparison baseline for the breaks the allowlist listed.
  • Fixes the one hand-written package warning: ResponseOutputTextAnnotationAddedEvent.description interpolated an optional annotation directly, so a present annotation printed as Optional(...). It now prints the annotation itself, or nil.
  • Fixes the Demo warnings that were worth fixing now:
    • Unused throwing Tasks in ChatStore (assistant run polling) and LinkPreview no longer drop their errors. ChatStore stops polling on the first failed request and records the error in conversationErrors, which ChatView shows; before, the error was ignored and the request repeated every second. LinkPreview prints the error.
    • DetailView: the deprecated onChange(of:perform:) and an unsupported Bool in a Text interpolation.
    • Removes the dateProviderValue and idProviderValue environment values. Nothing ever set them, so ChatView and ModerationChatView always got the defaults; they now call Date() and UUID().uuidString. The stores still take an injected idProvider.
  • Adds [Unreleased] changelog entries.

Not changed

Testing

  • swift build --build-tests and swift test (246 XCTest and 35 Swift Testing cases).
  • Demo clean build, and the 65 DemoChat tests.
  • Not run: swift package diagnose-api-breaking-changes, since there are no public API changes; the Demo app itself.

Refs #481

🤖 Generated with Claude Code

nezhyborets and others added 6 commits October 28, 2026 22:50
0.6.0 is tagged, so it is now the comparison baseline for the breaks
the allowlist listed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…edEvent.description

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The assistant run polling in ChatStore and LinkPreview's metadata fetch
created throwing Tasks whose errors were silently dropped. ChatStore now
records the error in conversationErrors, so ChatView shows it, and stops
polling when a poll request fails; LinkPreview prints the error.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nothing ever set dateProviderValue or idProviderValue, so ChatView and
ModerationChatView always got the defaults; they now call Date() and
UUID().uuidString directly. The stores still take an injected idProvider.
Also removes the unused @Environment reads and DemoApp.dateProvider.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

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.

🟡 Changes recommended

Assistant errors are never cleared on a new turn or successful message fetch, so a successful reply can still display a stale error in DetailView.

1 open issue
What changed in this PR

This PR cleans up package and Demo warnings, improves error handling in the Demo, and removes API-breakage exceptions now covered by the 0.6.0 baseline.

Changes:

  • Formats optional annotations without the Optional(...) wrapper.
  • Handles assistant polling and link-preview errors, updates SwiftUI usage, and removes unused environment providers.
  • Empties the API-breakage allowlist and documents the changes.
File Description
Sources/​OpenAI/​Private/​Extensions for generated code/​Schemas+Description.swift Corrects optional annotation formatting.
Demo/​DemoChat/​Sources/​UI/​ModerationChatView.swift Uses direct date and UUID creation.
Demo/​DemoChat/​Sources/​UI/​Images/​LinkPreview.swift Logs metadata-fetch failures.
Demo/​DemoChat/​Sources/​UI/​Environment/​IDProvider.swift Removes the unused ID environment provider.
Demo/​DemoChat/​Sources/​UI/​Environment/​DateProvider.swift Removes the unused date environment provider.
Demo/​DemoChat/​Sources/​UI/​DetailView.swift Updates onChange and Boolean text formatting.
Demo/​DemoChat/​Sources/​UI/​ChatView.swift Uses direct date and UUID creation.
Demo/​DemoChat/​Sources/​UI/​AssistantsView.swift Removes unused environment properties.
Demo/​DemoChat/​Sources/​ChatStore.swift Stops polling on request failure and records errors.
Demo/​App/​DemoApp.swift Removes the unused date-provider property.
Demo/​App/​ContentView.swift Removes the unused ID environment property.
Demo/​App/​APIProvidedView.swift Removes unused environment properties.
CHANGELOG.md Adds unreleased cleanup and error-handling entries.
.github/​api-breakage-allowlist.txt Removes exceptions covered by the release baseline.

Review effort: Balanced

Comment thread Demo/DemoChat/Sources/ChatStore.swift Resolved
The polling and message-fetch errors added for assistant conversations
were never cleared, since the only reset is in completeChat, which runs
for normal chats. A later successful reply kept showing the old error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

🟡 Changes recommended

Stale polling failures can stop a newer run and assign an old error to the current conversation, and the new error-handling paths lack regression tests.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread Demo/DemoChat/Sources/ChatStore.swift Resolved
Comment thread Demo/DemoChat/Sources/ChatStore.swift Resolved

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.

🟢 Approved

No active review issues are identified for the warning cleanup and API breakage allowlist reset.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@nezhyborets
nezhyborets merged commit 00678f5 into main Nov 3, 2026
14 checks passed
@nezhyborets
nezhyborets deleted the chore/cleanup-warnings branch November 3, 2026 01:47
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.

3 participants