Skip to content

feat(patternfly): add PatternFly migration plugin#428

Open
anandkuma77 wants to merge 7 commits into
openshift-eng:mainfrom
anandkuma77:add-patternfly-plugin
Open

feat(patternfly): add PatternFly migration plugin#428
anandkuma77 wants to merge 7 commits into
openshift-eng:mainfrom
anandkuma77:add-patternfly-plugin

Conversation

@anandkuma77
Copy link
Copy Markdown

@anandkuma77 anandkuma77 commented Apr 22, 2026

Adds a new patternfly plugin with migration tooling for React components.

New command:

  • /patternfly:migrate [file-path] - Analyzes and migrates PatternFly v5 components to v6

New skill:

  • MigrationPf5ToPf6 - Expert knowledge base covering:
    • Component replacements (Text → Content, Chip → Label, etc.)
    • Prop renames and removals
    • Import path updates
    • Token migrations
    • Toolbar updates
    • Markup structure changes
    • Deprecated component guidance

Plugin structure:

  • Command: plugins/patternfly/commands/migrate.md
  • Skill: plugins/patternfly/skills/patternfly-migration/SKILL.md
  • Registered in marketplace with version 1.0.0

Why

PatternFly v6 introduces significant breaking changes that require manual code updates. While official codemods handle batch migrations, developers need:

  1. AI-assisted analysis for complex migration scenarios
  2. Context-aware guidance for one-off component migrations
  3. Understanding of breaking changes beyond what automated tools provide
  4. Migration strategy planning before running codemods

This plugin complements the official @patternfly/pf-codemods by providing intelligent analysis, clear explanations, and manual verification checklists for structural changes that can't be automated.

Summary by CodeRabbit

  • New Features

    • Added a PatternFly plugin (v1.2.0) with a /patternfly:migrate command and two skills: PF React migration and Glass Theme.
    • Glass Theme UI: toggle component, runtime hook, and example components to enable glassmorphism.
  • Improvements

    • Migration supports automated renames/import/prop updates, dry-run scans, and detailed reports.
  • Documentation

    • Comprehensive docs and usage examples for migration workflow and glass theme usage.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 22, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 22, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: anandkuma77
Once this PR has been reviewed and has the lgtm label, please assign prashanth684 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

A new PatternFly plugin is registered and documented: adds plugin manifests, PLUGINS index, README, a /patternfly:migrate command and migration skill, a pf-glass-theme skill, owners, and supporting React hook/components and CSS for the glass theme.

Changes

PatternFly plugin

Layer / File(s) Summary
Registration & index
.claude-plugin/marketplace.json, docs/data.json, plugins/patternfly/.claude-plugin/plugin.json, PLUGINS.md, plugins/patternfly/OWNERS
Register new PatternFly plugin with source, description, version, PLUGINS index entry, and owners.
README and migrate command
plugins/patternfly/README.md, plugins/patternfly/commands/migrate.md
Add plugin README and detailed migrate command docs (usage, workflow, examples, outputs, related commands).
PatternFly migration skill
plugins/patternfly/skills/patternfly-migration/SKILL.md
Add migration skill docs covering component/prop mappings, scan examples, workflow, replacement guidance, and standardized output reporting.
Glass theme docs
plugins/patternfly/skills/pf-glass-theme/README.md, plugins/patternfly/skills/pf-glass-theme/SKILL.md
Add glass-theme README and SKILL docs describing tokens, usage patterns, pitfalls, and implementation guidance.
Glass theme scripts and styles
plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts, plugins/patternfly/skills/pf-glass-theme/scripts/GlassThemeToggle.tsx, plugins/patternfly/skills/pf-glass-theme/scripts/glass-example.tsx, plugins/patternfly/skills/pf-glass-theme/scripts/glass-theme-enhanced.css
Add useGlassTheme hook with ref-counting and cleanup, GlassThemeToggle component, GlassCard/GlassFloatingCard examples, and enhanced CSS for visible glass effects.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels: do-not-merge/hold

Suggested reviewers:

  • cblecker
  • zaneb
  • bentito
🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(patternfly): add PatternFly migration plugin' accurately and clearly describes the main change—introducing a new PatternFly migration plugin with migration/glass-theme capabilities.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed No references to real people's names found in plugin commands, skill documentation, example prompts, or style references throughout the PatternFly plugin addition.
No Assumed Git Remote Names ✅ Passed PatternFly plugin files contain no hardcoded git remote names ("origin", "upstream") in commands, documentation, or code.
Git Push Safety Rules ✅ Passed The PR adds a PatternFly migration plugin with no git push, force push, or autonomous pushing code. Plugin only performs code analysis and suggests migrations.
No Untrusted Mcp Servers ✅ Passed No untrusted MCP server installations found. PR adds a Claude Code plugin referencing only official @patternfly npm packages. MCP mention is advisory documentation only.
Ai-Helpers Overlap Detection ✅ Passed No overlaps detected. PatternFly v5→v6 React migration is distinct from OTE testing framework migration. Similarity 12.5% well below 60% threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/patternfly/commands/migrate.md`:
- Line 3: Update the /patternfly:migrate command docs to consistently document
the --dry-run flag: add [--dry-run] to the command hint/synopsis and examples
shown (the usages around /patternfly:migrate [file-path], /patternfly:migrate
src/components/Dashboard.tsx, and /patternfly:migrate src/components --dry-run),
add a bullet for `--dry-run` in the Arguments section explaining it analyzes and
reports the migration plan without applying edits, and add bash fence languages
to the code blocks to satisfy MD040; then regenerate/update the related
registries/docs (docs/data.json, PLUGINS.md, plugins/patternfly/README.md) so
the synopsis and argument hints for /patternfly:migrate remain aligned.

In `@plugins/patternfly/README.md`:
- Around line 74-79: Update the PatternFly resource links under the "##
Resources" section to use the stable domain and correct upgrade path: replace
any occurrences of "staging-v6.patternfly.org" with "www.patternfly.org" and
change the migration guide path from "/get-started/migrate-to-v6/" to
"/get-started/upgrade/"; ensure the three token/component/doc links (Token
Reference, Component Examples, PatternFly v6 Documentation) now point to the
corresponding "www.patternfly.org" URLs with the updated paths.

In `@plugins/patternfly/skills/patternfly-migration/SKILL.md`:
- Around line 484-492: Replace the destructive commands in the troubleshooting
entries: under the "Module not found" section remove the `rm -rf node_modules
package-lock.json && npm install` recommendation and instead advise using `npm
ci` to install from the lockfile; under the "Property does not exist" section
remove `npm install typescript@latest` and instead instruct contributors to bump
TypeScript through the repository's standard dependency-update process (e.g.,
open a dependency-update PR and run CI) so upgrades are reviewed and lockfile
changes are explicit.
- Around line 207-212: The markdown references use the staging domain
(staging-v6.patternfly.org); update every occurrence of that domain to the
canonical public site (www.patternfly.org) so links like
"https://staging-v6.patternfly.org/tokens/all-patternfly-tokens" become
"https://www.patternfly.org/tokens/all-patternfly-tokens"; search the SKILL.md
for any "staging-v6.patternfly.org" strings (including in the "Token Migration
Strategy" section and the other referenced locations) and replace them with
"www.patternfly.org", keeping the rest of the URL path and HTTPS scheme intact.
- Around line 53-60: Update the Token Updates section to clarify that the t_
prefix is applied automatically by the PatternFly codemod (not manually) and
emphasize running the codemod command `npx `@patternfly/pf-codemods`@latest --v6
./src --fix`; explicitly mention that React import forms are transformed (e.g.,
`import global_BorderWidth_lg` becomes `import
t_global_border_width_extra_strong`) and that the codemod also converts CSS vars
(e.g., `--pf-v5-global--BorderWidth--lg` →
`--pf-t--global--border--width--extra-strong`), so readers should rely on the
automated tool rather than manually adding the `t_` prefix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c6856ece-f71d-4684-a5ec-5a9656014ec8

📥 Commits

Reviewing files that changed from the base of the PR and between 8c54279 and c0d8290.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json
  • PLUGINS.md
  • docs/data.json
  • plugins/patternfly/.claude-plugin/plugin.json
  • plugins/patternfly/README.md
  • plugins/patternfly/commands/migrate.md
  • plugins/patternfly/skills/patternfly-migration/SKILL.md

@@ -0,0 +1,94 @@
---
description: Migrate React components from PatternFly 5 to PatternFly 6
argument-hint: "[file-path]"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Keep --dry-run discoverable or remove the example.

Line 75 advertises --dry-run, but the command hint, synopsis, generated registries, and Arguments section only document [file-path]. If dry-run is supported, include it consistently and define that no edits are applied; otherwise remove the example. While touching this block, add fence languages to satisfy MD040.

📝 Proposed docs update if dry-run is supported
-description: Migrate React components from PatternFly 5 to PatternFly 6
-argument-hint: "[file-path]"
+description: Migrate React components from PatternFly 5 to PatternFly 6
+argument-hint: "[file-path] [--dry-run]"
 skill: patternfly-migration
 ---
@@
-```
-/patternfly:migrate [file-path]
+```bash
+/patternfly:migrate [file-path] [--dry-run]

@@

  • /patternfly:migrate src/components/Dashboard.tsx

@@

  • /patternfly:migrate

@@

  • /patternfly:migrate src/components --dry-run
    Shows migration plan without applying changes (if user wants to review first)
    @@
    -- $1: (Optional) File path or directory to migrate. If not provided, analyzes the current context or prompts for clarification.
    +- $1: (Optional) File path or directory to migrate. If not provided, analyzes the current context or prompts for clarification.
    +- --dry-run: (Optional) Analyze and report the migration plan without applying edits.

Also regenerate/update `docs/data.json`, `PLUGINS.md`, and `plugins/patternfly/README.md` so their synopsis and argument hints stay aligned.
</details>


Also applies to: 10-13, 59-80

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @plugins/patternfly/commands/migrate.md at line 3, Update the
/patternfly:migrate command docs to consistently document the --dry-run flag:
add [--dry-run] to the command hint/synopsis and examples shown (the usages
around /patternfly:migrate [file-path], /patternfly:migrate
src/components/Dashboard.tsx, and /patternfly:migrate src/components --dry-run),
add a bullet for --dry-run in the Arguments section explaining it analyzes and
reports the migration plan without applying edits, and add bash fence languages
to the code blocks to satisfy MD040; then regenerate/update the related
registries/docs (docs/data.json, PLUGINS.md, plugins/patternfly/README.md) so
the synopsis and argument hints for /patternfly:migrate remain aligned.


</details>

<!-- fingerprinting:phantom:poseidon:ibis -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment thread plugins/patternfly/README.md Outdated
Comment on lines +53 to +60
#### 5. **Token Updates**
- Global tokens prefixed with `t_` when they reference `--pf-t` variables
- Many v5 tokens replaced with v6 equivalents
- Color tokens replaced with `t_temp_dev_tbd` (requires manual update)
- Examples:
- `global_BorderWidth_lg` → `global_border_width_extra_strong`
- `global_FontWeight_normal` → `global_font_weight_body_default`
- CSS vars: `--pf-v5-global--BorderWidth--lg` → `--pf-t--global--border--width--extra-strong`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

curl -fsSL https://raw.githubusercontent.com/patternfly/pf-codemods/main/README.md \
  | grep -E 'global_border_width_extra_strong|global_font_weight_body_default|t_temp_dev_tbd'

Repository: openshift-eng/ai-helpers

Length of output: 50


🏁 Script executed:

cat plugins/patternfly/skills/patternfly-migration/SKILL.md | head -70 | tail -20

Repository: openshift-eng/ai-helpers

Length of output: 981


🏁 Script executed:

#!/bin/bash
# Check if SKILL.md file exists and get its size
if [ -f "plugins/patternfly/skills/patternfly-migration/SKILL.md" ]; then
  wc -l "plugins/patternfly/skills/patternfly-migration/SKILL.md"
  echo "---"
  sed -n '53,60p' "plugins/patternfly/skills/patternfly-migration/SKILL.md"
else
  echo "File not found"
fi

Repository: openshift-eng/ai-helpers

Length of output: 588


🌐 Web query:

PatternFly v6 token migration codemod global token examples

💡 Result:

PatternFly v6 provides codemods via the @patternfly/pf-codemods package to automate token migration from v5 to v6, particularly for global tokens. Run with npx @patternfly/pf-codemods@latest --v6 ./path-to-src --fix after updating dependencies to PatternFly 6. Key rules affecting tokens: - Prefix rule: Adds 't_' prefix to React tokens referencing --pf-t variables. Example: In: import color_green_10 from "@patternfly/react-tokens/dist/esm/color_green_10"; Out: import t_color_green_10 from "@patternfly/react-tokens/dist/esm/t_color_green_10"; - tokens-update rule: Updates CSS tokens. Autofixes global non-color tokens (e.g., spacers, font sizes). For global color tokens, replaces with temporary hot pink placeholder t_temp_dev_tbd (or --pf-t--temp--dev--tbd) requiring manual replacement using v6 token docs. Non-global tokens need manual update. Examples (inferred from snippets): In: global_Color_100; global_Color_200; color300; global_BorderColor_100; Out (color): t_temp_dev_tbd as global_Color_100 /* CODEMODS: you should update this color token /; Out (non-color, e.g.): t_global_border_width_regular or similar autofix. Style usage example: In: style={{ color: "var(--pf-v5-global--Color--100)" }} Out: style={{ color: "var(--pf-t--temp--dev--tbd)/ CODEMODS: original v5 color was --pf-v5-global--Color--100 */" }} Manual steps post-codemod: - Replace t_temp_dev_tbd with semantic v6 global tokens from https://www.patternfly.org/tokens/all-patternfly-tokens (prefer semantic like --pf-t--global--background--color--primary--default, avoid palette/base ending in numbers). - No 1:1 mapping; choose semantically (e.g., v5 global_link_Color_hover -> t_global_color_nonstatus_green_clicked). - Non-color example: --pf-v5-global--FontSize--lg -> --pf-t--global--font--size--lg (t_global_font_size_lg). - Import React tokens: import t_global_spacer_sm from '@patternfly/react-tokens/dist/esm/t_global_spacer_sm'; Run codemods iteratively, review flagged issues, remove overrides, check token docs for replacements. Sources confirm up-to-date as of 2026.

Citations:


🌐 Web query:

PatternFly pf-codemods global_BorderWidth_lg global_border_width_extra_strong

💡 Result:

In PatternFly's pf-codemods tool, used for upgrading PatternFly React code (e.g., from v5 to v6), the "tokens-update" rule automatically replaces deprecated token imports like global_BorderWidth_lg from "@patternfly/react-tokens" with the updated global_border_width_extra_strong. This is part of broader token updates where about half of the tokens were replaced with newer ones. The codemod provides autofix for global non-color tokens via --fix flag. Example transformation shown in docs: In: import global_BorderWidth_lg from "@patternfly/react-tokens/dist/esm/global_BorderWidth_lg"; Out: import global_border_width_extra_strong from "@patternfly/react-tokens/dist/esm/global_border_width_extra_strong"; In PatternFly 6, border widths use semantic tokens like --pf-t--global--border--width--extra-strong, which likely corresponds to this React token (following the pattern where React tokens mirror CSS vars with t_ prefix and underscores, e.g., t_global_border_width_extra_strong). To apply: Run npx @patternfly/pf-codemods@latest --v6 ./src --fix (targets v5 to v6 changes).

Citations:


🏁 Script executed:

#!/bin/bash
# Check if there are other similar misleading statements in SKILL.md about token prefixing
rg -n "Global tokens|prefixed with.*t_|React.*token" plugins/patternfly/skills/patternfly-migration/SKILL.md -A 2 -B 2

Repository: openshift-eng/ai-helpers

Length of output: 300


🏁 Script executed:

#!/bin/bash
# Verify the exact import forms that would result from applying these rules
# by checking if there are code examples elsewhere in the file
sed -n '1,100p' plugins/patternfly/skills/patternfly-migration/SKILL.md | grep -E "import|from.*react-tokens" -A 1 -B 1

Repository: openshift-eng/ai-helpers

Length of output: 508


Clarify that the t_ prefix is applied by the automated codemod, not manually.

The statement "Global tokens prefixed with t_ when they reference --pf-t variables" is accurate per PatternFly's codemod behavior, but the examples (global_BorderWidth_lg → global_border_width_extra_strong) only show token name updates and don't illustrate the React import form. The codemod's prefix rule automatically adds t_ to React token imports: import global_BorderWidth_lgimport t_global_border_width_extra_strong. The guidance should emphasize running the automated codemod (npx @patternfly/pf-codemods@latest --v6 ./src --fix) rather than manually applying these transformation rules, to avoid confusion about when and how the t_ prefix applies.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/patternfly/skills/patternfly-migration/SKILL.md` around lines 53 -
60, Update the Token Updates section to clarify that the t_ prefix is applied
automatically by the PatternFly codemod (not manually) and emphasize running the
codemod command `npx `@patternfly/pf-codemods`@latest --v6 ./src --fix`;
explicitly mention that React import forms are transformed (e.g., `import
global_BorderWidth_lg` becomes `import t_global_border_width_extra_strong`) and
that the codemod also converts CSS vars (e.g., `--pf-v5-global--BorderWidth--lg`
→ `--pf-t--global--border--width--extra-strong`), so readers should rely on the
automated tool rather than manually adding the `t_` prefix.

