Skip to content

feat: add stars mode and star/unstar functionality#29

Merged
wiiiimm merged 14 commits into
mainfrom
feature/personal-stars
Sep 9, 2025
Merged

feat: add stars mode and star/unstar functionality#29
wiiiimm merged 14 commits into
mainfrom
feature/personal-stars

Conversation

@wiiiimm
Copy link
Copy Markdown
Owner

@wiiiimm wiiiimm commented Sep 9, 2025

Summary

This PR implements comprehensive starred repository management functionality, including:

  • View starred repositories in a dedicated "Stars Mode"
  • Star/unstar repositories from the main listing
  • Visual star indicators for starred repos

Features Added

🌟 Stars Mode (Personal Account Only)

  • Toggle with Shift+S to enter/exit stars mode
  • View all starred repositories with pagination support
  • Local filtering/search within starred repos
  • Unstar repositories with U key and confirmation modal
  • Automatically disabled when switching to organization context

⭐ Star/Unstar in Normal Mode

  • Ctrl+S to toggle star status for any repository
  • Modal confirmation with current star state
  • Handles OAuth access restrictions gracefully
  • Updates star icon immediately after action

🎯 Visual Indicators

  • Star icon (⭐) shown next to starred repository names
  • Works in both normal listing and stars mode
  • [org] indicator for organization repos in stars mode

⌨️ Keyboard Shortcut Updates

  • Star/Unstar: Ctrl+S (was conflicting with Sort, now fixed)
  • Sync Fork: Ctrl+F (moved from Ctrl+S)
  • Fork Status: Always enabled (removed toggle, was Ctrl+F)

Technical Implementation

  • Added GraphQL queries for fetching starred repositories
  • Added star/unstar mutations with Apollo cache updates
  • Added viewerHasStarred field to all repository queries
  • Implemented StarModal and UnstarModal components
  • Enhanced error handling for OAuth App access restrictions

Bug Fixes

  • Fixed pagination for starred repositories
  • Fixed down arrow navigation in search filter for stars mode
  • Fixed escape key handling with filter in stars mode
  • Fixed Ctrl+S conflict with Sort modal trigger
  • Added viewerHasStarred to Apollo queries to show star icons

Documentation

  • Updated README.md with all new keyboard shortcuts
  • Updated wiki/Usage.md and wiki/Features.md
  • Removed outdated fork status toggle documentation

Testing

  • Tested starring/unstarring repositories
  • Tested stars mode with pagination
  • Tested search/filter in stars mode
  • Tested OAuth restriction error handling
  • Verified all keyboard shortcuts work correctly

Closes #[issue-number-if-applicable]

Summary by CodeRabbit

  • New Features

    • Added Stars Mode to view/manage starred repositories (personal accounts only).
    • Star/Unstar repositories via Ctrl+S with confirmation dialog.
    • Fork sync moved to Ctrl+F.
    • Rename repository with inline validation (Ctrl+R).
    • Copy repository URL to clipboard (C), supporting SSH/HTTPS.
    • Always show commits behind upstream for forks (fork status tracking always on).
    • UI updates for Stars Mode (header label, starred markers, local filtering).
  • Documentation

    • Updated onboarding, usage, and feature guides for Stars Mode, new/changed shortcuts, fork status behaviour, and repository actions.

- Add Shift+S toggle to enter/exit stars mode (Personal Account only)
- Implement GraphQL query to fetch starred repositories
- Add UnstarModal component with U key to unstar repos
- Show ⭐ Stars Mode indicator in header when active
- Update help text to show stars mode commands
- Stars sorted by STARRED_AT desc for most recent first
- Visibility filter (V key) is now disabled when in stars mode
- Visibility filter label is hidden from header when in stars mode
- V shortcut is removed from help text when in stars mode
- Visibility filter is automatically reset to 'all' when entering stars mode
- Detect and provide user-friendly message for OAuth restriction errors
- Show [org] indicator next to organization repos in stars mode
- Use warning icon (⚠️) for OAuth restriction errors in modal
- Inform users they need to unstar directly on GitHub for restricted orgs
- Filter starred repositories locally (no server search)
- Different placeholder text for stars mode filtering
- Prevent GitHub search API calls when filtering in stars mode
- Filter by repository name and description
- Down arrow now properly exits filter mode and selects first item in stars mode
- Consistent behavior between normal search and stars mode filtering
- Escape key now properly clears the filter when in stars mode
- Maintains search state correctly (only clears search state in normal mode)
- Resets cursor to top after clearing filter
- Filter is now cleared when entering or exiting stars mode
- Prevents confusion from having different filters in different modes
- Search state is properly reset when switching modes
- Added star icon (⭐) next to starred repository names in both modes
- Implemented Shift+U shortcut to star/unstar repos in normal mode
- Created StarModal component for star/unstar confirmation
- Added viewerHasStarred field to GraphQL queries
- Added owner field to identify organization repos
- Handle OAuth access restrictions for star/unstar operations
- Update star count dynamically when starring/unstarring
- Added viewerHasStarred field to all Apollo Client queries (org and personal)
- Added owner field to all Apollo queries for OAuth restriction detection
- Star icons will now show properly in normal listing mode
- Organization repos can be identified for OAuth warnings
- Changed from Shift+U to Ctrl+U for consistency with other Ctrl shortcuts
- Updated help text to reflect the new shortcut
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 9, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Caution

Review failed

The pull request is closed.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88bcdcd and b906b6e.

📒 Files selected for processing (12)
  • README.md (4 hunks)
  • TODOs.md (1 hunks)
  • src/services/github.ts (5 hunks)
  • src/types.ts (2 hunks)
  • src/ui/components/modals/StarModal.tsx (1 hunks)
  • src/ui/components/modals/UnstarModal.tsx (1 hunks)
  • src/ui/components/modals/index.ts (1 hunks)
  • src/ui/components/repo/RepoListHeader.tsx (3 hunks)
  • src/ui/components/repo/RepoRow.tsx (3 hunks)
  • src/ui/views/RepoList.tsx (19 hunks)
  • wiki/Features.md (1 hunks)
  • wiki/Usage.md (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/personal-stars

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

cursor[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread src/ui/views/RepoList.tsx Outdated
- Fix API rate limit tracking by removing no-op setPrevRateLimit call
- Fix undefined setStarredPageInfo by using individual state setters
@wiiiimm wiiiimm merged commit 9295dcb into main Sep 9, 2025
1 of 2 checks passed
wiiiimm pushed a commit that referenced this pull request Sep 9, 2025
# [1.35.0](v1.34.0...v1.35.0) (2025-09-09)

### Bug Fixes

* add npm authentication configuration for semantic-release ([d2d5ad0](d2d5ad0))
* ensure build job fetches updated version from semantic-release ([e8df4ec](e8df4ec))
* optimize release workflow to check before building ([5027d45](5027d45))
* resolve PR Title Manager workflow script loading issue ([5764938](5764938))
* resolve Windows build failure in release pipeline ([708c0d3](708c0d3))
* restore original workflow behavior for release pipeline ([2781719](2781719))
* use --config flag to fully override semantic-release config ([b233b58](b233b58))
* use minimal config for semantic-release dry-run check ([830d058](830d058))

### Features

* add stars mode and star/unstar functionality ([#29](#29)) ([9295dcb](9295dcb))
@wiiiimm
Copy link
Copy Markdown
Owner Author

wiiiimm commented Sep 9, 2025

🎉 This PR is included in version 1.35.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant