Skip to content

feat: add context filter modifier actions#217

Merged
nathanhuh merged 1 commit into
mainfrom
feat/issue-213-context-filter-actions
May 21, 2026
Merged

feat: add context filter modifier actions#217
nathanhuh merged 1 commit into
mainfrom
feat/issue-213-context-filter-actions

Conversation

@nathanhuh
Copy link
Copy Markdown
Contributor

@nathanhuh nathanhuh commented May 21, 2026

Summary

Adds filter-mode modifier shortcuts to the context picker so users can act on the selected filtered context without first leaving filter mode.

Related Issues

Closes #213

Validation

  • make test
  • make build

Checklist

  • Scope is focused
  • Branch name follows docs/branch-naming-harness.md
  • Documentation harness reviewed (docs/documentation-harness.md)
  • README updated if user-facing behavior changed
  • Relevant docs/ pages updated if architecture, auth, config, or workflow changed
  • Tests/validation included
  • Breaking changes documented

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Ctrl+S shortcut to set up the selected filtered context in the Context Picker.
    • Added Ctrl+Y shortcut to copy exports for the selected filtered context.
  • Documentation

    • Updated README with new Context Picker filter-mode keybindings.

Review Change Stack

- Handle ctrl+y and ctrl+s while context filtering is active

- Keep plain y/s as filter input and document the shortcuts

- Cover filter-mode copy/setup behavior in context picker tests
Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

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

Summary

This PR successfully adds filter-mode modifier shortcuts (Ctrl+S and Ctrl+Y) to the context picker, enabling users to setup or copy exports for filtered contexts without leaving filter mode. The implementation is clean, follows existing patterns, and includes comprehensive test coverage.

Changes:

  • Added Ctrl+S and Ctrl+Y keyboard shortcuts that work in filter mode
  • Updated README documentation to reflect the new shortcuts
  • Added context-aware help text that displays the shortcuts when in filter mode
  • Included thorough unit tests covering both the UI display and actual functionality

Quality:

  • ✅ Code follows established patterns and conventions
  • ✅ Comprehensive test coverage with 4 new test cases
  • ✅ Documentation updated appropriately
  • ✅ No defects identified that block merge

The feature enhances user experience by reducing the number of steps needed to act on filtered contexts.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 819e4eb3-e950-4f9b-8bb5-552b4bbe03c2

📥 Commits

Reviewing files that changed from the base of the PR and between ad32d7b and 0fa50dd.

📒 Files selected for processing (4)
  • README.md
  • internal/app/help.go
  • internal/app/screen_context.go
  • internal/app/screen_context_test.go
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.go: Use lipgloss for styled TUI output — column-aligned tables with dimmed labels in Go implementation files
Implement scroll windowing with formula: visibleLines := max(m.height-N, 5) in Go TUI implementation

Files:

  • internal/app/help.go
  • internal/app/screen_context.go
  • internal/app/screen_context_test.go

⚙️ CodeRabbit configuration file

**/*.go: For Go reviews, look beyond compilation and prioritize nil pointer risks,
context propagation, AWS SDK pagination, error wrapping, deterministic
sorting, and stable table/detail rendering. For new AWS service work,
verify that repository interfaces, model mapping, app integration, and
tests are updated together.

Files:

  • internal/app/help.go
  • internal/app/screen_context.go
  • internal/app/screen_context_test.go
internal/app/**

⚙️ CodeRabbit configuration file

internal/app/**: For Bubble Tea screen changes, verify message routing, key handling,
filter target resets, height-based windowing, help text, and back/home
navigation against the existing screen patterns.

Files:

  • internal/app/help.go
  • internal/app/screen_context.go
  • internal/app/screen_context_test.go
README.md

📄 CodeRabbit inference engine (CLAUDE.md)

README.md: When adding, modifying, or deleting features, always update README.md in parallel with code changes
Update Currently Implemented Features table in README.md: add new services/features, update status changes (🚧→✅), remove deleted items
Update TUI Key Bindings table in README.md when key bindings are added, changed, or deleted
Update Usage section in README.md when new CLI commands or flags are added
Update Configuration section in README.md when configuration format changes

Files:

  • README.md

⚙️ CodeRabbit configuration file

README.md: Verify that README changes match actual CLI/TUI behavior and that
Currently Implemented Features, TUI Key Bindings, Usage, and
Configuration content stay aligned with code changes.

Files:

  • README.md
**/*_test.go

