Notification click switches to the tab; pulsing question indicator on tabs - #27
Merged
Merged
Conversation
Two ergonomics improvements: 1. Clicking a desktop notification now raises the window AND switches to the workspace tab the notification is about (previously it only raised the window). Notifications carry the workspace id as the default-action target; a new app action `activate-workspace` resolves the id to its tab and calls set_current_page + present. Notifications are now keyed by workspace id, so a newer alert for a tab replaces the older one. 2. While the agent is blocked on an AskUserQuestion, the tab's spinner is swapped for a pulsing amber question-mark icon, so a waiting tab is distinguishable at a glance from a working one. The spinner returns as soon as the agent resumes (answer/reject/new message) or finishes. The question icon is threaded through the same path as the existing tab spinner (TabSlot -> Workspace -> agent panel -> PanelState). Pulse is a CSS @Keyframes animation in both themes; degrades to a static amber icon if a GTK build ignores it.
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.
Two ergonomics improvements.
1. Notification click → switch to the originating tab
Previously, clicking a desktop notification only raised the window. Now it also switches the notebook to the workspace tab the notification is about.
activate-workspace(string target = workspace id) is registered inbuild_ui. Its handler resolves the id to its tab index (under a short borrow, released beforeset_current_pageso theswitch-pagehandler can borrow mutably), switches to it, and callswindow.present().notify_workspacesets this as the notification's default action with the workspace id as target, and now keys notifications by workspace id so a newer alert for the same tab replaces the older one instead of stacking.com.flycrys.app.desktopmatchesAPP_ID, so action routing works for the running instance.2. Tab shows a question indicator while the agent waits
While the agent is blocked on an
AskUserQuestion, the tab's spinner is swapped for a pulsing amber question-mark icon, so a tab that needs you is distinguishable at a glance from one that's still working. The spinner returns the moment the agent resumes — on answer, reject, or a new message — and on finish.gtk::Imagequestion icon is threaded through the same path as the existing tab spinner:TabSlot→Workspace::new→create_agent_panel→PanelState.@keyframesanimation (.tab-question) in both light and dark themes. If a GTK build ignores@keyframes, it degrades gracefully to a static amber icon — still a clear signal.Notes / caveats
-D warnings, lib+bins) and the full test suite pass, but the spinner↔question swap and the notification click should be eyeballed in a running session.NON_UNIQUEflag, routing targets the live instance (the normal single-instance case).