Repository navigation
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5545 +/- ##
==========================================
- Coverage 66.01% 65.97% -0.04%
==========================================
Files 2808 2881 +73
Lines 113174 114159 +985
Branches 31692 31982 +290
==========================================
+ Hits 74709 75316 +607
- Misses 36648 37021 +373
- Partials 1817 1822 +5
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
bcbab2a to
e8371dd
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 10:19 AM UTC · Completed 10:56 AM UTC Commit: Runtime: claude · Model: claude-opus-4-6 · Effort: high · Cost: $15.27 |
|
Risk Assessment: elevated (3/5) DetailsA large-scope migration (127 files, 10K+ lines, 3 dependency files changed, large blast radius) in a workspace with high author diversity and many recent regression commits yields an elevated composite score of ~2.90, rounded to 3, despite the absence of protected or security-sensitive paths. |
ReviewFindingsHigh
Medium
Low
Next steps:
|
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
workspaces/app-defaults/packages/app/src/modules/drawer-demo/HelpDrawerMenuItem.tsx(file-level): Line 91 · [low] scope-creep
The drawer-demo HelpDrawerMenuItem icon changed from 'support' to 'help', a UI change bundled into a migration PR without mention in the changeset.
workspaces/app-defaults/plugins/app-defaults/README.md(file-level): Line 149 · [low] missing-coverage
The Usage section says 'Static: import appDefaultsModule' but does not mention that the static path now also requires importing the global header modules. The new Global Header section covers manual registration but is not cross-referenced from the Static usage section.
Suggested fix: Add a cross-reference from the Static usage line to the Global Header section.
| navigate(searchLink); | ||
| } else if (currentHighlight !== -1) { | ||
| navigate( | ||
| results[highlightedIndex]?.document?.location ?? searchLink, |
There was a problem hiding this comment.
[medium] logic-error
Stale-closure bug in Enter key handler: the condition on line 114 correctly reads currentHighlight from highlightedIndexRef.current (the ref), but the actual array lookup on line 116 uses highlightedIndex (the state variable captured by the render-time closure). If a highlight change occurs after the last render but before Enter, navigation may go to the wrong result.
Suggested fix: Replace results[highlightedIndex] with results[currentHighlight] on line 116.
| * @public | ||
| */ | ||
| export const globalHeaderComponentDataRef = | ||
| createExtensionDataRef<GlobalHeaderComponentData>().with({ |
There was a problem hiding this comment.
[medium] duplicate-public-api-identifiers
The new app-react package publishes globalHeaderComponentDataRef (ID: 'global-header.component') and globalHeaderMenuItemDataRef (ID: 'global-header.menu-item'). The unchanged global-header package already publishes refs with identical string IDs but as separate JavaScript objects. Extensions built against the old package's refs may not attach to the new module's inputs if Backstage resolves by object identity rather than string ID.
Suggested fix: Document the migration path: plugins contributing header items must switch their import from the standalone package to app-react.
| * | ||
| * @public | ||
| */ | ||
| export interface ToolbarComponentParams { |
There was a problem hiding this comment.
[medium] naming-conventions
The public params interface ToolbarComponentParams does not follow the GlobalHeader prefix convention used by every other public type in this package.
Suggested fix: Rename ToolbarComponentParams to GlobalHeaderComponentParams.
|
|
||
| const fetchUnreadCount = async () => { | ||
| try { | ||
| const { notifications } = await notificationsApi.getNotifications({ |
There was a problem hiding this comment.
[low] edge-case
The unread notification count derived from notifications.length may cap at the page-size limit if the notifications API applies one.
| const logoURI = | ||
| (typeof logoURLs === 'string' ? logoURLs : null) ?? | ||
| (typeof logoURLs === 'object' | ||
| ? logoURLs?.[themeId!] ?? logoURLs?.[themeVariant!] |
There was a problem hiding this comment.
[low] nil-handling
Non-null assertions themeId! and themeVariant! suppress TypeScript's null-safety checks on values that can be undefined.
Suggested fix: Remove the ! assertions and use optional chaining.
| @@ -0,0 +1,5 @@ | |||
| --- | |||
There was a problem hiding this comment.
[low] scope-creep
The quickstart workspace icon alias change belongs to a different workspace with its own release lifecycle. The PR bundles two workspace changesets without explaining why they must ship together.
| if (params.component) { | ||
| return resolveSyncComponent(node, params.component); | ||
| } | ||
| throw new Error( |
There was a problem hiding this comment.
[low] public-api-unreachable-error
resolveToolbarComponent() contains a throw that is unreachable because the factory only calls it when hasCustomUi is true.
Suggested fix: Remove the dead throw branch or restructure the call.
| size?: 'small' | 'medium' | 'large'; | ||
| title: string; | ||
| titleKey?: string; | ||
| to: string; |
There was a problem hiding this comment.
[low] public-interface-inconsistency
HeaderIconButtonProps requires to: string as mandatory, but the data model allows click-only toolbar items via onClick. External consumers cannot use GlobalHeaderIconButton for click-only behaviors.
Suggested fix: Make to optional and render a plain button when absent.
508f967 to
938354e
Compare
|
This pull request adds a new top-level directory under |
e1775cb to
4a1242d
Compare
72b5c58 to
6c92fb4
Compare
904b4a1 to
489aa5b
Compare
Drop workspaces/global-header now that global header lives inside the app-defaults plugin (src/global-header). Archive the discontinued @red-hat-developer-hub/backstage-plugin-global-header package and update CODEOWNERS, labels, codecov, catalog, and renovate paths accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
Park the global-header fixture plugin in a dedicated test-plugins workspace now that the standalone global-header workspace is gone. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/fs-review |
489aa5b to
25a26cc
Compare
|
ciiay
left a comment
There was a problem hiding this comment.
Request changes
Solid migration overall (API split into app-react, default masthead in app-defaults, standalone workspace removed/archived). Please address the following before merge.
Blocker
Check codecov.yml matches overlay metadatais failing
The PR hand-movesworkspaces/app-defaults/from Tech-Preview → GA incomponent_management. That block is generated from overlaysupport:metadata (scripts/generate-codecov-components.sh --check). Either:- revert the GA promotion and only keep flag/path updates for the deleted
global-headerworkspace, or - promote
app-defaultsin the overlay repo first, then regenerate with--write.
- revert the GA promotion and only keep flag/path updates for the deleted
Should fix
-
SearchBar Enter-key stale closure (migrated pre-existing bug)
InSearchBar.tsx, the Enter handler readshighlightedIndexRef.currentfor the condition but still indexes with statehighlightedIndex. Useresults[currentHighlight]and add a highlighted+Enter unit test. -
Public param type names
New public API fromapp-reactexportsToolbarComponentParams/MenuItemParams. Rename toGlobalHeaderComponentParams/GlobalHeaderMenuItemParamsbefore first publish — renaming after release is harder. -
Divider.test.tsxstill callsdebug()
Drops full DOM to CI logs on every run; remove it while touching the file. -
PR description is stale
Description says deprecation is deferred to RHIDP-17736, but this PR already removes the workspace and archives the package. Align the description (and clarify what 17736 still covers, e.g. npm deprecate / product cutover). -
Docs: Static usage
README Usage still says “importappDefaultsModule” without noting that the static path also needs the three global-header modules (or the feature loader). Cross-link from Static usage to the Global Header section.
Nits / Fullsend findings that are obsolete or non-blocking can wait. Please re-run /fs-review after the push — the prior CHANGES_REQUESTED was against an older SHA before the workspace deletion.



Hey, I just made a Pull Request!
Resolves:
https://redhat.atlassian.net/browse/RHIDP-17734
Part of : https://redhat.atlassian.net/browse/RHIDP-17735
Solution description:
Fold the standalone global-header experience into the app-defaults stack by splitting extension APIs from the default UI:
Docs + changeset covering enable/disable, contribution patterns, and the API split; icons moved to Remix/IconElement where applicable.
Note: Deprecation of the original plugin will be handled as part of https://redhat.atlassian.net/browse/RHIDP-17736
Screenshots:
Tested on rhdh-local
✔️ Checklist