Skip to content

mark-locked - New feature - #10084

Merged
fregante merged 8 commits into
refined-github:mainfrom
Mihir4921:mark-locked-issues-in-lists
Sep 18, 2026
Merged

fregante merged 8 commits into
refined-github:mainfrom
Mihir4921:mark-locked-issues-in-lists

Conversation

@Mihir4921

Copy link
Copy Markdown
Contributor

Keeps GitHub's own state icon untouched and adds a smaller lock below it, so the row still shows issue vs PR and open/closed/merged/draft. This is the third option from the issue discussion.

The locked state comes from one batched GraphQL query per list, in the style of conflict-marker, so it needs a token.

Test URLs

Issues 134-136 and PRs 137-140 are locked, the other rows in these lists are not:

Only the issue list and the new PR list are supported, no legacy selectors.

Screenshot

Issue List

Screenshot 2026-09-13 at 2 15 33 PM

PR List

Screenshot 2026-09-13 at 2 16 07 PM

@Mihir4921
Mihir4921 force-pushed the mark-locked-issues-in-lists branch from 4adb150 to 3b74cc0 Compare September 13, 2026 19:31
@Mihir4921
Mihir4921 marked this pull request as ready for review September 13, 2026 19:34

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Solid PR! I just have a couple of nits

Comment thread source/features/mark-locked.tsx Resolved
Comment thread source/features/mark-locked.tsx Resolved
Comment thread source/features/mark-locked.tsx Resolved
Comment thread readme.md Resolved
@fregante fregante changed the title mark-locked-issues-in-lists - New feature mark-locked - New feature Sep 15, 2026
Comment thread source/features/mark-locked.tsx Outdated
});

const batchQuery = conversations.map(({key, owner, name, number}) => `
${key}: repository(owner: "${owner}", name: "${name}") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since the feature only supports repo lists, the repo query is always the same. So it should use this pattern instead:

const {repository} = await api.v4(`
repository() {
${
issueNumbers.map(number => `
${api.escapeKey(number)}: issue(number: ${number}) {
updatedAt
}
`).join('\n')
}
}
`);

Suggested change
${key}: repository(owner: "${owner}", name: "${name}") {
repository() {

This also means you can use getConversationNumber since you don't need owner/name anymore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to use a single repository() query. getConversationNumber() reads the current page URL, so it doesn’t give the individual conversation numbers on list pages. I’m extracting just the number from each row link instead. I also narrowed the feature to isRepoIssueOrPRList since the query now depends on the current repository.

@fregante

Copy link
Copy Markdown
Member

There are a couple more native versions we could consider (center, right), but I think the current one is good enough for now.

Screenshot 8 Screenshot 6 Screenshot 7

mark-pinned used to be more "integrated" this way but it was a bit difficult to see: #9564

@fregante
fregante merged commit df46fcd into refined-github:main Sep 18, 2026
14 checks passed
@fregante

Copy link
Copy Markdown
Member

@Mihir4921 thank you for the PR! Sorry for the many tweaks

@fregante

Copy link
Copy Markdown
Member

This looks really good, thanks! 😅

Screenshot 7

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

Development

Successfully merging this pull request may close these issues.

mark-pinned but for locked issues

2 participants