Repository navigation
feat: ask an agent from a popup that you can pin, resize and keep on screen - #274
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
The quick-ask package (stablebox/stablebar-packages#24) asks Claude Code or Codex a question from the bar. Popups couldn't take typed text, showed one line of a field, closed on the next click elsewhere, and had no way to choose a model and effort or to show that an answer is on its way.
Closes #78
Closes #264
Closes #89
Closes #273
Changes
New blocks and options (decoded, in the schema and in Custom popups):
input: a text field. Return runsonSubmitwith the text inVALUEand clears the field;placeholderandautofocusare optional.fieldblocks:wrapshows the whole text, selectable;maxHeightscrolls past that height and keeps the newest lines in view as the text grows (macOS 15 and later);markdownshows inline Markdown.shimmeron text and field blocks: light sweeps across the text, as while something works. Reduce Motion keeps it still.chooser: a pill naming the chosen group, option and level, which opens a panel with the groups on the left and the chosen group's options and a bar of its levels on the right. Choices show at once and runonChangewithVALUE,OPTIONandLEVEL. The panel has a fixed size and a fixed anchor, so it stays still as you switch groups.Pinned popups (
popup.pinnable):WidgetPopuptracks, so app switches, workspace changes, reloads and other popups don't close it. It can be resized by its edges; it then keeps that size, and fields withmaxHeighttake the height.BarStore.stop()closes pinned popups too.Smoother resizing: a popup with its own
animationnow animates its height in SwiftUI inside its window (PopupCanvas), instead of animating the window frame: the window grows first and shrinks last, so the edge, shadow and content move together and shrinking no longer leaves a clipped gap. What its data changes animates with it. The reveal view's content now follows the window, sopopupFoldKeepsTheScrollViewportAndPosition, which guarded the fold of an older opening animation, is removed;popupResizesWithItsContentAndKeepsItsWidthAndTopEdgechecks that the content fills the window.examples/interactivegains a note input with a wrapping field and a pinnable popup.Testing
swift testpasses: 285 XCTest and 423 Swift Testing tests.wrap,markdown,maxHeightandshimmer; wrapping fields that grow and stop atmaxHeight; and one lifecycle test for pinned popups: staying open throughclose()and another popup, resizing with content, a resize by hand, unpinning back home, pinning again at the remembered frame, reopening pinned after closing pinned, Escape, the close button and drag to pin.StableBar --validate examples/interactive/config.jsonpasses, and the store'scheck-package.shpasses for the quick-ask package with this build.Screenshots to follow.
Merging
One commit: a merge commit or a squash keeps the same title.
Claude Opus 5.5 via Claude Code (T3 Code)