Skip to content

feat(selection-agent): refine selection context launch UI - #360

Merged
forketyfork merged 1 commit into
mainfrom
feat/selection-agent-ui
Aug 15, 2026
Merged

feat(selection-agent): refine selection context launch UI#360
forketyfork merged 1 commit into
mainfrom
feat/selection-agent-ui

Conversation

@forketyfork

Copy link
Copy Markdown
Owner

Issue

The selection-to-agent action button overlapped selected terminal text and used a wide text label. The launch modal had no explicit Cancel action. PR #356 also retained one unresolved review comment: very small persisted windows could be rejected because the fixed 32 px visibility margin exceeded their dimensions.

Solution

Clamp the window reachability margin to the persisted window dimensions and cover the edge case with regression tests. Add cached Cancel and Launch controls to the selection-agent modal. Anchor the narrow, cached robot button at the selection's bottom-right boundary, with viewport clamping at the window edges. Extend cached badge rendering to scale emoji using each component's allocator.

Context

This follows up on the unresolved review feedback in PR #356 and refines the selection-context launch workflow described in ADR-015.

Test plan

  • Run Architect, select terminal text, and verify the 🤖 button starts at the selection's bottom-right corner without covering the selection.
  • Open the selection-agent modal, verify Cancel dismisses it without launching a session, and verify Launch still starts the selected agent flow.

Issue: Address the unresolved window-position review feedback on PR #356 and refine selection-to-agent launch controls by adding cancellation, preventing the action button from overlapping selected terminal text, and replacing the text label with a narrower robot button.

Solution: Clamp the reachability margin to small window dimensions and cover it with regression tests. Add cached Cancel and Launch controls to the selection-agent modal, anchor the robot action button at the selection's bottom-right boundary, and extend cached badge rendering to scale emoji with explicit component allocators. Update the user and architecture documentation.
@forketyfork
forketyfork marked this pull request as ready for review August 15, 2026 20:31
@forketyfork
forketyfork requested a lite review from Copilot August 15, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refines the “selection-to-agent” UX by making the selection launch control smaller and better positioned, adds an explicit Cancel action to the launch modal, and hardens window-position restoration for very small persisted window sizes.

Changes:

  • Clamp the persisted-window “reachability margin” to the saved window dimensions and add regression tests for tiny windows.
  • Replace the wide selection “Launch agent” pill with a narrow, cached 🤖 badge anchored to the selection’s bottom-right corner (with window-edge clamping), plus tests for the anchor/clamp behavior.
  • Add cached Cancel + Launch actions to the selection-agent modal, update cached badge rendering to support emoji-aware textures, and update user/architecture docs accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/ui/components/worktree_overlay.zig Updates GlyphBadge rendering call to pass an allocator for cached/emoji-aware rendering.
src/ui/components/session_interaction.zig Shrinks and re-anchors the selection action pill to a 🤖 badge; adds anchor/clamp tests.
src/ui/components/selection_agent_overlay.zig Adds Cancel button behavior + cached texture; factors shared action-button layout and tests it.
src/ui/components/recent_folders_overlay.zig Updates GlyphBadge rendering call to pass an allocator for cached/emoji-aware rendering.
src/ui/components/help_overlay.zig Updates GlyphBadge rendering call to pass an allocator for cached/emoji-aware rendering.
src/ui/components/glyph_badge.zig Adds allocator-aware rendering and optional emoji-aware rendering via text_render.makeTextTexture.
src/platform/sdl.zig Clamps window reachability margin by window dimensions; adds regression test for tiny windows.
README.md Updates user-facing description of selection-to-agent UX (robot button + Cancel/Escape).
docs/ARCHITECTURE.md Updates ADR-015 description to reflect robot pill anchor and Cancel/Launch modal actions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@forketyfork
forketyfork merged commit ecdf6fb into main Aug 15, 2026
5 checks passed
@forketyfork
forketyfork deleted the feat/selection-agent-ui branch August 15, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants