Add Dynamic Island Live Activity for chat streaming#8
Open
zmanian wants to merge 2 commits intomcintyre94:mainfrom
Open
Add Dynamic Island Live Activity for chat streaming#8zmanian wants to merge 2 commits intomcintyre94:mainfrom
zmanian wants to merge 2 commits intomcintyre94:mainfrom
Conversation
8 tasks
b643106 to
f67568b
Compare
Owner
|
Thanks, this is really cool! I'm going to hold off on merging it for now because I want to think a bit more about how I'd like this to work with multiple chats which is how I'm often using Wisp. |
Contributor
Author
|
The current thing has its flaws. Happy to brainstorm improving it. |
Owner
|
Some not-super-well-organised thoughts:
|
ActivityKit Live Activity shows Claude's progress in the Dynamic Island and Lock Screen while the app is backgrounded. Compact view shows a status dot and current intent; expanded view adds sprite name, step count, and previous completed intent. Lock Screen banner shows intent card stack with depth effect and a live timer. New files: WispActivityAttributes (shared model), LiveActivityManager (debounced singleton), WispActivityWidget extension (WispLiveActivity + bundle). ChatViewModel hooks start/update/end the activity at tool use, tool result, first text response, and result events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Truncate userTask (200 chars) and intent strings (100 chars) to stay under ActivityKit's 4KB payload limit. Surface startActivity failures via return value and lastError property. Improve logging with activity IDs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ActivityKit Live Activity shows Claude's progress in the Dynamic Island and on the Lock Screen while the app is backgrounded. Inspired by Chowder-iOS.
Note: This PR is stacked on #7 (thinking shimmer) because it uses
activityLabelfromToolUseCard. Merge #7 first.New files
Wisp/Models/WispActivityAttributes.swift-- shared ActivityKit attributes modelWisp/Services/LiveActivityManager.swift-- singleton managing Activity lifecycle with debounced updatesWispActivityWidget/WispLiveActivity.swift-- Dynamic Island compact/expanded + Lock Screen banner viewsWispActivityWidget/WispActivityWidgetBundle.swift-- widget bundle entry pointWispActivityWidget/Info.plist-- NSExtension configuration for WidgetKitWisp/Wisp.entitlements,WispActivityWidget/WispActivityWidget.entitlements-- entitlementsModified files
Wisp/ViewModels/ChatViewModel.swift-- hooks for Live Activity start/update/end tied to NDJSON event flowWisp.xcodeproj/project.pbxproj-- WispActivityWidget extension target, embed phase, NSSupportsLiveActivitiesTest plan
Generated with Claude Code