Add a setting for opening pull requests in Linear or Graphite - #314
Open
pekala wants to merge 1 commit into
Open
Add a setting for opening pull requests in Linear or Graphite#314pekala wants to merge 1 commit into
pekala wants to merge 1 commit into
Conversation
Pull request badges in the sidebar and composer always opened the
provider page. A new Source control settings page picks where they
land: GitHub (default), Linear, or Graphite. Linear rewrites
github.com to linear.review and keeps the path; Graphite opens
app.graphite.com/github/pr/{owner}/{repo}/{number}. Links that are
not GitHub pull requests keep their own page under every choice.
The target is read from the settings store at click time so a change
applies to badges already on screen, and the badge tooltip says
"Opens in Linear" or "Opens in Graphite" when a rewrite will happen.
The persisted key is `pullRequestLinkTarget`; older settings files
without it load as GitHub.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
Pull request badges in the sidebar and composer always opened the provider page. This adds a Source control settings page with an "Open pull requests in" choice: GitHub (default), Linear, or Graphite.
github.comtolinear.reviewand keeps the rest of the path, query, and fragment.https://app.graphite.com/github/pr/{owner}/{repo}/{number}. GitHub sub-pages don't carry over because Graphite has its own page layout.pullRequestLinkTargetinui-settings.json(github/linear/graphite). Older settings files without the key load as GitHub.ZERON_OPEN_ROUTE=settings/source-control.The iOS app has its own PR badge but no settings screen, so it is unchanged.
Test plan
cargo test --locked -p zeron-ui --lib -- --test-threads=1(783 passed). New tests cover the Linear and Graphite rewrites, the non-PR fallbacks for every target, the tooltip hint, and the settings round-trip plus default for older files.cargo clippy -p zeron-ui --testsreports nothing in the changed files; changed files are rustfmt-clean.settings/source-control, switched between the three options, and confirmed the persisted value.app.graphite.comhost resolves the/github/pr/…route the same wayapp.graphite.devdoes.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.