FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(feature-manager): mark token-requiring features OFF when token is missing by Battleplus · Pull Request #9990 · refined-github/refined-github · GitHub

fix(feature-manager): mark token-requiring features OFF when token is missing - #9990

Closed
Battleplus wants to merge 1 commit into
refined-github:mainfrom
Battleplus:fix/repo-header-info-no-token-spacer
Closed

fix(feature-manager): mark token-requiring features OFF when token is missing#9990
Battleplus wants to merge 1 commit into
refined-github:mainfrom
Battleplus:fix/repo-header-info-no-token-spacer

Conversation

Copy link
Copy Markdown

Fixes #9986 — repo-header-info leaves ~6em of dead space in the breadcrumbs when no personal token is configured.

What's happening

  • repo-header-info.css reserves padding-right: 6em on the last breadcrumb while the feature loads, and only releases it once the feature runs (by adding rgh-repo-header-info-updated).
  • When there's no token, expectToken() in the feature-manager throws before the feature ever runs — so the spacer is reserved and never released.

The fix

When a requiresToken feature can't run because expectToken() rejects, the feature-manager now sets the same rgh-OFF-<feature> attribute that the disabled CSS-only path already uses. Rules guarded by html:not([rgh-OFF-repo-header-info]) stop applying, so the breadcrumb spacer collapses instead of staying empty.

It continues to the next navigation event, so if the user adds a token later it gets picked up on the next page load (same re-check cadence as the existing CSS-only OFF loop).

Verified

  • tsc --noEmit clean
  • eslint . + biome lint clean
  • npm run vitest → 564 passed / 28 skipped

No UI change when a token is present (attribute only set on the missing-token path).

`repo-header-info` reserves ~6em in the breadcrumb while it loads, and that
space is only released when the feature actually runs (`rgh-repo-header-info-updated`).
When no personal token is configured, `expectToken` throws before the feature
ever runs, leaving the spacer permanently empty (refined-github#9986).

Set the same `rgh-OFF-<feature>` attribute the disabled CSS-only path uses, so
rules guarded by `html:not([rgh-OFF-…])` stop reserving space. Re-check on the
next navigation so a token added later gets picked up.

Closes refined-github#9986
github-actions Bot added the bug label Aug 20, 2026
github-actions Bot closed this Aug 20, 2026

Copy link
Copy Markdown

This looks like an AI-generated PR, so we're preemptively closing it. If you're human and tested it, include a screenshot/video/gif of the working PR and we can reopen the PR. Don't open more PRs until this one is resolved.

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

Labels

Development

Successfully merging this pull request may close these issues.

repo-header-info extra space when token is missing

1 participant


Back | FazBrowse Home | New Git URL