Skip to content

fix: improve entity reference extraction in CustomReviewStep#555

Merged
LakshanSS merged 2 commits into
openchoreo:mainfrom
stefinie123:events-catalog
May 16, 2026
Merged

fix: improve entity reference extraction in CustomReviewStep#555
LakshanSS merged 2 commits into
openchoreo:mainfrom
stefinie123:events-catalog

Conversation

@stefinie123
Copy link
Copy Markdown
Contributor

@stefinie123 stefinie123 commented May 16, 2026

Purpose

Improve entity reference extraction in CustomReviewStep to utilize parseEntityRef for better accuracy so that non entity refs are not flattened

Goals

Fix issue where Docker Context and Docker file path not getting displayed in review step

image

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

  • Bug Fixes
    • Improved entity name parsing in the custom review step for more accurate and reliable name display during the review workflow.

Review Change Stack

Signed-off-by: Stefinie Fernando <minolispencer@gmail.com>
…ze parseEntityRef for better accuracy

Signed-off-by: Stefinie Fernando <minolispencer@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 012518f1-cb4f-4ceb-b165-5704544368bc

📥 Commits

Reviewing files that changed from the base of the PR and between 15e3f40 and f8f67e5.

📒 Files selected for processing (1)
  • packages/app/src/scaffolder/CustomReviewState/CustomReviewStep.tsx

📝 Walkthrough

Walkthrough

CustomReviewStep.tsx updates the extractName helper function to use parseEntityRef from @backstage/catalog-model instead of manual string-slicing heuristics. The new logic skips parsing for strings without :, returns the parsed entity name on success, and falls back to the original string on parse errors.

Changes

Entity Reference Parsing Update

Layer / File(s) Summary
Entity reference parsing in extractName
packages/app/src/scaffolder/CustomReviewState/CustomReviewStep.tsx
The extractName helper now imports parseEntityRef and replaces position-based string slicing with proper Backstage entity reference parsing, including fallback handling for parse errors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • kaviththiranga
  • sameerajayasoma
  • LakshanSS

Poem

🐰 A helper spring-cleaned with care,
Entity refs parsed fair,
No more slice-and-dice today,
parseEntityRef leads the way!
Heuristics out, standards in—
Cleaner code's a rabbit win! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description includes Purpose and Goals sections with clear problem statement and solution, but most required sections (Approach, User stories, Release note, Documentation, Training, Certification, Marketing, Automation tests details, Security checks answers) contain only placeholder text or incomplete entries. Complete the Approach section with implementation details, provide concrete Automation tests coverage data, answer Security checks checklist items explicitly, and fill in other required sections or mark as N/A with explanations.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: improving entity reference extraction in CustomReviewStep using parseEntityRef.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../scaffolder/CustomReviewState/CustomReviewStep.tsx 20.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@LakshanSS LakshanSS left a comment

Choose a reason for hiding this comment

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

LGTM

@LakshanSS LakshanSS merged commit 2e66cba into openchoreo:main May 16, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants