fix(extension): resolve sticky-offset overlap, Files-tab discovery, and missed PR-feedback fixes#401
Conversation
Member
Author
|
This pull request is part of a Mergify stack:
|
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 Required ReviewsWaiting for:
This rule is failing.
🟢 ⛓️ Depends-On RequirementsWonderful, this rule succeeded.Requirement based on the presence of
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
f7853cb to
5718ad7
Compare
Member
Author
Revision history
|
5718ad7 to
3e674b9
Compare
…nd missed PR-feedback fixes Six fixes against the Mergify Stacks feature: 1. Negative caching in fetchCommentBodies: a 404/5xx from edit_form is now remembered for 60s so a deleted comment or a transient failure no longer causes a refetch on every tryInject tick. 2. Stale UI removal in renderMergifyContext: the early-return paths for "no comment bodies" and "panel is null" now explicitly remove any existing #mergify-context and #mergify-stack-nav. Previously the panel could linger after the markers disappeared. 3. In-flight dedup for status fetches: gatherPrStatuses now reuses a single Promise per (org/repo/num/head_sha) so multiple ticks during React reconciliation don't fire duplicate fetchPrStatus requests. 4. Toolbar reset on null nav path: injectStackNav now resets flex-wrap and removes the padding-bottom override unconditionally, not gated on whether our nav node still exists. React can drop our node while leaving the inline styles behind. 5. Sticky-offset overlap: GitHub's diff-view file-tree pane uses position: sticky; top: 60px hardcoded to the toolbar's original height. Our nav grows the toolbar to ~93px, which would otherwise hide the pane behind our nav. injectStackNav now writes a small <style> rule overriding the pane's top to the toolbar's actual current height (with !important to outweigh the class rule). The rule is removed when our nav is removed. 6. Files-tab discovery fallback: on the /files tab GitHub doesn't render the conversation timeline at all, so the local DOM scan for Mergify-related comment IDs always returned empty and the panel/nav never showed. fetchCommentBodies now falls back to fetching the Conversation page HTML and parsing comment IDs from it. Result is cached per-PR with a 5-minute TTL so subsequent ticks don't re-fetch the ~500 KB page. Six new tests cover each fix. Change-Id: I7bf7efe8f0e3b5dc3e0789c151fc9b89072a22b0
3e674b9 to
e93520e
Compare
sileht
approved these changes
May 5, 2026
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.
Six fixes against the Mergify Stacks feature:
Negative caching in fetchCommentBodies: a 404/5xx from edit_form
is now remembered for 60s so a deleted comment or a transient
failure no longer causes a refetch on every tryInject tick.
Stale UI removal in renderMergifyContext: the early-return paths
for "no comment bodies" and "panel is null" now explicitly remove
any existing #mergify-context and #mergify-stack-nav. Previously
the panel could linger after the markers disappeared.
In-flight dedup for status fetches: gatherPrStatuses now reuses a
single Promise per (org/repo/num/head_sha) so multiple ticks
during React reconciliation don't fire duplicate fetchPrStatus
requests.
Toolbar reset on null nav path: injectStackNav now resets
flex-wrap and removes the padding-bottom override unconditionally,
not gated on whether our nav node still exists. React can drop
our node while leaving the inline styles behind.
Sticky-offset overlap: GitHub's diff-view file-tree pane uses
<style> rule overriding the pane's top to the toolbar's actual current height (with !important to outweigh the class rule). The rule is removed when our nav is removed.position: sticky; top: 60px hardcoded to the toolbar's original
height. Our nav grows the toolbar to ~93px, which would otherwise
hide the pane behind our nav. injectStackNav now writes a small
Files-tab discovery fallback: on the /files tab GitHub doesn't
render the conversation timeline at all, so the local DOM scan
for Mergify-related comment IDs always returned empty and the
panel/nav never showed. fetchCommentBodies now falls back to
fetching the Conversation page HTML and parsing comment IDs from
it. Result is cached per-PR with a 5-minute TTL so subsequent
ticks don't re-fetch the ~500 KB page.
Six new tests cover each fix.
Depends-On: #398