Skip to content

fix(lightspeed): moved CustomDrawer out of the packages/app#2463

Merged
karthikjeeyar merged 1 commit intoredhat-developer:mainfrom
debsmita1:lightspeed-customdrawer
Mar 5, 2026
Merged

fix(lightspeed): moved CustomDrawer out of the packages/app#2463
karthikjeeyar merged 1 commit intoredhat-developer:mainfrom
debsmita1:lightspeed-customdrawer

Conversation

@debsmita1
Copy link
Member

@debsmita1 debsmita1 commented Mar 5, 2026

Hey, I just made a Pull Request!

Resolves:
https://issues.redhat.com/browse/RHDHBUGS-2770

Solution description:
Moved the CustomDrawer component from packages/app to plugins/lightspeed/dev to resolve workspace accessibility issues during development. This ensures the component is directly available to the dev plugin without relying on the app workspace package

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-qodo-merge
Copy link

Review Summary by Qodo

Move CustomDrawer component to lightspeed plugin dev

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Moved CustomDrawer component from packages/app to plugins/lightspeed/dev
• Updated import paths to reference component from lightspeed plugin
• Added @internal JSDoc annotations to mark component as internal API
• Exported CustomDrawer via plugin's dev entry point in package.json
• Updated dependency reference to use workspace protocol
Diagram
flowchart LR
  A["packages/app<br/>CustomDrawer.tsx"] -->|"moved to"| B["plugins/lightspeed/dev<br/>CustomDrawer.tsx"]
  C["ApplicationDrawer.tsx<br/>import path"] -->|"updated to"| D["@red-hat-developer-hub/<br/>backstage-plugin-lightspeed/dev"]
  E["DrawerComponent.tsx<br/>import path"] -->|"updated to"| D
  F["package.json<br/>exports"] -->|"added dev entry"| D
Loading

Grey Divider

File Changes

1. workspaces/lightspeed/.changeset/soft-yaks-hope.md 📝 Documentation +6/-0

Changeset for CustomDrawer relocation

• Created changeset documenting the CustomDrawer component relocation
• Marked changes as patch version for both lightspeed plugin and app package

workspaces/lightspeed/.changeset/soft-yaks-hope.md


2. workspaces/lightspeed/packages/app/package.json ⚙️ Configuration changes +1/-1

Update lightspeed plugin dependency reference

• Updated lightspeed plugin dependency from wildcard to workspace protocol
• Changed from "*" to "workspace:^" for proper workspace resolution

workspaces/lightspeed/packages/app/package.json


3. workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx 🐞 Bug fix +1/-1

Update CustomDrawer import path

• Updated import statement to reference CustomDrawer from lightspeed plugin dev export
• Changed from local relative import to plugin package import path

workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx


View more (4)
4. workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx ✨ Enhancement +6/-2

Add internal API annotations to CustomDrawer

• Removed eslint disable/enable comments for restricted imports
• Added @internal JSDoc annotations to CustomDrawerProps type and CustomDrawer component
• Maintained all existing component functionality and props

workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx


5. workspaces/lightspeed/plugins/lightspeed/dev/DrawerComponent.tsx 🐞 Bug fix +1/-2

Update CustomDrawer import to local reference

• Updated import to use local CustomDrawer from same dev directory
• Removed cross-monorepo relative import that violated import restrictions
• Simplified import path from packages/app to local dev folder

workspaces/lightspeed/plugins/lightspeed/dev/DrawerComponent.tsx


6. workspaces/lightspeed/plugins/lightspeed/package.json ⚙️ Configuration changes +1/-0

Add dev export for CustomDrawer component

• Added new dev export entry pointing to CustomDrawer.tsx
• Enables external packages to import CustomDrawer from plugin's dev export

workspaces/lightspeed/plugins/lightspeed/package.json


7. workspaces/lightspeed/plugins/lightspeed/report-dev.api.md 📝 Documentation +9/-0

Add API Extractor report file

• Generated API report file for the lightspeed plugin
• Created by API Extractor tool for API documentation tracking

workspaces/lightspeed/plugins/lightspeed/report-dev.api.md


Grey Divider

Qodo Logo

@rhdh-qodo-merge
Copy link

rhdh-qodo-merge bot commented Mar 5, 2026

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Changeset includes private app 🐞 Bug ⛯ Reliability
Description
The added changeset declares a release for the private app package, but repo CI explicitly rejects
changesets that include private workspace packages (including app), so this PR will fail changeset
verification.
Code

workspaces/lightspeed/.changeset/soft-yaks-hope.md[R1-4]

+---
+'@red-hat-developer-hub/backstage-plugin-lightspeed': patch
+'app': patch
+---
Evidence
The changeset explicitly lists 'app': patch. The repository has a CI verification script that
treats app as a private package and exits with failure if any changeset includes releases for
private packages.

