Skip to content

fix: name the lfx insights project in the review card and shorten the hand-off reason (lfx-cdp-insights-ops#822) - #5006

Merged
ulemons merged 1 commit into
mainfrom
fix/issue-822-review-copy-after-test-round
Oct 16, 2026
Merged

ulemons merged 1 commit into
mainfrom
fix/issue-822-review-copy-after-test-round

Conversation

@ulemons

@ulemons ulemons commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Three copy and UX fixes found in the post-deploy test round of 2026-10-16, follow-ups of #812, #813 and #818.

  • The review card names the LFX Insights project. When a request resolves to a project that is already in LFX Insights, the matched name is now the LFX Insights project, not the PCC node that owns it. For 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.
  • No green button without a suggestion. A question option carries a suggested flag, 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.
  • Short hand-off reason. "No, ask the CDP team" / "Not sure, ask the CDP team" used to record 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:
    • did-you-mean: the requester said TiKV DB isn't TiKV
    • pick-project: the requester couldn't tell which FIDOPower project this repo belongs to
    • LF conflict: the requester isn't sure whether X is the LF project Y

Closes linuxfoundation/lfx-cdp-insights-ops#822

Test plan

  • pnpm tsc-check, pnpm lint --deny-warnings
  • Unit tests: project-onboarding, projects-evaluation worker, slack lib, backend slack services (493 tests)
  • Prod, after deploying api and projects-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 plain
    • onboard TiKV DB https://github.com/tikv/<free repo> → "No, ask the CDP team" → status with the CDP team: the requester said TiKV DB isn't TiKV

🤖 Generated with Claude Code

… hand-off reason

Refs linuxfoundation/lfx-cdp-insights-ops#822

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 13:16
@ulemons ulemons self-assigned this Oct 16, 2026
@cursor

cursor Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Copy and presentation logic for Slack onboarding and classification; behavior is tightened with unit test updates and no auth or data-migration changes.

Overview
Fixes three onboarding Slack/review UX issues from post-deploy testing.

Review cards now show the LFX Insights project name when a repo resolves to an existing Insights segment: matchedProjectName for lf_in_cdp uses the CDP segment name instead of the owning PCC node (e.g. Uptane instead of a parent PCC label).

Question buttons only go “primary” when the bot has a suggestion. IRequestQuestionOption gains an optional suggested flag; Slack styling uses that instead of defaulting the first non–hand-off option. “Did you mean” yes options set suggested: true; pick-project and LF-conflict flows stay plain.

CDP hand-off reasons are short and kind-specific. Shared handOffReason(row, question) in @crowd/project-onboarding replaces the long “couldn’t answer … (button label)” string; Slack answerRequestCommand calls it when recording reviewReason on hand-off answers.

Reviewed by Cursor Bugbot for commit e0fb926. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

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.

🟢 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.

@ulemons
ulemons merged commit 69a6f12 into main Oct 16, 2026
16 checks passed
@ulemons
ulemons deleted the fix/issue-822-review-copy-after-test-round branch October 16, 2026 13:38
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.

2 participants