Comment thread plugins/patternfly/skills/patternfly-migration/SKILL.md Outdated
Comment thread plugins/patternfly/skills/patternfly-migration/SKILL.md Outdated
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 22, 2026
Anand Kumar added 2 commits May 15, 2026 16:01
Adds new plugin for migrating React components from PatternFly v5 to v6.

Includes:
- /patternfly:migrate command for automated migration analysis
- MigrationPf5ToPf6 skill with comprehensive v6 migration knowledge
- Component replacements, prop updates, and import path migrations
- Manual verification guidance for structural changes
- Replace staging-v6.patternfly.org with www.patternfly.org
- Update migration guide path from /migrate-to-v6/ to /upgrade/
- Replace destructive npm commands with safer alternatives:
  - Use npm ci instead of rm -rf node_modules
  - Recommend dependency-update PR process instead of npm install @latest
@anandkuma77 anandkuma77 force-pushed the add-patternfly-plugin branch from 8ba5a43 to cf5f44f Compare May 15, 2026 10:34
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (2)
plugins/patternfly/commands/migrate.md (1)

3-3: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Document --dry-run consistently and add fence languages.

Line 75 advertises --dry-run, but Line 3/Line 12/Line 80 don’t document it, and code fences at Line 11, Line 62, Line 68, and Line 74 are missing language tags.