workspaces/lightspeed/.changeset/soft-yaks-hope.md[1-4]
scripts/ci/verify-changesets.js[22-28]
scripts/ci/verify-changesets.js[64-99]
workspaces/lightspeed/packages/app/package.json[1-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset `soft-yaks-hope.md` includes a release for `app`, which is a private workspace package. CI runs `scripts/ci/verify-changesets.js` and fails if a changeset includes any private package releases.

## Issue Context
- `app` is marked `private: true`.
- CI explicitly rejects changesets containing releases for `app`.

## Fix Focus Areas
- workspaces/lightspeed/.changeset/soft-yaks-hope.md[1-4]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. No typesVersions for dev 🐞 Bug ✓ Correctness
Description
A new subpath export @…/dev was added but there is no corresponding typesVersions mapping, which
can break TypeScript consumers that rely on typesVersions rather than exports for subpath type
resolution.
Code

workspaces/lightspeed/plugins/lightspeed/package.json[R10-16]

  "exports": {
    ".": "./src/index.ts",
    "./alpha": "./src/alpha.ts",
+    "./dev": "./dev/CustomDrawer.tsx",
    "./package.json": "./package.json"
  },
  "typesVersions": {
Evidence
The package now exports ./dev, but typesVersions only maps alpha and package.json. This
inconsistency can lead to Cannot find module '@…/dev' or its corresponding type declarations in TS
setups that use typesVersions for subpath resolution (a pattern already used for alpha in this
repo).

workspaces/lightspeed/plugins/lightspeed/package.json[10-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The package exports a new subpath (`./dev`) but does not include a corresponding `typesVersions` mapping. Some TS configurations use `typesVersions` for subpath type resolution and may fail to resolve `@red-hat-developer-hub/backstage-plugin-lightspeed/dev`.

## Issue Context
This repo already maintains `typesVersions` for `alpha`, suggesting subpath compatibility is expected.

## Fix Focus Areas
- workspaces/lightspeed/plugins/lightspeed/package.json[10-25]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Dev code used by app 🐞 Bug ⛯ Reliability
Description
The app now imports CustomDrawer from the plugin’s ./dev export; this couples production app
code to a dev-folder module and risks publish/packaging mismatches or accidental external
consumption of an unstable/internal API.
Code

workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx[25]

+import { CustomDrawer } from '@red-hat-developer-hub/backstage-plugin-lightspeed/dev';
Evidence
ApplicationDrawer imports from @…/dev, which is backed by an export pointing at
./dev/CustomDrawer.tsx. That module is annotated @internal, but package.json exports still
makes it an official import path. Additionally, the package’s files list does not mention dev/,
so unless the prepack/build tooling accounts for this new export, the published artifact may not
contain the referenced file.

workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx[17-26]
workspaces/lightspeed/plugins/lightspeed/package.json[10-15]
workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx[22-40]
workspaces/lightspeed/plugins/lightspeed/package.json[96-101]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Backstage app (`packages/app`) now imports `CustomDrawer` from the plugin’s `./dev` export. This makes app runtime depend on a dev-folder module and exposes an `@internal` component via package `exports`.

## Issue Context
- `./dev` is now a public subpath in `exports`.
- The component is marked `@internal` but still importable.
- Packaging may not include `dev/` unless explicitly handled.

## Fix Focus Areas
- workspaces/lightspeed/packages/app/src/components/Root/ApplicationDrawer.tsx[17-26]
- workspaces/lightspeed/plugins/lightspeed/package.json[10-15]
- workspaces/lightspeed/plugins/lightspeed/package.json[96-101]
- workspaces/lightspeed/plugins/lightspeed/dev/CustomDrawer.tsx[22-40]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Changeset missing EOF newline 🐞 Bug ⛯ Reliability
Description
The newly added changeset file is missing a trailing newline, which commonly fails formatting checks
(prettier) in this repo.
Code

workspaces/lightspeed/.changeset/soft-yaks-hope.md[R1-6]

+---
+'@red-hat-developer-hub/backstage-plugin-lightspeed': patch
+'app': patch
+---
+
+Moved the `CustomDrawer` component from `packages/app` to `plugins/lightspeed/dev` to resolve workspace accessibility issues during development.
Evidence
Workspace lint-staged/prettier is configured to rewrite *.md files, which typically enforces a
trailing newline; the diff explicitly indicates the file has no newline at EOF.

workspaces/lightspeed/package.json[65-72]
workspaces/lightspeed/.changeset/soft-yaks-hope.md[1-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset file is missing a trailing newline, which can fail formatting checks.

## Issue Context
This workspace runs prettier over `*.md` via lint-staged.

## Fix Focus Areas
- workspaces/lightspeed/.changeset/soft-yaks-hope.md[1-6]
- workspaces/lightspeed/package.json[65-72]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Mar 5, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/lightspeed/packages/app none v0.0.0
@red-hat-developer-hub/backstage-plugin-lightspeed workspaces/lightspeed/plugins/lightspeed patch v1.3.0

@debsmita1 debsmita1 force-pushed the lightspeed-customdrawer branch from 302f6ca to def489c Compare March 5, 2026 10:03
@debsmita1 debsmita1 force-pushed the lightspeed-customdrawer branch from def489c to 011ef15 Compare March 5, 2026 10:29
@debsmita1 debsmita1 force-pushed the lightspeed-customdrawer branch from 011ef15 to 1c989d4 Compare March 5, 2026 10:48
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

Copy link
Member

@karthikjeeyar karthikjeeyar left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 5, 2026
@karthikjeeyar karthikjeeyar merged commit 6106526 into redhat-developer:main Mar 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants