Repository navigation
fix: name the lfx insights project in the review card and shorten the hand-off reason (lfx-cdp-insights-ops#822) - #5006
Conversation
… hand-off reason Refs linuxfoundation/lfx-cdp-insights-ops#822 Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
PR SummaryLow Risk Overview Review cards now show the LFX Insights project name when a repo resolves to an existing Insights segment: Question buttons only go “primary” when the bot has a suggestion. CDP hand-off reasons are short and kind-specific. Shared Reviewed by Cursor Bugbot for commit e0fb926. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in these focused changes and their regression coverage; tests were not executed.
0 open findings
What changed in this PR
Improves Slack onboarding messages so requesters see the correct LFX Insights project and clearer hand-off explanations.
Changes:
- Uses the matched Insights project name rather than its PCC owner’s name.
- Highlights only explicitly suggested answers.
- Centralizes short hand-off reasons and adds regression coverage.
| File | Description |
|---|---|
| services/libs/project-onboarding/src/requestResolver.ts | Marks did-you-mean acceptance as suggested. |
| services/libs/project-onboarding/src/requestResolver.test.ts | Checks the suggestion flag. |
| services/libs/project-onboarding/src/requestQuestion.ts | Updates button styling and builds hand-off reasons. |
| services/libs/project-onboarding/src/requestQuestion.test.ts | Tests plain buttons and concise reasons. |
| services/libs/project-onboarding/src/classifyCatalogRow.ts | Uses the matched Insights project name. |
| services/libs/project-onboarding/src/classifyCatalogRow.test.ts | Covers differing PCC and Insights names. |
| services/libs/project-onboarding/src/botThreadReply.test.ts | Updates expected hand-off wording. |
| services/libs/data-access-layer/src/project-catalog/types.ts | Adds the optional suggestion flag. |
| backend/src/services/slack/answerRequestCommand.ts | Uses the shared hand-off reason builder. |
| backend/src/services/slack/answerRequestCommand.test.ts | Checks the updated stored reason. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Three copy and UX fixes found in the post-deploy test round of 2026-10-16, follow-ups of #812, #813 and #818.
onboard Uptane …the card said "Matched to: Software Supply Chain Security Project" with the name-mismatch warning; it now says "Matched to: Uptane", the button reads "Connect GitHub to Uptane" and the status line "added to Uptane". Leaf projects are unaffected because both names are the same.suggestedflag, set only on "Yes, X" in the did-you-mean question. The pick-project question (several PCC projects or several LFX Insights projects with the same name) and the LF-conflict question show plain buttons, since the bot has no preference there.the requester couldn't answer "I couldn't find a project called "TiKV DB". Did you mean TiKV?" (No, ask the CDP team). The reason is now one short sentence per question kind, built in@crowd/project-onboarding:the requester said TiKV DB isn't TiKVthe requester couldn't tell which FIDOPower project this repo belongs tothe requester isn't sure whether X is the LF project YCloses linuxfoundation/lfx-cdp-insights-ops#822
Test plan
pnpm tsc-check,pnpm lint --deny-warningsapiandprojects-evaluation-worker:onboard Uptane https://github.com/uptane/<free repo>→ card "Matched to: Uptane", no mismatch notice, "Connect GitHub to Uptane"onboard FIDOPower https://github.com/fidopower/<free repo>→ the FIDOPower buttons are all plainonboard TiKV DB https://github.com/tikv/<free repo>→ "No, ask the CDP team" → statuswith the CDP team: the requester said TiKV DB isn't TiKV🤖 Generated with Claude Code