📝 Suggested doc alignment
-argument-hint: "[file-path]"
+argument-hint: "[file-path] [--dry-run]"
@@
-```
-/patternfly:migrate [file-path]
+```bash
+/patternfly:migrate [file-path] [--dry-run]

@@

  • /patternfly:migrate src/components/Dashboard.tsx

@@

  • /patternfly:migrate

@@

  • /patternfly:migrate src/components --dry-run

@@

  • $1: (Optional) File path or directory to migrate. If not provided, analyzes the current context or prompts for clarification.
    +- --dry-run: (Optional) Analyze and report the migration plan without applying edits.
</details>






Also applies to: 11-13, 62-76, 79-80

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @plugins/patternfly/commands/migrate.md at line 3, Update the migrate command
docs in plugins/patternfly/commands/migrate.md to consistently document the
--dry-run flag and add language tags to the code fences: include --dry-run in
the usage line for /patternfly:migrate, add a bullet describing --dry-run
(“Analyze and report the migration plan without applying edits”), and change all
triple-backtick fences shown (the examples around /patternfly:migrate
[file-path], /patternfly:migrate src/components/Dashboard.tsx,
/patternfly:migrate, and /patternfly:migrate src/components --dry-run) to use
bash fences (```bash) so examples and the flag description are aligned and
consistent.


</details>

</blockquote></details>
<details>
<summary>plugins/patternfly/skills/patternfly-migration/SKILL.md (1)</summary><blockquote>

`54-60`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Align token examples with the `t_` prefix rule.**

Line 54 says the migration uses `t_`-prefixed token forms, but Line 58-59 examples omit that prefix. This contradiction can cause incorrect manual edits during migration.

<details>
<summary>📝 Suggested clarification</summary>

```diff
-- Global tokens prefixed with `t_` when they reference `--pf-t` variables
+- React token imports are automatically prefixed with `t_` by codemods when targeting `--pf-t` variables
@@
-  - `global_BorderWidth_lg` → `global_border_width_extra_strong`
-  - `global_FontWeight_normal` → `global_font_weight_body_default`
+  - `global_BorderWidth_lg` → `t_global_border_width_extra_strong`
+  - `global_FontWeight_normal` → `t_global_font_weight_body_default`
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/patternfly/skills/patternfly-migration/SKILL.md` around lines 54 -
60, The examples in the migration note contradict the stated `t_` prefix rule:
update the examples so they include the `t_` prefix (e.g., change the example
mappings such as `global_BorderWidth_lg` → `global_border_width_extra_strong`
and `global_FontWeight_normal` → `global_font_weight_body_default`, and the CSS
var `--pf-v5-global--BorderWidth--lg` →
`--pf-t--global--border--width--extra-strong`) to consistently show
`t_`-prefixed token names and `--pf-t` CSS vars; ensure all example tokens in
the SKILL.md section reference `t_`-prefixed forms to match the rule described.
```

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In @plugins/patternfly/commands/migrate.md:

  • Line 3: Update the migrate command docs in
    plugins/patternfly/commands/migrate.md to consistently document the --dry-run
    flag and add language tags to the code fences: include --dry-run in the usage
    line for /patternfly:migrate, add a bullet describing --dry-run (“Analyze and
    report the migration plan without applying edits”), and change all
    triple-backtick fences shown (the examples around /patternfly:migrate
    [file-path], /patternfly:migrate src/components/Dashboard.tsx,
    /patternfly:migrate, and /patternfly:migrate src/components --dry-run) to use
    bash fences (```bash) so examples and the flag description are aligned and
    consistent.

In @plugins/patternfly/skills/patternfly-migration/SKILL.md:

  • Around line 54-60: The examples in the migration note contradict the stated
    t_ prefix rule: update the examples so they include the t_ prefix (e.g.,
    change the example mappings such as global_BorderWidth_lg
    global_border_width_extra_strong and global_FontWeight_normal
    global_font_weight_body_default, and the CSS var
    --pf-v5-global--BorderWidth--lg
    --pf-t--global--border--width--extra-strong) to consistently show
    t_-prefixed token names and --pf-t CSS vars; ensure all example tokens in
    the SKILL.md section reference t_-prefixed forms to match the rule described.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Enterprise

**Run ID**: `6130a91d-c76a-4278-a6b8-484e92c2f3a5`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between c0d829088092404f8b1d7649dab30c741b9d1629 and cf5f44fabd62a54f20c5ef720c55de0510c89b16.

</details>

<details>
<summary>📒 Files selected for processing (7)</summary>

* `.claude-plugin/marketplace.json`
* `PLUGINS.md`
* `docs/data.json`
* `plugins/patternfly/.claude-plugin/plugin.json`
* `plugins/patternfly/README.md`
* `plugins/patternfly/commands/migrate.md`
* `plugins/patternfly/skills/patternfly-migration/SKILL.md`

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* .claude-plugin/marketplace.json
* PLUGINS.md

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary>

* plugins/patternfly/.claude-plugin/plugin.json
* docs/data.json

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
plugins/patternfly/commands/migrate.md (1)

3-3: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Document the --dry-run flag or remove the example.

Line 75 demonstrates --dry-run, but the frontmatter argument-hint (line 3), synopsis (line 12), and Arguments section (lines 79-80) do not document it. Either add --dry-run to the argument-hint, synopsis, and Arguments section with a description, or remove the dry-run example.

📝 Proposed fix if --dry-run is supported
 ---
 description: Migrate PatternFly v5 to v6 (React components, CSS classes, tokens)
-argument-hint: "[file-path]"
+argument-hint: "[file-path] [--dry-run]"
 skill: pf-react-migration
 ---
 ## Synopsis
-```
-/patternfly:migrate [file-path]
+```bash
+/patternfly:migrate [file-path] [--dry-run]

```diff
 ## Arguments
 - `$1`: (Optional) File path or directory to migrate. If not provided, analyzes the current context or prompts for clarification.
+- `--dry-run`: (Optional) Analyze and report the migration plan without applying edits.

Also applies to: 75-77, 79-80

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/patternfly/commands/migrate.md` at line 3, The example uses a
--dry-run flag but the frontmatter argument-hint, synopsis, and Arguments
section lack it; either remove the dry-run example or add support documentation:
update the frontmatter entry `argument-hint` to include "[--dry-run]" (in
plugins/patternfly/commands/migrate.md), update the synopsis line to show
`/patternfly:migrate [file-path] [--dry-run]`, and add an Arguments entry
describing `--dry-run` (boolean flag that performs a non-destructive preview)
alongside the existing file-path description so the example, synopsis, and
frontmatter are consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/patternfly/commands/migrate.md`:
- Around line 11-13: Add the bash language specifier to all fenced code blocks
in the Synopsis and Examples for the /patternfly:migrate command so they become
```bash fences; specifically update the block containing "/patternfly:migrate
[file-path]" and the example blocks (e.g., "/patternfly:migrate
src/components/Dashboard.tsx", "/patternfly:migrate", "/patternfly:migrate
src/components --dry-run") to use ```bash at the opening fence so markdownlint
MD040 is satisfied.

---

Duplicate comments:
In `@plugins/patternfly/commands/migrate.md`:
- Line 3: The example uses a --dry-run flag but the frontmatter argument-hint,
synopsis, and Arguments section lack it; either remove the dry-run example or
add support documentation: update the frontmatter entry `argument-hint` to
include "[--dry-run]" (in plugins/patternfly/commands/migrate.md), update the
synopsis line to show `/patternfly:migrate [file-path] [--dry-run]`, and add an
Arguments entry describing `--dry-run` (boolean flag that performs a
non-destructive preview) alongside the existing file-path description so the
example, synopsis, and frontmatter are consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 055e5c3a-fc06-4d3e-823e-a23ca14e6b61

📥 Commits

Reviewing files that changed from the base of the PR and between cf5f44f and 54e272b.

📒 Files selected for processing (4)
  • plugins/patternfly/.claude-plugin/plugin.json
  • plugins/patternfly/README.md
  • plugins/patternfly/commands/migrate.md
  • plugins/patternfly/skills/patternfly-migration/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • plugins/patternfly/skills/patternfly-migration/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/patternfly/.claude-plugin/plugin.json

Comment on lines +11 to +13
```
/patternfly:migrate [file-path]
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language specifiers to code blocks.

The code blocks in Synopsis and Examples sections should specify bash as the language for proper syntax highlighting and to satisfy the markdownlint MD040 rule.

📝 Proposed fix
 ## Synopsis
-```
+```bash
 /patternfly:migrate [file-path]

```diff
 1. **Migrate a single component file**:
-   ```
+   ```bash
    /patternfly:migrate src/components/Dashboard.tsx
    ```
 2. **Migrate current working directory**:
-   ```
+   ```bash
    /patternfly:migrate
    ```
 3. **Analyze before migrating**:
-   ```
+   ```bash
    /patternfly:migrate src/components --dry-run
    ```

Also applies to: 62-64, 68-70, 74-77

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 11-11: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/patternfly/commands/migrate.md` around lines 11 - 13, Add the bash
language specifier to all fenced code blocks in the Synopsis and Examples for
the /patternfly:migrate command so they become ```bash fences; specifically
update the block containing "/patternfly:migrate [file-path]" and the example
blocks (e.g., "/patternfly:migrate src/components/Dashboard.tsx",
"/patternfly:migrate", "/patternfly:migrate src/components --dry-run") to use
```bash at the opening fence so markdownlint MD040 is satisfied.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/patternfly/skills/pf-glass-theme/scripts/glass-theme-enhanced.css`:
- Around line 64-84: The badge pseudo-element on the selector .pf-v6-theme-glass
.pf-v6-c-page__main-section:first-child::before (and the related pseudo-element
at lines 86-91) is always visible; make it opt-in by default and only show when
an explicit opt-in modifier is present (e.g., a class or data-attribute on the
theme root). Update the CSS so the existing rules set the badge to be hidden by
default (display:none or opacity:0 and pointer-events:none) and add a second
rule that targets the opt-in modifier (for example
.pf-v6-theme-glass.pf-v6-theme-glass--show-badge
.pf-v6-c-page__main-section:first-child::before) to restore the current visible
styles; apply the same pattern to the other pseudo-element at 86-91 so both
badges only appear when the opt-in modifier is present.

In `@plugins/patternfly/skills/pf-glass-theme/scripts/GlassThemeToggle.tsx`:
- Around line 15-17: The state initializer for isGlassEnabled currently reads
document.documentElement during render which breaks SSR; change the
initialization to a safe default (e.g., false) and move the DOM check into a
React.useEffect that runs on mount to call
setIsGlassEnabled(document.documentElement.classList.contains('pf-v6-theme-glass'));
update any logic that relied on the synchronous initial value to handle the
deferred update (use effect to run once). Refer to the isGlassEnabled state and
setIsGlassEnabled in GlassThemeToggle and add a React.useEffect(...) that
performs the document.classList.contains check.

In `@plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts`:
- Around line 27-33: The cleanup currently blindly removes global classes
(pf-v6-theme-glass and pf-v6-theme-redhat) which can break other consumers;
change useGlassTheme to track ownership with a reference count so classes are
only removed when the last consumer unmounts: on mount increment a shared
counter (stored on the html element via a dataset key or a module-scoped WeakMap
keyed by document.documentElement), add classes if count becomes 1, and on
unmount decrement the counter and only call
htmlElement.classList.remove('pf-v6-theme-glass') and
htmlElement.classList.remove('pf-v6-theme-redhat') (for variant === 'redhat')
when the counter reaches 0. Ensure the counter references the same key for both
adding and removing in the useGlassTheme hook and handle absence/initialization
of the counter safely.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8cfecb22-3ecb-49d9-a3e7-7d6623d10767

📥 Commits

Reviewing files that changed from the base of the PR and between 54e272b and bbf1ce7.

📒 Files selected for processing (10)
  • .claude-plugin/marketplace.json
  • PLUGINS.md
  • docs/data.json
  • plugins/patternfly/OWNERS
  • plugins/patternfly/skills/pf-glass-theme/README.md
  • plugins/patternfly/skills/pf-glass-theme/SKILL.md
  • plugins/patternfly/skills/pf-glass-theme/scripts/GlassThemeToggle.tsx
  • plugins/patternfly/skills/pf-glass-theme/scripts/glass-example.tsx
  • plugins/patternfly/skills/pf-glass-theme/scripts/glass-theme-enhanced.css
  • plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts
✅ Files skipped from review due to trivial changes (2)
  • plugins/patternfly/OWNERS
  • PLUGINS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .claude-plugin/marketplace.json

Comment on lines +64 to +84
.pf-v6-theme-glass .pf-v6-c-page__main-section:first-child::before {
content: 'Glass Theme Active';
position: fixed;
bottom: 16px;
right: 16px;
padding: 8px 16px;
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(12.5px);
-webkit-backdrop-filter: blur(12.5px);
color: rgba(0, 0, 0, 0.85);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 20px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.3px;
z-index: 9999;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
pointer-events: none;
user-select: none;
opacity: 0.5;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make the indicator badge truly opt-in.

The badge is currently always shown for glass theme users, even though this section is documented as optional.

Suggested fix
-.pf-v6-theme-glass .pf-v6-c-page__main-section:first-child::before {
+.pf-v6-theme-glass.pf-v6-theme-glass-debug .pf-v6-c-page__main-section:first-child::before {
@@
-.pf-v6-theme-glass.pf-v6-theme-dark .pf-v6-c-page__main-section:first-child::before {
+.pf-v6-theme-glass.pf-v6-theme-dark.pf-v6-theme-glass-debug .pf-v6-c-page__main-section:first-child::before {

Also applies to: 86-91

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/patternfly/skills/pf-glass-theme/scripts/glass-theme-enhanced.css`
around lines 64 - 84, The badge pseudo-element on the selector
.pf-v6-theme-glass .pf-v6-c-page__main-section:first-child::before (and the
related pseudo-element at lines 86-91) is always visible; make it opt-in by
default and only show when an explicit opt-in modifier is present (e.g., a class
or data-attribute on the theme root). Update the CSS so the existing rules set
the badge to be hidden by default (display:none or opacity:0 and
pointer-events:none) and add a second rule that targets the opt-in modifier (for
example .pf-v6-theme-glass.pf-v6-theme-glass--show-badge
.pf-v6-c-page__main-section:first-child::before) to restore the current visible
styles; apply the same pattern to the other pseudo-element at 86-91 so both
badges only appear when the opt-in modifier is present.

Comment on lines +15 to +17
const [isGlassEnabled, setIsGlassEnabled] = React.useState(() =>
document.documentElement.classList.contains('pf-v6-theme-glass')
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid DOM access during initial render.

This state initializer reads document during render, which can crash in SSR/non-browser rendering contexts.

Suggested fix
-  const [isGlassEnabled, setIsGlassEnabled] = React.useState(() =>
-    document.documentElement.classList.contains('pf-v6-theme-glass')
-  );
+  const [isGlassEnabled, setIsGlassEnabled] = React.useState(false);
+
+  React.useEffect(() => {
+    setIsGlassEnabled(
+      document.documentElement.classList.contains('pf-v6-theme-glass')
+    );
+  }, []);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const [isGlassEnabled, setIsGlassEnabled] = React.useState(() =>
document.documentElement.classList.contains('pf-v6-theme-glass')
);
const [isGlassEnabled, setIsGlassEnabled] = React.useState(false);
React.useEffect(() => {
setIsGlassEnabled(
document.documentElement.classList.contains('pf-v6-theme-glass')
);
}, []);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/patternfly/skills/pf-glass-theme/scripts/GlassThemeToggle.tsx` around
lines 15 - 17, The state initializer for isGlassEnabled currently reads
document.documentElement during render which breaks SSR; change the
initialization to a safe default (e.g., false) and move the DOM check into a
React.useEffect that runs on mount to call
setIsGlassEnabled(document.documentElement.classList.contains('pf-v6-theme-glass'));
update any logic that relied on the synchronous initial value to handle the
deferred update (use effect to run once). Refer to the isGlassEnabled state and
setIsGlassEnabled in GlassThemeToggle and add a React.useEffect(...) that
performs the document.classList.contains check.

Comment thread plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts Outdated
…ive consumers

Implement reference counting to track multiple consumers of glass theme.
Classes are only added when first consumer mounts and only removed when
last consumer unmounts, preventing breaking other components.
@anandkuma77 anandkuma77 marked this pull request as ready for review May 20, 2026 03:48
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts (1)

20-21: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Track class ownership, not just consumer count.

On Line 20 and Line 39 paths, counters assume this hook owns the class lifecycle. If pf-v6-theme-glass/pf-v6-theme-redhat were pre-existing, the last unmount still removes them.

Proposed minimal fix
   useEffect(() => {
     const htmlElement = document.documentElement;
+    const hadGlassClass = htmlElement.classList.contains('pf-v6-theme-glass');

     // Increment reference counts
     const glassCount = parseInt(htmlElement.dataset.pfGlassCount || '0', 10) + 1;
     htmlElement.dataset.pfGlassCount = glassCount.toString();

     let redhatCount = 0;
+    const hadRedhatClass = htmlElement.classList.contains('pf-v6-theme-redhat');
     if (variant === 'redhat') {
       redhatCount = parseInt(htmlElement.dataset.pfGlassRedhatCount || '0', 10) + 1;
       htmlElement.dataset.pfGlassRedhatCount = redhatCount.toString();
     }

     // Apply classes only if this is the first consumer
     if (glassCount === 1) {
-      htmlElement.classList.add('pf-v6-theme-glass');
+      if (!hadGlassClass) {
+        htmlElement.classList.add('pf-v6-theme-glass');
+        htmlElement.dataset.pfGlassOwned = '1';
+      } else {
+        htmlElement.dataset.pfGlassOwned = '0';
+      }
     }
     if (variant === 'redhat' && redhatCount === 1) {
-      htmlElement.classList.add('pf-v6-theme-redhat');
+      if (!hadRedhatClass) {
+        htmlElement.classList.add('pf-v6-theme-redhat');
+        htmlElement.dataset.pfGlassRedhatOwned = '1';
+      } else {
+        htmlElement.dataset.pfGlassRedhatOwned = '0';
+      }
     }

     // Cleanup: decrement counts and remove classes only when last consumer unmounts
     return () => {
       const newGlassCount = parseInt(htmlElement.dataset.pfGlassCount || '1', 10) - 1;
-      htmlElement.dataset.pfGlassCount = Math.max(0, newGlassCount).toString();
+      htmlElement.dataset.pfGlassCount = Math.max(0, newGlassCount).toString();

-      if (newGlassCount === 0) {
+      if (newGlassCount === 0 && htmlElement.dataset.pfGlassOwned === '1') {
         htmlElement.classList.remove('pf-v6-theme-glass');
       }

       if (variant === 'redhat') {
         const newRedhatCount = parseInt(htmlElement.dataset.pfGlassRedhatCount || '1', 10) - 1;
         htmlElement.dataset.pfGlassRedhatCount = Math.max(0, newRedhatCount).toString();

-        if (newRedhatCount === 0) {
+        if (newRedhatCount === 0 && htmlElement.dataset.pfGlassRedhatOwned === '1') {
           htmlElement.classList.remove('pf-v6-theme-redhat');
         }
       }
     };
   }, [variant]);

Also applies to: 30-35, 39-52

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts` around
lines 20 - 21, The hook currently uses a simple numeric counter
(htmlElement.dataset.pfGlassCount) which assumes it "owns" the class lifecycle
and can remove theme classes even when they were pre-existing; change this to
track ownership per hook instance instead: in useGlassTheme generate a unique
instance id, store it in the element dataset (e.g., append to
dataset.pfGlassOwners as a comma-separated list or JSON), on mount add your id
to that owners list and only add the classes if they were not present, and on
cleanup remove your id and only remove the pf-v6-theme-glass /
pf-v6-theme-redhat classes when the owners list becomes empty; update all places
that read/write dataset.pfGlassCount (and any add/remove class logic) to use
this owners list check so pre-existing classes are preserved until no tracked
owners remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts`:
- Around line 20-21: The hook currently uses a simple numeric counter
(htmlElement.dataset.pfGlassCount) which assumes it "owns" the class lifecycle
and can remove theme classes even when they were pre-existing; change this to
track ownership per hook instance instead: in useGlassTheme generate a unique
instance id, store it in the element dataset (e.g., append to
dataset.pfGlassOwners as a comma-separated list or JSON), on mount add your id
to that owners list and only add the classes if they were not present, and on
cleanup remove your id and only remove the pf-v6-theme-glass /
pf-v6-theme-redhat classes when the owners list becomes empty; update all places
that read/write dataset.pfGlassCount (and any add/remove class logic) to use
this owners list check so pre-existing classes are preserved until no tracked
owners remain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 604255a9-3f97-4704-b890-a7a0ba4e4c5f

📥 Commits

Reviewing files that changed from the base of the PR and between bbf1ce7 and cf22178.

📒 Files selected for processing (1)
  • plugins/patternfly/skills/pf-glass-theme/scripts/useGlassTheme.ts

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 21, 2026

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant