Skip to content

fix(extension): resolve sticky-offset overlap and apply missed PR-feedback fixes#400

Closed
jd wants to merge 1 commit intodevs/jd/worktree-leverage-json/split-src-mergify-js-es-modules-esbuild-bundle--0ff58889from
devs/jd/worktree-leverage-json/resolve-sticky-offset-overlap-apply-missed-pr--e79f4d58
Closed

fix(extension): resolve sticky-offset overlap and apply missed PR-feedback fixes#400
jd wants to merge 1 commit intodevs/jd/worktree-leverage-json/split-src-mergify-js-es-modules-esbuild-bundle--0ff58889from
devs/jd/worktree-leverage-json/resolve-sticky-offset-overlap-apply-missed-pr--e79f4d58

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented Apr 30, 2026

The previous PR (#395) intended to address four Copilot review threads
but a botched amend dropped the fixes from the working tree. This
commit re-applies them, plus fixes a separate bug where our nav row
overlaps the file-tree sticky pane on the Files tab.

  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.

Five new tests cover each fix.

Depends-On: #398

…dback fixes

The previous PR (#395) intended to address four Copilot review threads
but a botched amend dropped the fixes from the working tree. This
commit re-applies them, plus fixes a separate bug where our nav row
overlaps the file-tree sticky pane on the Files tab.

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.

Five new tests cover each fix.

Change-Id: Ie79f4d58085da30fc97aa50b60c0e0d4468b4e16
@jd
Copy link
Copy Markdown
Member Author

jd commented Apr 30, 2026

This pull request is part of a Mergify stack:

# Pull Request Link
1 refactor(extension): split src/mergify.js into ES modules with esbuild bundle #398
2 fix(extension): resolve sticky-offset overlap and apply missed PR-feedback fixes #400 👈

@mergify mergify Bot had a problem deploying to Mergify Merge Protections April 30, 2026 12:09 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 30, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 ⛓️ Depends-On Requirements

Waiting for:

This rule is failing.

Requirement based on the presence of Depends-On in the body of the pull request

🔴 Required Reviews

Waiting for:

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@jd jd closed this Apr 30, 2026
@jd jd deleted the devs/jd/worktree-leverage-json/resolve-sticky-offset-overlap-apply-missed-pr--e79f4d58 branch April 30, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant