Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe changes implement source-aware notification handling that categorizes notifications by origin (app or terminal escape sequence) and introduces focused-state detection to automatically mark notifications as read when the user is actively engaged with the originating pane, addressing issue Changes
Sequence DiagramsequenceDiagram
participant Terminal as Terminal Process
participant ESC as Escape Sequence<br/>Handler
participant Store as TerminalNotificationStore
participant Delivery as Notification<br/>Delivery System
participant UI as Application<br/>UI State
rect rgba(100, 150, 200, 0.5)
Note over Terminal,UI: OSC 777 Notification Received
Terminal->>ESC: Send OSC 777 sequence
ESC->>Store: addNotification(source: .terminalEscapeSequence)
end
rect rgba(150, 100, 200, 0.5)
Note over Store,UI: Check Focus State
Store->>UI: Check isAppFocused & isFocusedPanel
UI-->>Store: Focus state (true/false)
Store->>Store: Calculate isFocusedDeliveryTarget
end
rect rgba(200, 150, 100, 0.5)
Note over Store,Delivery: Conditional Delivery
alt App is Focused
Store->>Delivery: Mark isRead=true, suppress pending
else App is Not Focused
Store->>Delivery: Mark isRead=false, queue for delivery
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR fixes a regression where OSC 777 / Ghostty terminal escape sequence notifications were silently dropped when the originating pane was focused. It introduces a Key concerns found during review:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[OSC 777 / GHOSTTY_ACTION_DESKTOP_NOTIFICATION] --> B{target == SURFACE?}
B -- No, app-level --> C[tabId = selectedTabId\nsurfaceId = focusedSurfaceId]
B -- Yes, surface-level --> D[tabId = callbackTabId ?? surfaceView.tabId\nsurfaceId = callbackSurfaceId ?? surfaceView.terminalSurface?.id]
C --> E[addNotification\nsource: .terminalEscapeSequence]
D --> E
E --> F{isFocusedDeliveryTarget\nAND source == .app?}
F -- Yes --> G[Clear old notifications\nReturn early — suppressed]
F -- No --> H[moveTabToTop if autoReorder]
H --> I[Create notification\nisRead = isFocusedDeliveryTarget]
I --> J[scheduleUserNotification]
J --> K{isFocusedDeliveryTarget?}
K -- Yes, focused OSC 777 --> L[Stored as read\nOS banner delivered]
K -- No, unfocused --> M[Stored as unread\nOS banner delivered]
|
Summary\n- add a regression test for OSC 777 notifications emitted from the focused terminal\n- preserve Ghostty terminal escape notifications even when the originating pane is focused\n- keep generic app-generated focused notifications suppressed while using callback-context IDs for the surface path\n\n## Verification\n- ./scripts/reload.sh --tag issue-1103-osc-777-notifications\n- manual socket check: inactive OSC 777 stored unread, focused OSC 777 stored read, focused app-generated notification remains suppressed\n\nCloses #1103
Summary by cubic
Fixes OSC 777 notifications from the focused terminal pane so they still deliver and are stored as read. App-generated focused notifications remain suppressed. Closes #1103.
TerminalNotificationSourceand only suppress focused.appnotifications; allow.terminalEscapeSequencewhile marking them read.callbackTabId/callbackSurfaceIdto correctly attribute notifications, and set source to.terminalEscapeSequence.Written for commit 76db700. Summary will update on new commits.
Summary by CodeRabbit
New Features
Tests