feat(ui): auto-refresh chat on event gap with visual marker#3
Draft
brianleach wants to merge 5 commits intomainfrom
Draft
feat(ui): auto-refresh chat on event gap with visual marker#3brianleach wants to merge 5 commits intomainfrom
brianleach wants to merge 5 commits intomainfrom
Conversation
The #if DEBUG check was unreliable for determining the APNs environment because Xcode development provisioning profiles always produce sandbox device tokens, even for Release builds. Now reads the aps-environment entitlement from the embedded provisioning profile at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously the app only requested notification authorization lazily when the gateway tried to deliver a push. Now it prompts immediately on first launch so the user grants permission before notifications are needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the web UI detects an event sequence gap (common after returning from a backgrounded tab), automatically reload chat history instead of showing an error. A visual gap divider marks where new messages begin, showing the count of messages that arrived while the user was away. The gap marker can be dismissed via its X button and is automatically cleared on manual refresh, session switch, or reconnect.
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
Details
Before: gap detection set
lastErrorwith "event gap detected (expected seq X, got Y); refresh recommended" — user had to manually click refresh.After: gap triggers
loadChatHistory()automatically. If new messages appeared, an accent-colored divider is inserted at the boundary: "N new messages since you were away".Files changed
ui/src/ui/app-gateway.tsui/src/ui/views/chat.tsui/src/ui/types/chat-types.ts"gap"ChatItem kindui/src/styles/chat/grouped.cssui/src/ui/app.tschatGapIndexstateui/src/ui/app-view-state.tschatGapIndexui/src/ui/app-render.tsui/src/ui/app-render.helpers.tsui/src/ui/app-gateway.node.test.tsTest plan
ui/src/ui/app-gateway.node.test.ts— all 10 tests pass