Open
Conversation
Adds a "Pin a PR..." command to the footer menu that accepts any GitHub PR URL, fetches it, and displays it in a new Pinned section (between Awaiting My Review and My PRs). Pinned PRs persist across restarts via UserDefaults and are deduplicated from the authored/reviewing lists. - PinnedPRsService: JSON-encoded persistence of PinnedPRIdentifier list - GitHubService: URL parser + fetchPinnedPR for arbitrary PR access - PRMonitorViewModel: concurrent pinned fetch, add/remove, dedup - MenuBarView: Commands menu (Pin/Settings/Updates), Pinned section - PRRowView: pin.slash unpin button on hover for pinned PRs - PinPRView: URL entry panel with auto-focus, Return-to-submit - Tests: URL parsing and PinnedPRsService unit tests
Completes the rename started in the previous commit: PinnedPRsService → OtherPRsService, PinPRView → AddPRView, .pinned → .other, addPinnedPR → addOtherPR, removePinnedPR → removeOtherPR, fetchPinnedPR → fetchOtherPR, and all related local variables and comments. UserDefaults key "pinnedPRs" preserved for backward compatibility.
Prevent adding a PR via URL if it's already in the authored or reviewing list (case-insensitive repo name comparison). Dismiss the menu before showing the remove confirmation alert.
…move - Filter Other PRs by selected repository (via filteredOtherPRs computed property) - Namespace PRRowView IDs by section to prevent cross-section state bleed - Reset selected repository to All Repositories when the last Other PR from the selected repo is removed - Fix section height calculation to use filteredOtherPRs count
Tests cover: addOtherPR throwing invalidURL and alreadyTracked (including case-insensitive repo matching), filteredOtherPRs respecting the selected repository filter, and removeOtherPR resetting the repo selection when the last PR for that repo is removed (and not resetting when others remain).
…t isolation Tests now create per-test UserDefaults suites via makeIsolatedServices(), eliminating save/restore boilerplate and preventing contamination of production watchlist and pinned PR data.
Users can set a local alias for any PR via a pencil button that appears on hover. Custom names survive polls (GitHub title is re-fetched but the override is re-applied from UserDefaults). Clearing the name restores the GitHub title. Stale entries are pruned after each successful refresh and immediately when a pinned PR is removed. Action buttons are now arranged in a compact 2×2 grid (Watch/Open on top, Delete/Rename on bottom) with fixed 16pt cells and vertical centering, saving horizontal space compared to the previous flat HStack.
Default parameter expressions are evaluated in a nonisolated context even when the init is @mainactor, causing warnings with SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor. Move service instantiation into the init body using nil-coalescing so defaults are evaluated in the correct @mainactor context.
Add displayTitle(count:) to PRType so 'Other PRs' becomes 'Other PR' and 'My PRs' becomes 'My PR' when there is exactly one. 'Awaiting My Review' opts out of pluralization as it reads correctly either way. sectionHeader in MenuBarView now takes PRType instead of a raw string.
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.
Summary
Details
PinnedPRsService: JSON-encoded persistence of PR identifiersGitHubService: URL parser (https://<host>/<owner>/<repo>/pull/<number>) +fetchPinnedPRfor arbitrary PR accessPRMonitorViewModel: concurrent pinned fetch alongside main search,addPinnedPR(urlString:)/removePinnedPR(_:)PinPRView: URL entry panel with auto-focus, Return-to-submit, inline error displayLazyVStack(stable IDs prevent SwiftUI view recycling when sections appear/disappear)Test plan