📄 CodeRabbit inference engine (CLAUDE.md)

Tests use mock client interfaces (see rds_test.go pattern) in Go test files

Files:

  • internal/app/screen_context_test.go

⚙️ CodeRabbit configuration file

**/*_test.go: Check that tests cover API errors, mapping edge cases, and navigation
state transitions, not only happy paths. Prefer mock-based tests that do
not depend on external AWS calls.

Files:

  • internal/app/screen_context_test.go
🔇 Additional comments (5)
internal/app/screen_context.go (2)

105-120: LGTM!


295-298: LGTM!

internal/app/help.go (1)

92-97: LGTM!

internal/app/screen_context_test.go (1)

144-168: LGTM!

Also applies to: 170-187, 458-534, 536-612

README.md (1)

351-351: LGTM!


Walkthrough

This PR adds modifier-key actions (Ctrl+Y and Ctrl+S) that work directly on filtered contexts while the context filter input is active. Previously, users had to exit filter mode to execute these actions. The feature integrates into the help system, includes comprehensive filter-mode tests, and updates documentation.

Changes

Context Picker Filter Mode Modifier Actions

Layer / File(s) Summary
Filter mode key handler and help display
internal/app/screen_context.go, internal/app/help.go
While filtering contexts, ctrl+y copies shell exports and ctrl+s initiates setup for the currently selected (filtered) context. The context picker's help bar now detects filtering mode and renders filter-specific text including ctrl+y and ctrl+s hints, alongside navigation keys. The help mode shortcuts also append these new actions when the filter is focused and screen is context picker.
Filter mode behavior validation
internal/app/screen_context_test.go
Four new tests verify filter-mode behavior: plain y and s still append to the filter text, filter-mode help bar includes modifier action hints, ctrl+y copies exports for the selected filtered context without changing persisted context, and ctrl+s sets up the selected filtered context and updates the persisted context.
Keybindings documentation
README.md
Context Picker keybindings table updated to document new filter-mode shortcuts Ctrl+S (setup selected filtered context) and Ctrl+Y (copy filtered exports).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • DevopsArtFactory/unic#214: Modifies internal/app/screen_context.go's viewContextPicker to conditionally render filter UI alongside this PR's changes to filter-mode help display.

Suggested reviewers

  • YoungJinJung
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add context filter modifier actions' uses the required conventional prefix 'feat:' and clearly summarizes the main change of adding modifier shortcuts to the context filter.
Description check ✅ Passed The PR description includes all required template sections: Summary, Related Issues, Validation, and completed Checklist items covering scope, documentation, README updates, and testing.
Linked Issues check ✅ Passed All acceptance criteria from issue #213 are met: ctrl+y and ctrl+s work during filtering [screen_context.go, screen_context_test.go], plain y/s append to filter [screen_context_test.go], help text updated [help.go, README.md], and comprehensive tests added [screen_context_test.go].
Out of Scope Changes check ✅ Passed All changes directly relate to implementing filter-mode modifier actions: README documentation, help text generation, context picker logic, and corresponding tests. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-213-context-filter-actions

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

@nathanhuh nathanhuh merged commit 62da8af into main May 21, 2026
3 checks passed
@nathanhuh nathanhuh deleted the feat/issue-213-context-filter-actions branch May 21, 2026 09:02
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.

feat: add context filter modifier actions for copy and setup

2 participants